Multiple Linear Regression in Matrix Form: Orthogonal Projections, Hat Matrix & Partial Correlations
Matrix formulation of the general linear model Y = X beta + epsilon, rank conditions, and normal equations (X^T X) beta_hat = X^T Y; Geometric interpretation of OLS: column space Col(X), orthogonal projection matrix (Hat matrix) H = X(X^T X)^(-1)X^T, and idempotency of H and I - H; Expectation vector E[beta_hat] = beta, variance-covariance matrix Var(beta_hat) = sigma^2 (X^T X)^(-1), and Matrix Gauss-Markov Theorem (Loewner positive semi-definite ordering); Quadratic forms of normal random vectors, Cochran's Theorem, independence of beta_hat and SSE, and unbiasedness of s^2 = Y^T(I - H)Y / (n - p); Frisch-Waugh-Lovell (FWL) Theorem, partial regression coefficients, sequential (Type I) vs partial (Type III) sums of squares, partial R^2, and adjusted R_a^2.
§2.1 Matrix Formulation of the General Linear Model, Rank Conditions, and Normal Equations
In observational econometrics, agronomy, clinical biostatistics, and industrial experimentation, a response variable $Y$ is almost always governed by several simultaneous explanatory variables $X_1, X_2, \dots, X_k$. Omitting relevant covariates that are correlated with the included predictors induces omitted-variable bias, whereas incorporating them explicitly allows the analyst to isolate the partial effect of each regressor while holding all other covariates constant. Suppose we observe $n$ experimental units, where unit $i$ yields a continuous response $Y_i$ along with $k$ predictor measurements $(x_{i1}, x_{i2}, \dots, x_{ik})$. The Multiple Linear Regression Model with an intercept $\beta_0$ and $k$ slope parameters $(\beta_1, \dots, \beta_k)$ is written for each unit $i = 1, 2, \dots, n$ as:
Setting $p = k + 1$ to denote the total number of regression parameters (including the intercept $\beta_0$, which is associated with a constant dummy predictor $x_{i0} \equiv 1$), we assemble all $n$ equations compactly into a single matrix equation:
where the constituent vectors and matrices have dimensions:
Here, $\mathbf{Y}$ is the $n \times 1$ observable response vector, $\mathbf{X} = [\mathbf{1}_n, \mathbf{x}_{(1)}, \dots, \mathbf{x}_{(k)}]$ is the $n \times p$ model (or design) matrix whose rows are $\mathbf{x}_i^T = (1, x_{i1}, \dots, x_{ik})$, $\boldsymbol{\beta}$ is the $p \times 1$ vector of unknown population regression parameters, and $\boldsymbol{\varepsilon}$ is the $n \times 1$ unobservable random disturbance vector.
The classical matrix Gauss–Markov assumptions state that:
1. Expectation Specification: $\mathbb{E}[\boldsymbol{\varepsilon} \mid \mathbf{X}] = \mathbf{0}_n$, which implies $\mathbb{E}[\mathbf{Y} \mid \mathbf{X}] = \mathbf{X}\boldsymbol{\beta}$.
2. Spherical Error Covariance: $\text{Cov}(\boldsymbol{\varepsilon} \mid \mathbf{X}) = \mathbb{E}[\boldsymbol{\varepsilon}\boldsymbol{\varepsilon}^T \mid \mathbf{X}] = \sigma^2 \mathbf{I}_n$, where $\mathbf{I}_n$ is the $n \times n$ identity matrix and $\sigma^2 > 0$ is the common error variance. Consequently, $\text{Cov}(\mathbf{Y} \mid \mathbf{X}) = \sigma^2 \mathbf{I}_n$.
3. Full Column Rank Condition: The design matrix $\mathbf{X}$ has full column rank:
The full column rank condition $\text{rank}(\mathbf{X}) = p$ has a clear algebraic and empirical meaning: the $p$ column vectors of $\mathbf{X}$ are linearly independent in $\mathbb{R}^n$, meaning no predictor column can be written as an exact linear combination of the remaining columns (no exact multicollinearity), and the sample size $n$ is at least as large as the number of parameters $p$. Under $\text{rank}(\mathbf{X}) = p$, the $p \times p$ symmetric Gram (cross-product) matrix $\mathbf{X}^T\mathbf{X}$ is strictly positive definite, because for any non-zero vector $\mathbf{v} \in \mathbb{R}^p \setminus \{\mathbf{0}\}$, we have $\mathbf{X}\mathbf{v} \neq \mathbf{0}$ and therefore:
Since every positive definite matrix is nonsingular, the inverse matrix $(\mathbf{X}^T\mathbf{X})^{-1}$ exists uniquely and is itself symmetric and positive definite.
To derive the Ordinary Least Squares estimator $\hat{\boldsymbol{\beta}}$, we minimize the sum of squared residuals $Q(\mathbf{b})$ over all candidate parameter vectors $\mathbf{b} \in \mathbb{R}^p$:
where we used the scalar transpose identity $\mathbf{Y}^T \mathbf{X} \mathbf{b} = (\mathbf{Y}^T \mathbf{X} \mathbf{b})^T = \mathbf{b}^T \mathbf{X}^T \mathbf{Y}$. Using standard rules of vector calculus ($\nabla_{\mathbf{b}}(\mathbf{b}^T \mathbf{a}) = \mathbf{a}$ and $\nabla_{\mathbf{b}}(\mathbf{b}^T \mathbf{A} \mathbf{b}) = 2 \mathbf{A}\mathbf{b}$ for symmetric $\mathbf{A}$), we differentiate $Q(\mathbf{b})$ with respect to $\mathbf{b}$ and set the gradient vector equal to $\mathbf{0}_p$:
Replacing $\mathbf{b}$ by $\hat{\boldsymbol{\beta}}$ yields the Matrix Normal Equations:
Premultiplying both sides by $(\mathbf{X}^T\mathbf{X})^{-1}$ produces the unique closed-form Ordinary Least Squares Estimator:
Furthermore, the Hessian matrix of second derivatives is $\nabla_{\mathbf{b}}^2 Q(\mathbf{b}) = 2 \mathbf{X}^T\mathbf{X}$, which is strictly positive definite, confirming that $\hat{\boldsymbol{\beta}}$ is the unique global minimizer of $Q(\mathbf{b})$. Alternatively, without using calculus, one can complete the square algebraically for any $\mathbf{b} \in \mathbb{R}^p$:
because the cross-term $2(\hat{\boldsymbol{\beta}} - \mathbf{b})^T \mathbf{X}^T (\mathbf{Y} - \mathbf{X}\hat{\boldsymbol{\beta}}) = 2(\hat{\boldsymbol{\beta}} - \mathbf{b})^T (\mathbf{X}^T\mathbf{Y} - \mathbf{X}^T\mathbf{X}\hat{\boldsymbol{\beta}}) = 0$ vanishes by the normal equations. Since $\mathbf{X}^T\mathbf{X}$ is positive definite, the second term is strictly positive whenever $\mathbf{b} \neq \hat{\boldsymbol{\beta}}$ and equals zero uniquely at $\mathbf{b} = \hat{\boldsymbol{\beta}}$.
Numerical Linear Algebra of Normal Equations: Cholesky vs QR Factorization
Although the closed-form matrix expression writes the Ordinary Least Squares estimator in terms of the explicit inverse of the cross-product Gram matrix, computational statisticians never invert the Gram matrix directly in finite-precision floating-point arithmetic. Forming the cross-product matrix squares the spectral condition number of the design matrix, which doubles the loss of significant digits when predictors are moderately correlated. Instead, statistical computing environments such as R and Python's SciPy library solve the least-squares problem either by computing the Cholesky factorization of the positive-definite Gram matrix or, far more stably, by applying an orthogonal-triangular QR factorization directly to the design matrix itself. Expressing the design matrix as the product of an column-orthonormal matrix and an upper-triangular matrix reduces the normal equations to an upper-triangular linear system that can be solved rapidly and accurately by back-substitution without ever forming the cross-product matrix.
§2.2 Geometric Interpretation of OLS: Column Space, Orthogonal Projection, and the Hat Matrix
| Property | Projection Matrix $\mathbf{H} = \mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T$ | Residual Matrix $\mathbf{M} = \mathbf{I}_n - \mathbf{H}$ |
|---|---|---|
| 1. Symmetry | $\mathbf{H}^T = \mathbf{H}$ | $\mathbf{M}^T = \mathbf{M}$ |
| 2. Idempotency | $\mathbf{H}^2 = \mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1}(\mathbf{X}^T\mathbf{X})(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T = \mathbf{H}$ | $\mathbf{M}^2 = (\mathbf{I}_n - \mathbf{H})^2 = \mathbf{I}_n - 2\mathbf{H} + \mathbf{H}^2 = \mathbf{M}$ |
| 3. Action on $\mathbf{X}$ | $\mathbf{H}\mathbf{X} = \mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1}(\mathbf{X}^T\mathbf{X}) = \mathbf{X}$ (leaves $\mathcal{C}(\mathbf{X})$ invariant) | $\mathbf{M}\mathbf{X} = (\mathbf{I}_n - \mathbf{H})\mathbf{X} = \mathbf{X} - \mathbf{X} = \mathbf{0}_{n \times p}$ (annihilates $\mathbf{X}$) |
| 4. Mutual Orthogonality | $\mathbf{H}\mathbf{M} = \mathbf{H}(\mathbf{I}_n - \mathbf{H}) = \mathbf{H} - \mathbf{H}^2 = \mathbf{0}_{n \times n}$ | $\mathbf{M}\mathbf{H} = \mathbf{0}_{n \times n}$ and $\hat{\mathbf{Y}}^T \mathbf{e} = \mathbf{Y}^T \mathbf{H}\mathbf{M} \mathbf{Y} = 0$ |
| 5. Trace and Rank | $\text{tr}(\mathbf{H}) = \text{tr}(\mathbf{X}^T\mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1}) = \text{tr}(\mathbf{I}_p) = p = \text{rank}(\mathbf{H})$ | $\text{tr}(\mathbf{M}) = n - \text{tr}(\mathbf{H}) = n - p = \text{rank}(\mathbf{M})$ |
| 6. Eigenvalues | $p$ eigenvalues equal to $1$, and $n - p$ eigenvalues equal to $0$ | $n - p$ eigenvalues equal to $1$, and $p$ eigenvalues equal to $0$ |
§2.3 Expectation, Variance-Covariance Matrix, and the Matrix Gauss-Markov Theorem
Using the matrix representation $\hat{\boldsymbol{\beta}} = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{Y}$, we now establish the exact finite-sample expectation vector, variance-covariance matrix, and Gauss–Markov optimality of $\hat{\boldsymbol{\beta}}$ in the general multiple regression model. Substituting $\mathbf{Y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\varepsilon}$ into $\hat{\boldsymbol{\beta}}$ gives the fundamental decomposition:
Taking expectations conditionally on $\mathbf{X}$ under $\mathbb{E}[\boldsymbol{\varepsilon}] = \mathbf{0}_n$ establishes exact unbiasedness:
Next, let $\mathbf{A} = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T \in \mathbb{R}^{p \times n}$ so that $\hat{\boldsymbol{\beta}} - \boldsymbol{\beta} = \mathbf{A}\boldsymbol{\varepsilon}$. Under the spherical error covariance assumption $\text{Cov}(\boldsymbol{\varepsilon}) = \mathbb{E}[\boldsymbol{\varepsilon}\boldsymbol{\varepsilon}^T] = \sigma^2 \mathbf{I}_n$, the $p \times p$ variance-covariance matrix of $\hat{\boldsymbol{\beta}}$ is:
The $j$-th diagonal element of $\sigma^2(\mathbf{X}^T\mathbf{X})^{-1}$ is the sampling variance $\text{Var}(\hat{\beta}_j) = \sigma^2 [(\mathbf{X}^T\mathbf{X})^{-1}]_{jj}$, and the $(j, m)$-th off-diagonal element is the covariance $\text{Cov}(\hat{\beta}_j, \hat{\beta}_m) = \sigma^2 [(\mathbf{X}^T\mathbf{X})^{-1}]_{jm}$.
To compare two $p \times p$ covariance matrices in multiple dimensions, mathematical statistics employs the Loewner Partial Ordering of symmetric matrices: for two $p \times p$ symmetric matrices $\mathbf{V}_1$ and $\mathbf{V}_2$, we write $\mathbf{V}_1 \succeq \mathbf{V}_2$ if and only if the difference matrix $\boldsymbol{\Delta} = \mathbf{V}_1 - \mathbf{V}_2$ is positive semi-definite (PSD), meaning $\mathbf{c}^T (\mathbf{V}_1 - \mathbf{V}_2) \mathbf{c} \ge 0$ for all vectors $\mathbf{c} \in \mathbb{R}^p$.
Theorem 2.1 (The Matrix Gauss–Markov Theorem)
Under the linear model $\mathbf{Y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\varepsilon}$ with $\mathbb{E}[\boldsymbol{\varepsilon}] = \mathbf{0}_n$, $\text{Cov}(\boldsymbol{\varepsilon}) = \sigma^2 \mathbf{I}_n$, and $\text{rank}(\mathbf{X}) = p$, let $\tilde{\boldsymbol{\beta}} = \mathbf{C}\mathbf{Y}$ be any competing linear unbiased estimator of $\boldsymbol{\beta}$, where $\mathbf{C} \in \mathbb{R}^{p \times n}$ is a deterministic matrix. Then the covariance matrix of $\tilde{\boldsymbol{\beta}}$ exceeds the covariance matrix of the OLS estimator $\hat{\boldsymbol{\beta}}$ by a positive semi-definite matrix:
Equivalently, for every vector $\mathbf{c} \in \mathbb{R}^p$, the scalar linear combination $\mathbf{c}^T \hat{\boldsymbol{\beta}}$ is the unique Best Linear Unbiased Estimator (BLUE) of $\mathbf{c}^T \boldsymbol{\beta}$:
with equality for all $\mathbf{c} \in \mathbb{R}^p$ if and only if $\mathbf{C} = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T$, i.e., $\tilde{\boldsymbol{\beta}} = \hat{\boldsymbol{\beta}}$.
Complete Matrix Proof:
Let $\tilde{\boldsymbol{\beta}} = \mathbf{C}\mathbf{Y}$. For $\tilde{\boldsymbol{\beta}}$ to be unbiased for $\boldsymbol{\beta}$ across all $\boldsymbol{\beta} \in \mathbb{R}^p$, we require:
Define the discrepancy matrix $\mathbf{D} = \mathbf{C} - (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T \in \mathbb{R}^{p \times n}$, so that $\mathbf{C} = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T + \mathbf{D}$. Multiplying $\mathbf{D}$ on the right by $\mathbf{X}$ and applying the unbiasedness condition $\mathbf{C}\mathbf{X} = \mathbf{I}_p$ reveals the matrix orthogonality relation:
Now compute the covariance matrix of $\tilde{\boldsymbol{\beta}} = \mathbf{C}\mathbf{Y}$:
Expanding the four matrix products and observing that the two cross-terms $(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{D}^T = (\mathbf{D}\mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1})^T = \mathbf{0}_{p \times p}$ and $\mathbf{D}\mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1} = \mathbf{0}_{p \times p}$ vanish identically because $\mathbf{D}\mathbf{X} = \mathbf{0}_{p \times p}$, we obtain:
For any arbitrary vector $\mathbf{c} \in \mathbb{R}^p$, the variance of $\mathbf{c}^T \tilde{\boldsymbol{\beta}}$ is:
Because $\|\mathbf{D}^T\mathbf{c}\|_2^2 \ge 0$, the matrix $\sigma^2 \mathbf{D}\mathbf{D}^T$ is positive semi-definite, and vanishes for all $\mathbf{c}$ if and only if $\mathbf{D} = \mathbf{0}_{p \times n}$. Consequently, $\hat{\boldsymbol{\beta}}$ simultaneously minimizes the individual variance $\text{Var}(\hat{\beta}_j)$ of every coordinate, the trace $\text{tr}(\text{Cov}(\tilde{\boldsymbol{\beta}}))$, and the generalized variance $\det(\text{Cov}(\tilde{\boldsymbol{\beta}}))$.
Geometric and Decision-Theoretic Meaning of the Loewner Positive Semi-Definite Ordering
The Matrix Gauss–Markov Theorem elevates optimality from a scalar variance inequality to a matrix ordering in the space of symmetric positive semi-definite matrices. Because the difference between the covariance matrix of any competing linear unbiased estimator and the covariance matrix of the Ordinary Least Squares estimator is positive semi-definite, three powerful consequences follow simultaneously. First, every diagonal element of the difference matrix is non-negative, which guarantees that each individual partial regression coefficient is estimated with minimum variance. Second, for any linear combination of the parameters—such as a predicted mean response at an arbitrary covariate vector or a contrast between two treatment slopes—the plug-in least-squares estimator achieves the smallest possible sampling variance. Third, under multivariate normal disturbances, the concentration ellipsoid of the Ordinary Least Squares estimator is strictly contained inside the concentration ellipsoid of any other linear unbiased estimator for every probability level.
Moreover, the positive semi-definite matrix ordering established by the Matrix Gauss–Markov Theorem directly implies that the generalized variance (the determinant of the variance-covariance matrix) and the total variance (the trace of the variance-covariance matrix) are simultaneously minimized by the Ordinary Least Squares estimator across the entire class of linear unbiased estimators. Consequently, whether an investigator evaluates estimation precision via D-optimality (minimizing the determinant of the covariance matrix) or A-optimality (minimizing the trace of the covariance matrix), no linear unbiased competitor can outperform Ordinary Least Squares when the disturbances are homoscedastic and mutually uncorrelated.
§2.4 Quadratic Forms of Normal Vectors, Cochran's Theorem, and Distribution of SSE
To derive the exact expectation and sampling distribution of the Residual Sum of Squares $\text{SSE} = \mathbf{e}^T\mathbf{e}$ in multiple linear regression, we express sums of squares as quadratic forms $\mathbf{Y}^T \mathbf{A} \mathbf{Y}$ where $\mathbf{A} \in \mathbb{R}^{n \times n}$ is a symmetric matrix.
First, let us establish the distribution-free Trace Formula for the Expectation of a Quadratic Form: if $\mathbf{Y}$ is any random vector with mean $\mathbb{E}[\mathbf{Y}] = \boldsymbol{\mu}$ and covariance matrix $\text{Cov}(\mathbf{Y}) = \boldsymbol{\Sigma}$, and $\mathbf{A}$ is any symmetric $n \times n$ matrix, then because $\mathbf{Y}^T \mathbf{A} \mathbf{Y}$ is a $1 \times 1$ scalar equal to its own trace and the trace operator is cyclic ($\text{tr}(\mathbf{U}\mathbf{V}) = \text{tr}(\mathbf{V}\mathbf{U})$):
Let us apply this powerful identity directly to the Residual Sum of Squares $\text{SSE} = \mathbf{e}^T\mathbf{e}$. Since $\mathbf{e} = (\mathbf{I}_n - \mathbf{H})\mathbf{Y} = \mathbf{M}\mathbf{Y}$ and $\mathbf{M}$ is symmetric and idempotent ($\mathbf{M}^T\mathbf{M} = \mathbf{M}^2 = \mathbf{M}$):
where the last equality holds because $(\mathbf{I}_n - \mathbf{H})\mathbf{X} = \mathbf{0}_{n \times p}$. Applying the trace formula to $\text{SSE} = \boldsymbol{\varepsilon}^T (\mathbf{I}_n - \mathbf{H}) \boldsymbol{\varepsilon}$ with $\mathbb{E}[\boldsymbol{\varepsilon}] = \mathbf{0}_n$ and $\boldsymbol{\Sigma} = \sigma^2 \mathbf{I}_n$:
Using the cyclic trace property on $\mathbf{H} = \mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T$, we have:
Therefore, $\mathbb{E}[\text{SSE}] = (n - p)\sigma^2$, which proves that dividing $\text{SSE}$ by $n - p = n - k - 1$ degrees of freedom yields an unbiased estimator of $\sigma^2$:
Now suppose we invoke the normality assumption $\boldsymbol{\varepsilon} \sim \mathcal{N}_n(\mathbf{0}_n, \sigma^2 \mathbf{I}_n)$, so $\mathbf{Y} \sim \mathcal{N}_n(\mathbf{X}\boldsymbol{\beta}, \sigma^2 \mathbf{I}_n)$. Three foundational distribution theorems for normal vectors and symmetric idempotent matrices govern exact inference:
1. Idempotent Quadratic Form Chi-Square Theorem: Because $\mathbf{M} = \mathbf{I}_n - \mathbf{H}$ is symmetric and idempotent of rank $n - p$, its spectral decomposition is $\mathbf{M} = \mathbf{Q} \boldsymbol{\Lambda} \mathbf{Q}^T$, where $\mathbf{Q} \in \mathbb{R}^{n \times n}$ is orthogonal ($\mathbf{Q}^T\mathbf{Q} = \mathbf{I}_n$) and $\boldsymbol{\Lambda} = \text{diag}(1, \dots, 1, 0, \dots, 0)$ has $n - p$ ones and $p$ zeros on the diagonal. Define the rotated standard normal vector $\mathbf{Z} = \frac{1}{\sigma} \mathbf{Q}^T \boldsymbol{\varepsilon} \sim \mathcal{N}_n(\mathbf{0}_n, \mathbf{I}_n)$. Then:
Consequently, $\text{Var}(s^2) = \frac{\sigma^4}{(n-p)^2} \text{Var}(\chi_{n-p}^2) = \frac{2\sigma^4}{n - p}$.
2. Statistical Independence of $\hat{\boldsymbol{\beta}}$ and $\text{SSE}$ (Craig–Sakamoto Lemma): Both $\hat{\boldsymbol{\beta}} = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{Y}$ and the residual vector $\mathbf{e} = (\mathbf{I}_n - \mathbf{H})\mathbf{Y}$ are linear transformations of the multivariate normal vector $\mathbf{Y}$. Their $p \times n$ cross-covariance matrix is:
Because jointly normal vectors with zero cross-covariance are statistically independent, $\hat{\boldsymbol{\beta}}$ is completely independent of $\mathbf{e}$, and hence independent of $s^2 = \mathbf{e}^T\mathbf{e} / (n - p)$!
3. Cochran's Theorem on Partitioning Quadratic Forms: Let $\mathbf{I}_n - \frac{1}{n}\mathbf{J}_n$ be the centering matrix (where $\mathbf{J}_n = \mathbf{1}_n \mathbf{1}_n^T$ is the $n \times n$ matrix of ones). Then the ANOVA identity $\text{SST} = \text{SSR} + \text{SSE}$ corresponds to the algebraic matrix decomposition:
Because each of the three matrices on the right is symmetric and idempotent, their product $\left(\mathbf{H} - \frac{1}{n}\mathbf{J}_n\right)(\mathbf{I}_n - \mathbf{H}) = \mathbf{0}_{n \times n}$ vanishes, and their ranks sum to $(p - 1) + (n - p) = n - 1$, Cochran's Theorem guarantees that $\text{SSR} = \mathbf{Y}^T(\mathbf{H} - \frac{1}{n}\mathbf{J}_n)\mathbf{Y}$ and $\text{SSE} = \mathbf{Y}^T(\mathbf{I}_n - \mathbf{H})\mathbf{Y}$ are statistically independent, and under the global null hypothesis $H_0: \beta_1 = \dots = \beta_k = 0$, $\text{SSR}/\sigma^2 \sim \chi_k^2$.
Role of Cochran's Theorem in Partitioning Degrees of Freedom Across Subspaces
Cochran's Theorem serves as the rigorous mathematical bridge between linear algebra and chi-square distribution theory in linear models. Whenever the identity matrix (or a symmetric idempotent projection matrix) is decomposed into a sum of symmetric matrices whose ranks add up to the rank of the sum, those constituent matrices are automatically idempotent and pairwise mutually orthogonal. In the context of multiple linear regression, the total corrected sum of squares projects the response vector onto the $(n-1)$-dimensional subspace orthogonal to the constant vector of ones. This subspace splits orthogonally into the $k$-dimensional regression subspace spanned by the centered predictors and the $(n-p)$-dimensional residual subspace orthogonal to all columns of the design matrix. Because the corresponding projection matrices multiply to the zero matrix, the regression sum of squares and the residual sum of squares are statistically independent quadratic forms under Gaussian errors, justifying the exact central $F$-distribution of the analysis-of-variance test statistic.
Furthermore, the trace identity for the expectation of a quadratic form demonstrates that the unbiasedness of the residual mean square does not depend on the normality assumption. Even when the disturbances follow a skewed or heavy-tailed distribution, so long as they have zero conditional mean and spherical covariance matrix, the expected value of the residual sum of squares equals the trace of the residual-maker matrix multiplied by the error variance, which is strictly $(n-p)\sigma^2$. Gaussianity is invoked only when we move from first-moment unbiasedness to the exact chi-square distribution and exact statistical independence between the least-squares coefficient vector and the residual sum of squares.
§2.5 The Frisch-Waugh-Lovell (FWL) Theorem and Partial Regression Coefficients
What is the exact algebraic meaning of a single partial regression coefficient $\hat{\beta}_j$ inside a multiple linear regression model when the predictors are mutually correlated? The definitive answer is provided by the Frisch–Waugh–Lovell (FWL) Theorem (originally established by Ragnar Frisch and Frederick Waugh in 1933 for time-series detrending and generalized by Michael Lovell in 1963 to arbitrary partitioned regressions).
Partition the $n \times p$ full-rank design matrix $\mathbf{X}$ and the $p \times 1$ parameter vector $\boldsymbol{\beta}$ into two blocks of columns, $\mathbf{X} = [\mathbf{X}_1, \mathbf{X}_2]$ and $\boldsymbol{\beta} = (\boldsymbol{\beta}_1^T, \boldsymbol{\beta}_2^T)^T$, where $\mathbf{X}_1 \in \mathbb{R}^{n \times p_1}$ represents $p_1$ baseline covariates (such as an intercept and control variables) and $\mathbf{X}_2 \in \mathbb{R}^{n \times p_2}$ represents $p_2$ predictors of primary interest ($p_1 + p_2 = p$). The partitioned linear model and its partitioned OLS normal equations $(\mathbf{X}^T\mathbf{X})\hat{\boldsymbol{\beta}} = \mathbf{X}^T\mathbf{Y}$ are:
Let $\mathbf{H}_1 = \mathbf{X}_1(\mathbf{X}_1^T\mathbf{X}_1)^{-1}\mathbf{X}_1^T$ denote the orthogonal projection matrix onto $\mathcal{C}(\mathbf{X}_1)$, and let $\mathbf{M}_1 = \mathbf{I}_n - \mathbf{H}_1$ denote the residual-maker matrix that sweeps out (partials out) the linear influence of $\mathbf{X}_1$.
Theorem 2.2 (The Frisch–Waugh–Lovell Theorem)
In the partitioned OLS regression $\mathbf{Y} = \mathbf{X}_1 \hat{\boldsymbol{\beta}}_1 + \mathbf{X}_2 \hat{\boldsymbol{\beta}}_2 + \mathbf{e}$:
- The subvector estimator $\hat{\boldsymbol{\beta}}_2$ obtained from the full multiple regression is algebraically identical to the estimator obtained by first regressing both $\mathbf{Y}$ and $\mathbf{X}_2$ on $\mathbf{X}_1$, extracting their residualized counterparts $\tilde{\mathbf{Y}} = \mathbf{M}_1 \mathbf{Y}$ and $\tilde{\mathbf{X}}_2 = \mathbf{M}_1 \mathbf{X}_2$, and then regressing $\tilde{\mathbf{Y}}$ on $\tilde{\mathbf{X}}_2$:
- Furthermore, the residual vector $\tilde{\mathbf{e}}$ from the residualized regression of $\tilde{\mathbf{Y}}$ on $\tilde{\mathbf{X}}_2$ is identically equal to the residual vector $\mathbf{e} = (\mathbf{I}_n - \mathbf{H})\mathbf{Y}$ of the full multiple regression:
Proof via Block Gaussian Elimination:
From the first block of normal equations, $\mathbf{X}_1^T \mathbf{X}_1 \hat{\boldsymbol{\beta}}_1 + \mathbf{X}_1^T \mathbf{X}_2 \hat{\boldsymbol{\beta}}_2 = \mathbf{X}_1^T \mathbf{Y}$. Premultiplying by $(\mathbf{X}_1^T\mathbf{X}_1)^{-1}$ expresses $\hat{\boldsymbol{\beta}}_1$ in terms of $\hat{\boldsymbol{\beta}}_2$:
Substituting this expression for $\hat{\boldsymbol{\beta}}_1$ into the second block of normal equations $\mathbf{X}_2^T \mathbf{X}_1 \hat{\boldsymbol{\beta}}_1 + \mathbf{X}_2^T \mathbf{X}_2 \hat{\boldsymbol{\beta}}_2 = \mathbf{X}_2^T \mathbf{Y}$ yields:
Recognizing $\mathbf{H}_1 = \mathbf{X}_1(\mathbf{X}_1^T\mathbf{X}_1)^{-1}\mathbf{X}_1^T$ and collecting terms in $\hat{\boldsymbol{\beta}}_2$:
Because $\mathbf{M}_1$ is symmetric and idempotent ($\mathbf{M}_1 = \mathbf{M}_1^T \mathbf{M}_1$), we have $\mathbf{X}_2^T \mathbf{M}_1 \mathbf{X}_2 = (\mathbf{M}_1\mathbf{X}_2)^T(\mathbf{M}_1\mathbf{X}_2) = \tilde{\mathbf{X}}_2^T \tilde{\mathbf{X}}_2$ and $\mathbf{X}_2^T \mathbf{M}_1 \mathbf{Y} = \tilde{\mathbf{X}}_2^T \tilde{\mathbf{Y}}$. Moreover, substituting $\hat{\boldsymbol{\beta}}_1$ into the full residual vector $\mathbf{e} = \mathbf{Y} - \mathbf{X}_1\hat{\boldsymbol{\beta}}_1 - \mathbf{X}_2\hat{\boldsymbol{\beta}}_2$ gives:
Three Immediate Corollaries of the FWL Theorem:
1. Centering the Design Matrix: Take $\mathbf{X}_1 = \mathbf{1}_n$ (the intercept column). Then $\mathbf{M}_1 = \mathbf{I}_n - \frac{1}{n}\mathbf{1}_n\mathbf{1}_n^T$ centers every variable by subtracting its sample mean! Thus, the $k \times 1$ slope vector $\hat{\boldsymbol{\beta}}_{\text{slopes}}$ is given by $\hat{\boldsymbol{\beta}}_{\text{slopes}} = (\mathbf{X}_c^T \mathbf{X}_c)^{-1} \mathbf{X}_c^T \mathbf{y}_c$, where $\mathbf{X}_c$ is the $n \times k$ mean-centered predictor matrix.
2. Interpretation of Individual Partial Slopes $\hat{\beta}_j$: Taking $\mathbf{X}_2 = \mathbf{x}_{(j)}$ (a single predictor column) and $\mathbf{X}_1 = \mathbf{X}_{(-j)}$ (all other $p - 1$ columns), the scalar slope $\hat{\beta}_j$ is simply the bivariate OLS slope of $\mathbf{Y}$ (or $\tilde{\mathbf{Y}}_{(-j)}$) on the residual vector $\mathbf{e}_{j \mid (-j)} = \mathbf{M}_{(-j)} \mathbf{x}_{(j)}$:
That is, $\hat{\beta}_j$ measures the linear effect of the unique variation in $X_j$ that is orthogonal to all other predictors!
3. Orthogonal Predictors: If $\mathbf{X}_1^T \mathbf{X}_2 = \mathbf{0}_{p_1 \times p_2}$ (so the two predictor blocks are mutually orthogonal, as in balanced factorial designs), then $\mathbf{M}_1 \mathbf{X}_2 = \mathbf{X}_2$, and $\hat{\boldsymbol{\beta}}_2 = (\mathbf{X}_2^T\mathbf{X}_2)^{-1}\mathbf{X}_2^T\mathbf{Y}$ is completely unaffected by whether $\mathbf{X}_1$ is included or omitted.
Methodological Significance of the Frisch-Waugh-Lovell Theorem in Econometrics and Data Science
The Frisch–Waugh–Lovell Theorem is one of the most celebrated results in statistical methodology because it demystifies what "controlling for" or "holding constant" a set of covariates actually accomplishes algebraically. When an econometrician includes seasonal indicator variables or a linear time trend alongside economic regressors in a single multiple regression, the Frisch–Waugh–Lovell Theorem guarantees that the estimated slopes on the economic regressors are identical to those obtained by first deseasonalizing and detrending both the response series and each regressor series via Ordinary Least Squares and then regressing the detrended response on the detrended predictors. Similarly, in high-dimensional fixed-effects panel data regressions containing thousands of individual or firm-level dummy variables, inverting the full Gram matrix directly would be computationally prohibitive; applying the Frisch–Waugh–Lovell annihilator matrix sweeps out the group means in linear time ("within-group demeaning"), allowing exact estimation of the structural slope parameters.
§2.6 Sequential (Type I) vs Partial (Type III) Sums of Squares, Partial Correlations, and Adjusted R-Squared
In simple linear regression, there is only one explanatory variable, so the Regression Sum of Squares $\text{SSR}$ unambiguously belongs to $X_1$. In multiple linear regression with correlated predictors ($X_1, \dots, X_k$), the total explained sum of squares $\text{SSR}(X_1, \dots, X_k) = \hat{\boldsymbol{\beta}}^T \mathbf{X}^T \mathbf{Y} - n\bar{Y}^2$ cannot be decomposed into unique, order-independent additive components for each individual variable unless the predictors are mutually orthogonal. Instead, statistical theory defines Extra Sums of Squares that measure the marginal reduction in $\text{SSE}$ (or equivalent increase in $\text{SSR}$) when a subset of predictors is added to an existing baseline model:
By the Frisch–Waugh–Lovell Theorem and the orthogonal decomposition of projections $\mathcal{C}(\mathbf{X}_1, \mathbf{X}_2) = \mathcal{C}(\mathbf{X}_1) \oplus \mathcal{C}(\mathbf{M}_1 \mathbf{X}_2)$, the projection matrix of the full model decomposes additively as $\mathbf{H} = \mathbf{H}_1 + \mathbf{P}_{\tilde{\mathbf{X}}_2}$, where $\mathbf{P}_{\tilde{\mathbf{X}}_2} = \mathbf{M}_1\mathbf{X}_2(\mathbf{X}_2^T\mathbf{M}_1\mathbf{X}_2)^{-1}\mathbf{X}_2^T\mathbf{M}_1$, and the extra sum of squares is the quadratic form:
This distinction generates two primary sum-of-squares conventions reported in statistical software (such as R's anova() vs car::Anova() and SAS):
1. Sequential (Type I) Sums of Squares: Predictors are entered in a specified sequential order $X_1, X_2, \dots, X_k$. The sequential sums of squares partition the total model $\text{SSR}$ additively:
Type I sums of squares always add up to $\text{SSR}(X_1, \dots, X_k)$, but their values depend critically on the order in which the variables are listed!
2. Partial / Marginal (Type III) Sums of Squares: For each variable $X_j$, the Type III sum of squares $\text{SSR}(X_j \mid X_1, \dots, X_{j-1}, X_{j+1}, \dots, X_k)$ measures the marginal reduction in $\text{SSE}$ when $X_j$ is entered last into the model containing all other $k - 1$ predictors. Type III sums of squares are invariant to variable ordering and correspond directly to the individual partial $t$-tests ($F_j = \text{SSR}(X_j \mid \mathbf{X}_{(-j)}) / s^2 = t_j^2$), but they do not sum to $\text{SSR}(X_1, \dots, X_k)$ when predictors are correlated.
Coefficient of Partial Determination and Adjusted $R_a^2$
The Coefficient of Partial Determination $R_{Y j \cdot (-j)}^2$ measures the proportional reduction in the unexplained sum of squares $\text{SSE}(\mathbf{X}_{(-j)})$ achieved by adding predictor $X_j$ to a model that already contains all other covariates $\mathbf{X}_{(-j)}$:
Taking the signed square root (matching the sign of $\hat{\beta}_j$) gives the partial correlation coefficient $r_{Y j \cdot (-j)}$, which is identically the simple correlation between the FWL residuals $\mathbf{e}_{Y \mid (-j)}$ and $\mathbf{e}_{j \mid (-j)}$.
Finally, in multiple regression, the ordinary Coefficient of Multiple Determination $R^2 = 1 - \text{SSE}/\text{SST}$ is a monotonically non-decreasing function of the number of predictors $k$: adding any arbitrary noise variable $X_{k+1}$ cannot increase the minimized residual sum of squares $\text{SSE}$, so $R^2$ never decreases even when useless predictors are added. To penalize superfluous parameters, Henri Theil introduced the Adjusted Coefficient of Determination, $R_a^2$ (or $\bar{R}^2$), which replaces $\text{SSE}$ and $\text{SST}$ by their unbiased variance estimators $\text{MSE} = \text{SSE}/(n - p)$ and $\text{MST} = \text{SST}/(n - 1)$:
Algebraically, adding a single new predictor $X_j$ increases $R_a^2$ if and only if its partial $F$-statistic exceeds $1$ ($F_j = t_j^2 > 1$, or $|t_j| > 1$), because only when $F_j > 1$ does the reduction in $\text{SSE}$ more than compensate for the loss of one error degree of freedom.
Reconciling Sequential (Type I) and Marginal (Type III) Sums of Squares in Applied Modeling
Understanding why Sequential (Type I) and Partial (Type III) sums of squares differ when predictors are correlated prevents serious misinterpretations in applied data analysis. When two explanatory variables share substantial overlapping variation, the variable entered first in a Sequential (Type I) decomposition is credited with the entire shared variation in addition to its own unique variation, whereas the variable entered second is credited only with its incremental contribution beyond the first variable. Consequently, Type I tests are ideal when variables possess a natural hierarchical or causal ordering—such as polynomial powers where the linear term must precede the quadratic term, or nuisance baseline covariates that must be adjusted for prior to testing experimental treatments. Conversely, Type III partial sums of squares treat all predictors symmetrically by evaluating each variable as if it were entered last, making Type III tests the standard choice for assessing whether any single predictor can be dropped from a non-hierarchical multiple regression model.
In addition, comparing the unadjusted coefficient of multiple determination against Theil's adjusted coefficient of determination provides an essential diagnostic against overparameterization in small samples. When the number of columns in the design matrix approaches the sample size, the $p$-dimensional column space of the predictors spans nearly the entire $n$-dimensional observation space, forcing the unadjusted coefficient of determination toward unity even if every predictor is pure random noise independent of the response. Because the adjusted coefficient of determination divides both the residual sum of squares and the total sum of squares by their respective degrees of freedom, it penalizes the loss of residual degrees of freedom and can even become negative when a set of explanatory variables explains less variation than expected by chance alone.
Step-by-Step Regression Analysis Solutions
Three original questions connect calculations, definitions and interpretation. Open each solution to follow the reasoning.
Consider a multiple linear regression model $Y_i = \beta_0 + \beta_1 x_{i1} + \beta_2 x_{i2} + \varepsilon_i$ fitted to $n = 5$ experimental observations, where the predictors $x_{i1}$ and $x_{i2}$ have been centered around zero to simplify computation:
- Compute the $3 \times 3$ Gram matrix $\mathbf{X}^T\mathbf{X}$, the cross-product vector $\mathbf{X}^T\mathbf{Y}$, the inverse matrix $(\mathbf{X}^T\mathbf{X})^{-1}$, and the Ordinary Least Squares parameter vector $\hat{\boldsymbol{\beta}} = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{Y}$. Explain why $\mathbf{X}^T\mathbf{X}$ is diagonal in this design.
- Compute the fitted vector $\hat{\mathbf{Y}} = \mathbf{X}\hat{\boldsymbol{\beta}}$, the residual vector $\mathbf{e} = \mathbf{Y} - \hat{\mathbf{Y}}$, and the diagonal elements (leverages) $h_{11}, h_{22}, h_{33}, h_{44}, h_{55}$ of the Hat matrix $\mathbf{H} = \mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T$. Verify explicitly that $\sum_{i=1}^5 h_{ii} = p = 3$ and $\mathbf{X}^T\mathbf{e} = \mathbf{0}_3$.
- Calculate $\text{SST}$, $\text{SSR}$, $\text{SSE}$, the unbiased error variance estimate $s^2 = \text{MSE}$, the variance-covariance matrix $\widehat{\text{Cov}}(\hat{\boldsymbol{\beta}}) = s^2(\mathbf{X}^T\mathbf{X})^{-1}$, $R^2$, and the adjusted coefficient of determination $R_a^2$.
We first evaluate the $3 \times 3$ Gram matrix $\mathbf{X}^T\mathbf{X}$ by computing the inner products of the three columns of $\mathbf{X}$:
- $\sum_{i=1}^5 1^2 = 5$, $\sum_{i=1}^5 x_{i1} = -2 - 1 + 0 + 1 + 2 = 0$, $\sum_{i=1}^5 x_{i2} = 1 - 1 + 0 - 1 + 1 = 0$.
- $\sum_{i=1}^5 x_{i1}^2 = 4 + 1 + 0 + 1 + 4 = 10$, $\sum_{i=1}^5 x_{i2}^2 = 1 + 1 + 0 + 1 + 1 = 4$.
- $\sum_{i=1}^5 x_{i1} x_{i2} = (-2)(1) + (-1)(-1) + (0)(0) + (1)(-1) + (2)(1) = -2 + 1 + 0 - 1 + 2 = 0$.
Because all three columns of $\mathbf{X}$ are mutually orthogonal ($\mathbf{1}^T \mathbf{x}_{(1)} = \mathbf{1}^T \mathbf{x}_{(2)} = \mathbf{x}_{(1)}^T \mathbf{x}_{(2)} = 0$), the Gram matrix $\mathbf{X}^T\mathbf{X}$ and its inverse $(\mathbf{X}^T\mathbf{X})^{-1}$ are strictly diagonal:
Next, we compute the $3 \times 1$ cross-product vector $\mathbf{X}^T \mathbf{Y}$:
- $\sum_{i=1}^5 Y_i = 5 + 4 + 7 + 8 + 11 = 35$
- $\sum_{i=1}^5 x_{i1} Y_i = (-2)(5) + (-1)(4) + (0)(7) + (1)(8) + (2)(11) = -10 - 4 + 0 + 8 + 22 = 16$
- $\sum_{i=1}^5 x_{i2} Y_i = (1)(5) + (-1)(4) + (0)(7) + (-1)(8) + (1)(11) = 5 - 4 + 0 - 8 + 11 = 4$
Thus, the fitted multiple regression model is $\hat{Y} = 7.0 + 1.6 x_1 + 1.0 x_2$.
Evaluating $\hat{\mathbf{Y}} = \mathbf{X}\hat{\boldsymbol{\beta}}$ and $\mathbf{e} = \mathbf{Y} - \hat{\mathbf{Y}}$ for each of the $5$ observations:
- $i = 1$: $\hat{y}_1 = 7.0 + 1.6(-2) + 1.0(1) = 4.8 \implies e_1 = 5.0 - 4.8 = +0.2$
- $i = 2$: $\hat{y}_2 = 7.0 + 1.6(-1) + 1.0(-1) = 4.4 \implies e_2 = 4.0 - 4.4 = -0.4$
- $i = 3$: $\hat{y}_3 = 7.0 + 1.6(0) + 1.0(0) = 7.0 \implies e_3 = 7.0 - 7.0 = 0.0$
- $i = 4$: $\hat{y}_4 = 7.0 + 1.6(1) + 1.0(-1) = 7.6 \implies e_4 = 8.0 - 7.6 = +0.4$
- $i = 5$: $\hat{y}_5 = 7.0 + 1.6(2) + 1.0(1) = 11.2 \implies e_5 = 11.0 - 11.2 = -0.2$
Checking orthogonality $\mathbf{X}^T\mathbf{e}$:
- $\sum e_i = 0.2 - 0.4 + 0.0 + 0.4 - 0.2 = 0$
- $\sum x_{i1} e_i = (-2)(0.2) + (-1)(-0.4) + 0 + (1)(0.4) + (2)(-0.2) = -0.4 + 0.4 + 0.4 - 0.4 = 0$
- $\sum x_{i2} e_i = (1)(0.2) + (-1)(-0.4) + 0 + (-1)(0.4) + (1)(-0.2) = 0.2 + 0.4 - 0.4 - 0.2 = 0$
Because $(\mathbf{X}^T\mathbf{X})^{-1} = \text{diag}(0.20, 0.10, 0.25)$, the $i$-th diagonal leverage of $\mathbf{H}$ is $h_{ii} = \mathbf{x}_i^T (\mathbf{X}^T\mathbf{X})^{-1} \mathbf{x}_i = 0.20 + 0.10 x_{i1}^2 + 0.25 x_{i2}^2$:
- $h_{11} = h_{55} = 0.20 + 0.10(4) + 0.25(1) = 0.20 + 0.40 + 0.25 = 0.85$
- $h_{22} = h_{44} = 0.20 + 0.10(1) + 0.25(1) = 0.20 + 0.10 + 0.25 = 0.55$
- $h_{33} = 0.20 + 0.10(0) + 0.25(0) = 0.20$
Summing the leverages gives $\text{tr}(\mathbf{H}) = \sum_{i=1}^5 h_{ii} = 0.85 + 0.55 + 0.20 + 0.55 + 0.85 = 3.00 = p$, confirming $\text{tr}(\mathbf{H}) = p$.
With $\bar{Y} = 35/5 = 7.0$, we compute the Total, Error, and Regression Sums of Squares:
Notice that $\text{SSR} + \text{SSE} = 29.60 + 0.40 = 30.00 = \text{SST}$. Furthermore, because $\mathbf{x}_{(1)}$ and $\mathbf{x}_{(2)}$ are orthogonal, $\text{SSR}$ partitions cleanly into $\text{SSR}(X_1) = 1.6(16) = 25.60$ and $\text{SSR}(X_2) = 1.0(4) = 4.00$. With $n - p = 5 - 3 = 2$ error degrees of freedom:
The estimated variance-covariance matrix of $\hat{\boldsymbol{\beta}}$ is:
Finally, the Coefficient of Multiple Determination $R^2$ and Adjusted $R_a^2$ are:
Suppose a researcher considers two candidate nested regression models involving partitioned full-rank design matrices $\mathbf{X}_1 \in \mathbb{R}^{n \times p_1}$ and $\mathbf{X}_2 \in \mathbb{R}^{n \times p_2}$:
- Model A (Full Model): $\mathbf{Y} = \mathbf{X}_1 \boldsymbol{\beta}_1 + \mathbf{X}_2 \boldsymbol{\beta}_2 + \boldsymbol{\varepsilon}$ with OLS estimator $\hat{\boldsymbol{\beta}}_1$.
- Model B (Restricted / Short Model): $\mathbf{Y} = \mathbf{X}_1 \boldsymbol{\beta}_1 + \mathbf{u}$ (omitting $\mathbf{X}_2$) with OLS estimator $\tilde{\boldsymbol{\beta}}_1 = (\mathbf{X}_1^T \mathbf{X}_1)^{-1} \mathbf{X}_1^T \mathbf{Y}$.
Assume throughout that $\mathbb{E}[\boldsymbol{\varepsilon}] = \mathbf{0}_n$ and $\text{Cov}(\boldsymbol{\varepsilon}) = \sigma^2 \mathbf{I}_n$.
1. Case 1 (Underspecification / Omitted-Variable Bias): Suppose Model A is the true data-generating process ($\boldsymbol{\beta}_2 \neq \mathbf{0}$), but the analyst fits the short Model B. Derive the exact expectation $\mathbb{E}[\tilde{\boldsymbol{\beta}}_1]$, the omitted-variable bias vector $\text{Bias}(\tilde{\boldsymbol{\beta}}_1)$, and the condition under which $\tilde{\boldsymbol{\beta}}_1$ remains unbiased despite omitting $\mathbf{X}_2$.
2. Case 2 (Overspecification / Irrelevant Regressors): Conversely, suppose Model B is the true data-generating process ($\boldsymbol{\beta}_2 = \mathbf{0}$), but the analyst fits the larger Model A. Prove that $\hat{\boldsymbol{\beta}}_1$ and $s_A^2 = \text{SSE}_A / (n - p_1 - p_2)$ remain strictly unbiased, and use the Frisch–Waugh–Lovell covariance representation to prove that $\text{Cov}(\hat{\boldsymbol{\beta}}_1) - \text{Cov}(\tilde{\boldsymbol{\beta}}_1) \succeq \mathbf{0}$ is positive semi-definite.
When the true data-generating process is Model A ($\mathbf{Y} = \mathbf{X}_1 \boldsymbol{\beta}_1 + \mathbf{X}_2 \boldsymbol{\beta}_2 + \boldsymbol{\varepsilon}$), substituting $\mathbf{Y}$ into the short-model estimator $\tilde{\boldsymbol{\beta}}_1 = (\mathbf{X}_1^T \mathbf{X}_1)^{-1} \mathbf{X}_1^T \mathbf{Y}$ yields:
Define the $p_1 \times p_2$ auxiliary regression matrix $\mathbf{A}_{12} = (\mathbf{X}_1^T \mathbf{X}_1)^{-1} \mathbf{X}_1^T \mathbf{X}_2$, whose columns are the OLS coefficient vectors from regressing each omitted variable in $\mathbf{X}_2$ on the included variables $\mathbf{X}_1$. Taking expectations under $\mathbb{E}[\boldsymbol{\varepsilon}] = \mathbf{0}_n$ gives the famous Omitted-Variable Bias (OVB) Formula:
Thus, omitting $\mathbf{X}_2$ biases $\tilde{\boldsymbol{\beta}}_1$ unless either (a) the omitted variables have zero true effect ($\boldsymbol{\beta}_2 = \mathbf{0}$), or (b) the omitted variables are strictly orthogonal to the included variables ($\mathbf{X}_1^T \mathbf{X}_2 = \mathbf{0}_{p_1 \times p_2}$). Moreover, when $\boldsymbol{\beta}_2 \neq \mathbf{0}$, the short-model error variance estimator $s_B^2 = \mathbf{Y}^T \mathbf{M}_1 \mathbf{Y} / (n - p_1)$ is positively biased:
Conversely, suppose the true process is Model B ($\boldsymbol{\beta}_2 = \mathbf{0}$), so $\mathbf{Y} = \mathbf{X}_1 \boldsymbol{\beta}_1 + \boldsymbol{\varepsilon} = \mathbf{X}_1 \boldsymbol{\beta}_1 + \mathbf{X}_2 \mathbf{0} + \boldsymbol{\varepsilon}$. Because the true vector is simply a special case of Model A with $\boldsymbol{\beta} = (\boldsymbol{\beta}_1^T, \mathbf{0}^T)^T$, our general unbiasedness theorems for Model A apply directly:
Therefore, including irrelevant predictors $\mathbf{X}_2$ does not introduce any bias into either the regression coefficients $\hat{\boldsymbol{\beta}}_1$ or the error variance estimator $s_A^2$.
From the proof of the Frisch–Waugh–Lovell Theorem in Section 2.5, the full-model subvector $\hat{\boldsymbol{\beta}}_1$ is linked to the short-model estimator $\tilde{\boldsymbol{\beta}}_1 = (\mathbf{X}_1^T \mathbf{X}_1)^{-1} \mathbf{X}_1^T \mathbf{Y}$ and the residualized estimator $\hat{\boldsymbol{\beta}}_2 = (\mathbf{X}_2^T \mathbf{M}_1 \mathbf{X}_2)^{-1} \mathbf{X}_2^T \mathbf{M}_1 \mathbf{Y}$ by:
Rearranging this identity gives $\tilde{\boldsymbol{\beta}}_1 = \hat{\boldsymbol{\beta}}_1 + \mathbf{A}_{12} \hat{\boldsymbol{\beta}}_2$. Now compute the cross-covariance between the short-model estimator $\tilde{\boldsymbol{\beta}}_1$ and the FWL estimator $\hat{\boldsymbol{\beta}}_2$:
because $\mathbf{X}_1^T \mathbf{M}_1 = (\mathbf{M}_1 \mathbf{X}_1)^T = \mathbf{0}_{p_1 \times n}$! Since $\tilde{\boldsymbol{\beta}}_1$ and $\hat{\boldsymbol{\beta}}_2$ are uncorrelated, the covariance of $\hat{\boldsymbol{\beta}}_1 = \tilde{\boldsymbol{\beta}}_1 - \mathbf{A}_{12} \hat{\boldsymbol{\beta}}_2$ requires careful evaluation, or even more simply, since $\tilde{\boldsymbol{\beta}}_1 = (\mathbf{X}_1^T\mathbf{X}_1)^{-1}\mathbf{X}_1^T\mathbf{Y}$ is the BLUE of $\boldsymbol{\beta}_1$ under Model B, or by partitioned matrix inversion of $(\mathbf{X}^T\mathbf{X})^{-1}$:
Because $\mathbf{A}_{12} \text{Cov}(\hat{\boldsymbol{\beta}}_2) \mathbf{A}_{12}^T$ is symmetric and positive semi-definite, we have $\text{Cov}(\hat{\boldsymbol{\beta}}_1) - \text{Cov}(\tilde{\boldsymbol{\beta}}_1) \succeq \mathbf{0}_{p_1 \times p_1}$, with equality if and only if $\mathbf{A}_{12} = \mathbf{0}$ ($\mathbf{X}_1^T \mathbf{X}_2 = \mathbf{0}$). Thus, including irrelevant variables correlated with $\mathbf{X}_1$ inflates the sampling variance of $\hat{\boldsymbol{\beta}}_1$ and reduces error degrees of freedom by $p_2$.
Consider a multiple linear regression model with two predictors $X_1$ and $X_2$ in correlation (standardized) form, where $\mathbf{y}^*, \mathbf{x}_1^*, \mathbf{x}_2^* \in \mathbb{R}^n$ have zero sample mean and unit sum of squares ($\|\mathbf{y}^*\|_2^2 = \|\mathbf{x}_1^*\|_2^2 = \|\mathbf{x}_2^*\|_2^2 = 1$). Let the sample Pearson correlations be $r_{12} = (\mathbf{x}_1^*)^T \mathbf{x}_2^*$, $r_{y1} = (\mathbf{x}_1^*)^T \mathbf{y}^*$, and $r_{y2} = (\mathbf{x}_2^*)^T \mathbf{y}^*$, with $|r_{12}| < 1$.
- Set up the $2 \times 2$ correlation-form normal equations $\mathbf{R}_{XX} \hat{\boldsymbol{\beta}}^* = \mathbf{r}_{Xy}$, invert $\mathbf{R}_{XX}$, and derive the explicit algebraic formulas for the standardized partial regression coefficients $\hat{\beta}_1^*$ and $\hat{\beta}_2^*$ in terms of $r_{y1}, r_{y2},$ and $r_{12}$.
- Verify the Frisch–Waugh–Lovell Theorem explicitly by computing the residual vector $\mathbf{e}_{1 \mid 2} = \mathbf{x}_1^* - r_{12} \mathbf{x}_2^*$ from regressing $\mathbf{x}_1^*$ on $\mathbf{x}_2^*$ and showing that $(\mathbf{e}_{1 \mid 2}^T \mathbf{y}^*) / (\mathbf{e}_{1 \mid 2}^T \mathbf{e}_{1 \mid 2})$ reproduces $\hat{\beta}_1^*$ identically.
- Derive the formula for the Coefficient of Multiple Determination $R^2$ in terms of $r_{y1}, r_{y2}, r_{12}$, verify that $R^2 = r_{y1}^2 + (1 - r_{y1}^2) r_{y2 \cdot 1}^2$, and evaluate $\hat{\beta}_1^*, \hat{\beta}_2^*, R^2$, and $r_{y2 \cdot 1}^2$ when $r_{y1} = 0.70$, $r_{y2} = 0.60$, and $r_{12} = 0.50$.
Let $\mathbf{X}^* = [\mathbf{x}_1^*, \mathbf{x}_2^*] \in \mathbb{R}^{n \times 2}$. Because the standardized vectors have unit sum of squares, the $2 \times 2$ Gram matrix $(\mathbf{X}^*)^T \mathbf{X}^*$ is the predictor correlation matrix $\mathbf{R}_{XX}$, and $(\mathbf{X}^*)^T \mathbf{y}^*$ is the vector of predictor-response correlations $\mathbf{r}_{Xy}$:
Since $\det(\mathbf{R}_{XX}) = 1 - r_{12}^2 > 0$, inverting the $2 \times 2$ matrix gives:
Note that the unstandardized slopes are recovered via $\hat{\beta}_j = \hat{\beta}_j^* (s_Y / s_{X_j})$ for $j = 1, 2$.
Regressing $\mathbf{x}_1^*$ on $\mathbf{x}_2^*$ yields slope $((\mathbf{x}_2^*)^T \mathbf{x}_1^*) / ((\mathbf{x}_2^*)^T \mathbf{x}_2^*) = r_{12} / 1 = r_{12}$, so the FWL residual vector of $\mathbf{x}_1^*$ purged of $\mathbf{x}_2^*$ is:
We compute the squared Euclidean norm (denominator) and inner product with $\mathbf{y}^*$ (numerator):
Dividing the numerator by the denominator gives:
confirming the Frisch–Waugh–Lovell Theorem explicitly.
Since $\|\mathbf{y}^*\|_2^2 = 1$, the Coefficient of Multiple Determination $R^2$ equals the regression sum of squares $(\hat{\boldsymbol{\beta}}^*)^T \mathbf{r}_{Xy}$:
Adding and subtracting $r_{y1}^2 (1 - r_{12}^2)$ in the numerator allows us to rewrite $R^2$ sequentially:
Given $r_{y1} = 0.70$, $r_{y2} = 0.60$, and $r_{12} = 0.50$, we have $1 - r_{12}^2 = 1 - 0.25 = 0.75$:
- $\hat{\beta}_1^* = \frac{0.70 - (0.50)(0.60)}{0.75} = \frac{0.40}{0.75} = \frac{8}{15} \approx 0.5333$
- $\hat{\beta}_2^* = \frac{0.60 - (0.50)(0.70)}{0.75} = \frac{0.25}{0.75} = \frac{1}{3} \approx 0.3333$
- $R^2 = (0.53333)(0.70) + (0.33333)(0.60) = 0.37333 + 0.20000 = 0.5733 \quad (57.33\%)$
- $r_{y2 \cdot 1}^2 = \frac{R^2 - r_{y1}^2}{1 - r_{y1}^2} = \frac{0.57333 - 0.49000}{1 - 0.49000} = \frac{0.08333}{0.51000} \approx 0.1634 \quad (16.34\%)$
Thus, after $X_1$ explains $49.00\%$ of the total variation in $Y$, adding $X_2$ explains $16.34\%$ of the remaining $51.00\%$ unexplained variation, raising the overall $R^2$ to $57.33\%$.