Tutorials › Statistical Theory III - Theories of Inference, Multivariate Methods, and Contingency Tables › Projection Sums of Squares for Nested Model Spaces

Cochran's Theorem and Sums-of-Squares Decompositions · Tutorial 206 of 972

Projection Sums of Squares for Nested Model Spaces

Learn to express, calculate, and interpret the sum of squares contributed by a larger nested model space.

Intermediate 10 min read

What You'll Learn

  • Define the orthogonal component of a larger nested model space
  • Prove that the difference of nested projection matrices is itself a projection
  • Relate the added sum of squares to the reduction in residual sum of squares
  • Calculate the increment when an added predictor is not orthogonal to the smaller space
  • Derive its exact chi-square distribution under spherical normal errors
  • Recognize why comparing raw projections onto added columns can be incorrect

Why a Nested-Model Increment Is a Projection

Suppose a smaller linear model can fit vectors in a space \(S_0\), and a larger model can fit vectors in a space \(S_1\), where \(S_0\subseteq S_1\subseteq\mathbb{R}^n\). Least squares projects the observed response vector \(y\) onto the model space. The larger model can therefore improve the fit only through the part of its space that is not already available to the smaller model.

That new part is the subspace of \(S_1\) orthogonal to \(S_0\). The sum of squares added by the larger model is the squared length of the projection of \(y\) onto this subspace. This formulation applies whether or not the columns used to describe the larger model are orthogonal to the smaller model.

Definition: Let \(P_0\) and \(P_1\) be the orthogonal projection matrices onto nested subspaces \(S_0\subseteq S_1\) of \(\mathbb{R}^n\). The orthogonal increment space is \(S_1\cap S_0^\perp\). The projection sum of squares added by \(S_1\) beyond \(S_0\) is \[ y'(P_1-P_0)y. \]

An orthogonal projection matrix is symmetric and idempotent: \(P'=P\) and \(P^2=P\). Its projected vector is the least-squares fit in its subspace. The fitted values are \(P_0y\) and \(P_1y\), and their difference is the portion of the larger fit that the smaller fit could not provide.

The Projection Difference Theorem

Theorem: If \(S_0\subseteq S_1\) and \(P_0,P_1\) are their orthogonal projection matrices, then \(Q=P_1-P_0\) is the orthogonal projection matrix onto \(S_1\cap S_0^\perp\). Consequently, \[ y'(P_1-P_0)y=\|(P_1-P_0)y\|^2=\|P_1y-P_0y\|^2. \] Its rank is \(\dim(S_1)-\dim(S_0)\).

Proof. Since \(S_0\subseteq S_1\), projecting a vector first onto \(S_0\) and then onto \(S_1\) leaves it unchanged after the first projection. Thus \(P_1P_0=P_0\). Taking transposes gives \(P_0P_1=P_0\). Therefore \(Q\) is symmetric, and \[ Q^2=(P_1-P_0)^2=P_1-P_1P_0-P_0P_1+P_0=P_1-P_0=Q. \] So \(Q\) is an orthogonal projection matrix.

For any \(x\), \(Qx\) belongs to \(S_1\), since both \(P_1x\) and \(P_0x\) belong to \(S_1\). Also \(P_0Q=P_0(P_1-P_0)=0\), so \(Qx\) is orthogonal to \(S_0\). Hence the range of \(Q\) is contained in \(S_1\cap S_0^\perp\). Conversely, if \(w\in S_1\cap S_0^\perp\), then \(P_1w=w\) and \(P_0w=0\), so \(Qw=w\). This proves that the range is exactly the orthogonal increment space. Its dimension is \(\dim(S_1)-\dim(S_0)\), by the orthogonal decomposition of \(S_1\) into \(S_0\) and \(S_1\cap S_0^\perp\). Finally, symmetry and idempotence give \(y'Qy=(Qy)'(Qy)=\|Qy\|^2\). Since \(Qy=P_1y-P_0y\), the stated identity follows. \(\square\)

Worked Example: A Direct Calculation in Four Dimensions

Let \(S_0\) be spanned by \(u=(1,1,1,1)'\), and let \(S_1\) be spanned by \(u\) and \(v=(1,-1,1,-1)'\). These vectors are orthogonal, with \(u'u=v'v=4\). For \(y=(5,1,3,-1)'\), calculate the sum of squares added by \(S_1\).

The smaller-model projection is \[ P_0y=\frac{u'y}{u'u}u=\frac{8}{4}u=(2,2,2,2)'. \] The larger space adds the direction \(v\). Its coefficient in the projection is \(v'y/(v'v)=8/4=2\), so \[ P_1y=P_0y+2v=(4,0,4,0)'. \] The difference between the fits is \(P_1y-P_0y=2v=(2,-2,2,-2)'\). Its squared length, and hence the added sum of squares, is \[ (2)^2+(-2)^2+(2)^2+(-2)^2=16. \] As a check using residual sums of squares, \(y-P_0y=(3,-1,1,-3)'\) has squared length \(20\), while \(y-P_1y=(1,1,-1,-1)'\) has squared length \(4\). Their difference is \(20-4=16\), as required.

Connection to Residual Sum of Squares

For a model space \(S_j\), define its residual sum of squares by \(\operatorname{RSS}_j=\|(I-P_j)y\|^2\). In nested spaces, the improvement in fit and the reduction in residual sum of squares are the same quantity.

Result: For \(S_0\subseteq S_1\), \[ \operatorname{RSS}_0-\operatorname{RSS}_1=y'(P_1-P_0)y. \]

Derivation. The residual from the smaller space splits into two orthogonal vectors: \[ (I-P_0)y=(I-P_1)y+(P_1-P_0)y. \] The first term is orthogonal to \(S_1\), while the second belongs to \(S_1\). Their inner product is therefore zero. By the Pythagorean identity, \[ \|(I-P_0)y\|^2=\|(I-P_1)y\|^2+\|(P_1-P_0)y\|^2. \] Subtracting the first term on the right and applying the projection difference theorem yields the result. This equality concerns sums of squares for the same response vector and nested spaces; it does not require the observed vector to lie in either model.

Worked Example: An Added Predictor That Is Not Orthogonal

In \(\mathbb{R}^3\), let the smaller space be spanned by \(x=(1,1,0)'\), and let the larger space also include \(z=(1,0,1)'\). For \(y=(2,0,3)'\), find the added sum of squares. Because \(z\) is not orthogonal to \(x\), the increment cannot be found by projecting directly onto \(z\).

First remove from \(z\) its projection onto the smaller space: \[ P_0z=\frac{x'z}{x'x}x=\frac{1}{2}(1,1,0)'=(1/2,1/2,0)'. \] Thus the added orthogonal direction is \(w=z-P_0z=(1/2,-1/2,1)'\), with \(w'w=1/4+1/4+1=3/2\). The projection of \(y\) onto this direction has squared length \[ \frac{(w'y)^2}{w'w}=\frac{(1+3)^2}{3/2}=\frac{32}{3}. \] Therefore the sum of squares added is \(32/3\).

We can verify this through the residual sums of squares. The smaller fit is \(P_0y=(2,2,0)'\), giving residual \((0,-2,3)'\) and \(\operatorname{RSS}_0=13\). The larger fit is \(P_0y+(w'y/w'w)w=(2,2,0)'+(8/3)w=(10/3,2/3,8/3)'\). Its residual is \((-4/3,-2/3,1/3)'\), with \(\operatorname{RSS}_1=(16+4+1)/9=7/3\). Hence \(\operatorname{RSS}_0-\operatorname{RSS}_1=13-7/3=32/3\).

Exact Normal-Theory Distribution

The projection representation also gives the exact distribution of the added sum of squares under spherical normal errors. Assume \(y\sim N(\mu,\sigma^2 I)\), where \(\sigma^2>0\), and let \(Q=P_1-P_0\) have rank \(r\). The result below describes one increment; it does not require a decomposition into multiple model increments.

Theorem: Under \(y\sim N(\mu,\sigma^2 I)\), if \(r>0\), then \[ \frac{y'Qy}{\sigma^2}\sim\chi^2_r(\lambda), \qquad \lambda=\frac{\mu'Q\mu}{\sigma^2}. \] Here \(\chi^2_r(\lambda)\) denotes a noncentral chi-square distribution with \(r\) degrees of freedom and noncentrality parameter \(\lambda\). If \(\mu\in S_0\), then \(\lambda=0\), giving the central distribution \(\chi^2_r\).

Proof. Choose an orthonormal basis for the range of \(Q\), and place its \(r\) basis vectors in the columns of an \(n\times r\) matrix \(U\). Then \(U'U=I_r\) and \(Q=UU'\). Consequently \(y'Qy=(U'y)'(U'y)\). A linear transformation of a multivariate normal vector is normal, so \(U'y\) has mean \(U'\mu\) and covariance \(U'(\sigma^2 I)U=\sigma^2 I_r\). Its coordinates, divided by \(\sigma\), are independent normal random variables with unit variance and means given by the coordinates of \(U'\mu/\sigma\). The sum of their squares has a noncentral chi-square distribution with \(r\) degrees of freedom and noncentrality \[ \left\|U'\mu/\sigma\right\|^2=\frac{\mu'UU'\mu}{\sigma^2}=\frac{\mu'Q\mu}{\sigma^2}. \] If \(\mu\in S_0\), then \(Q\mu=0\), so the noncentrality parameter is zero. \(\square\)

Worked Example: The Increment Under a Normal Model

Use the four-dimensional spaces from the first example. Suppose \(y\sim N(\mu,4I)\), where \(\mu=3u+2v\). The increment has rank \(r=1\), because \(S_1\) adds only the direction \(v\) to \(S_0\). Its projector is \(Q=vv'/4\), so \[ \lambda=\frac{\mu'Q\mu}{4}=\frac{\|Q\mu\|^2}{4}. \] Since \(Q\mu=2v\), its squared length is \(4(v'v)=16\), and \(\lambda=16/4=4\). Thus \(y'Qy/4\sim\chi^2_1(4)\).

The same calculation can be checked using the one-dimensional coordinate \(v'y\). Its mean is \(v'\mu=8\), and its variance is \(v'(4I)v=16\). Therefore \(v'y/4\sim N(2,1)\), and \[ \frac{y'Qy}{4}=\frac{(v'y)^2}{16}=\left(\frac{v'y}{4}\right)^2, \] the square of a unit-variance normal variable with mean \(2\), which has noncentrality \(2^2=4\).

Using the Result Carefully

The geometry depends on model spaces, not on a particular choice of coefficient coordinates. If a design matrix has redundant columns, coefficients may not be uniquely determined, but its column space still has a unique orthogonal projection. For a full-column-rank design matrix \(X\), the projection is \(P_X=X(X'X)^{-1}X'\); in general, it is safest to define the projection directly as the projection onto \(\operatorname{col}(X)\).

A common mistake is to treat an added predictor as though its raw column were automatically the new orthogonal direction. In the three-dimensional example, projecting \(y\) directly onto \(z\) gives squared length \((y'z)^2/(z'z)=25/2\), not the correct increment \(32/3\). The raw column overlaps the smaller model space. The correct direction is its residual after projection onto that space, \(w=(I-P_0)z\).

The rank \(r=\dim(S_1)-\dim(S_0)\) is the number of independent directions added, not necessarily the number of columns appended to a design matrix. This distinction matters when columns are redundant or when an added column already belongs to the smaller space. If \(r=0\), the spaces are equal, \(P_1-P_0=0\), and the added sum of squares is zero for every \(y\).

Key takeaway: For nested model spaces, the added sum of squares is \(y'(P_1-P_0)y\), the squared projection of \(y\) onto the orthogonal increment \(S_1\cap S_0^\perp\). It equals the reduction in residual sum of squares, and its degrees of freedom are the dimension of that increment.

Check Your Understanding

Answer each question using the projection geometry developed here.

  1. Why is \(P_1-P_0\) a projection matrix when \(S_0\subseteq S_1\)?
  2. How can the added sum of squares be computed from the two residual sums of squares?
  3. If the larger model adds a column that already lies in \(S_0\), what are the rank and sum of squares of the increment?
  4. Under \(y\sim N(\mu,\sigma^2 I)\), what condition makes the added sum of squares have a central chi-square distribution after division by \(\sigma^2\)?
  5. Why must a new predictor be residualized against the smaller model space before using it as an orthogonal increment direction?
Clinical Biostats