6 Linear predictor and model formula

6.1 Elements of linear algebra

We presume an understanding of the concept of a linear vector space including vector addition, scalar multiplication, and subspaces. The additional concept required by statisticians is the notion of indicator vectors with their associated pointwise multiplication required to describe factorial models.

6.1.1 Indicator vectors

An indicator vector is one whose coordinates can only take the values 0 and 1. The unit basis vectors, 𝐞’s, are examples and any vector 𝐱 can be written as a linear combination of unit basis vectors.

For the previous example, the vectors 𝐭1=(0,1,0,0,1,1) and 𝐭2=(1,0,1,0,0,1) are both indicator vectors in six-dimensional space. The zero vector 𝟎=(0,0,,0) and the one vector 𝟏=(1,1,,1) are also both indicator vectors.

In six-dimensional space there are 26=64 indicator vectors. An interesting subset are unit indicator vectors

𝐞1=(1,0,0,0,0,0),𝐞2=(0,1,0,0,0,0),,𝐞6=(0,0,0,0,1).

Note that 𝐱=(x1,x2,,x6)=x1𝐞1+x2𝐞2++x6𝐞6.

Pointwise multiplication (dot product)

If 𝐱 and 𝐲 are two vectors in n-dimensional space then we define the pointwise multiplication by:

𝐱.𝐲=(x1y1,x2y2,,xnyn)

so that 𝐱.𝐲 is a vector in n-dimensional space constructed by multiplying the coordinates of 𝐱 and 𝐲 together.

Some useful identities of pointwise multiplication are:

𝐱.𝐲=𝐲.𝐱,𝐱𝟏=𝐱,and𝐱(𝐲+𝐳)=𝐱𝐲+𝐱𝐳.

If 𝐚 and 𝐛 are indicator vectors then 𝐚.𝐛 is also an indicator vector that contains 1 in position i if and only if both ai=1 and bi=1. This condition is the main motivation for introducing pointwise multiplication.

Linear combinations

If 𝐱1,𝐱2,,𝐱p are p vectors in n-dimensional space and α1,α2,,αp are p scalars (real numbers) then:

α1𝐱1+α2𝐱2++αp𝐱p

is a linear combination of 𝐱1,𝐱2,,𝐱p. For instance

2𝐱1+𝐱2-7𝐱3,𝐱1+𝐱3,α1𝐱1+α3𝐱3

are linear combinations of 𝐱1,𝐱2,𝐱3. The linear predictor is a linear combination of the explanatory vectors.

Span

The set of all linear combinations of 𝐱1,𝐱2,,𝐱p is known as the span of 𝐱1,𝐱2,,𝐱p, and written as span(𝐱1,𝐱2,,𝐱p). Any vector in this set can be written as α1𝐱1++αp𝐱p for some α1,α2,,αp.

For example, in three-dimensional space, the first two unit indicator vectors are 𝐞1=(1,0,0) and 𝐞2=(0,1,0). Any vector in the space defined by span(𝐞1,𝐞2) can be written as (α1,α2,0), but, this space does not contain (0,0,1).

The zero vector 𝟎span(𝐞1,𝐞2). The one vector 𝟏span(𝐞1,𝐞2,,𝐞6).

6.1.2 Subspaces

Let SV denote a subset of vectors in n-dimensional space and suppose that 𝐬1 and 𝐬2 are in S.

Then S is a subspace if

  • (i)

    𝐬1+𝐬2 is in S and

  • (ii)

    α𝐬1 is in S.

 
Exercise 6.43
Verify that S=span(𝐞1,𝐞3) is a subspace of 3.

Geometrically, this defines a plane that passes through the origin at right angles to the second axis.

 

In a similar way, we can show that span(𝐱1,𝐱2,,𝐱p) is a subspace of n.

Dimension

The dimension of a subspace S, denoted by dim(S), is the minimum number of vectors required to span the subspace. In three-dimensional space,

  • dimspan(𝐞1,𝐞3)=2,

  • dimspan(𝐞1,𝐞2,𝐞3)=3

  • dimspan(𝟏,𝐞1,𝐞2,𝐞3)=3.

The sum of two subspaces

If S1 and S2 are two subspaces then the sum S=S1+S2 is the set S of vectors that can be written as 𝐬=𝐬1+𝐬2 where 𝐬1S1 and 𝐬2S2.

We can show that the sum of two subspaces is also a subspace itself, for instance:

  • (i)

    If S1=span(𝐞1,𝐞2,𝐞3) and S2=span(𝐞2,𝐞3,𝐞4) are subspaces in six-dimensional space composed of the unit indicator vectors then S1+S2=span(𝐞1,𝐞2,𝐞3,𝐞4).

    Note that dim(S1+S2)dimS1+dimS2.

  • (ii)

    In general if S1=span(𝐱1,𝐱2,,𝐱p) and S2=span(𝐳1,𝐳2,,𝐳q) then S1+S2=span(𝐱1,,𝐱p,𝐳1,,𝐳q).

The product of two subspaces

If S1 and S2 are two subspaces then the product S=S1.S2 is the span of the set of vectors, s, that can be written as the pointwise product s=𝐬1.𝐬2 where 𝐬1S1 and 𝐬2S2. In particular, if S1=span(𝐱1,𝐱2,,𝐱p) and S2=span(𝐳1,𝐳2,,𝐳q), the product S1.S2 is

S1.S2=span(𝐱1𝐳1,𝐱1𝐳2,,𝐱1𝐳q,𝐱2𝐳1,,𝐱2𝐳q,,𝐱p𝐳q).

 
Exercise 6.44
In three-dimensional space find S1.S2 when S1=span(𝐞1,𝐞2) and S2=span(𝐞2,𝐞3).

 

 
Exercise 6.45
In four-dimensional space, let 𝐚1=(1,1,0,0),𝐚2=(0,0,1,1),𝐛1=(1,0,1,0) and 𝐛2=(0,1,0,1). Put A=span(𝐚1,𝐚2), B=span(𝐛1,𝐛2). Find A.B.

 

 
Exercise 6.46
Note that the set of vectors S, for which s=𝐬1.𝐬2 with 𝐬1S1 and 𝐬2S2 does not in general constitute a subspace.

Use the previous exercise to find a counter example.