Tutorials › Econometrics (Graduate) › Finite-Sample Unbiasedness Under Strict Exogeneity

Linear Projection and OLS · Tutorial 86 of 952

Finite-Sample Unbiasedness Under Strict Exogeneity

Learn when OLS is unbiased in a finite sample, how to derive its conditional expectation, and what changes when the error has nonzero conditional means.

Beginner 10 min read

What You'll Learn

  • State the linear model and full-rank condition needed to define OLS.
  • Distinguish strict exogeneity from a zero unconditional error mean.
  • Derive the conditional expectation of the OLS coefficient vector given the regressor matrix.
  • Explain why strict exogeneity gives finite-sample conditional and unconditional unbiasedness.
  • Calculate how nonzero conditional error means shift slope and intercept estimates.
  • Recognize that strict exogeneity is sufficient, but not necessary, for conditional unbiasedness.

Why Unbiasedness Depends on the Regressors

An OLS estimate is computed from the observed outcomes and regressors. Even if the regression equation looks appropriate, the estimate can systematically miss the target when the errors have nonzero conditional means given the regressors. The key question is therefore not merely whether errors average to zero overall, but whether their conditional means line up with the observed regressor matrix.

This tutorial derives the conditional expectation of OLS in finite samples. The result does not require normally distributed errors, equal error variances, or independent observations. Its central condition is strict exogeneity: after conditioning on the entire regressor matrix, the error vector has mean zero.

Model and assumptions: Let \(\mathbf{Y}\) be an \(n \times 1\) outcome vector, \(\mathbf{X}\) an \(n \times k\) regressor matrix, \(\boldsymbol{\beta}\) a \(k \times 1\) coefficient vector, and \(\mathbf{u}\) an \(n \times 1\) error vector. The model is \(\mathbf{Y}=\mathbf{X}\boldsymbol{\beta}+\mathbf{u}\). Assume \(\mathbf{X}\) has full column rank \(k\), so \(\mathbf{X}'\mathbf{X}\) is invertible, and that the relevant conditional expectations exist. Strict exogeneity means \(E[\mathbf{u}\mid\mathbf{X}]=\mathbf{0}\), conditioning on the full regressor matrix.

With an intercept, the first column of \(\mathbf{X}\) consists of ones. The other columns contain the observations on the explanatory variables. The coefficient vector \(\boldsymbol{\beta}\) is fixed in this model; \(\mathbf{X}\), \(\mathbf{u}\), \(\mathbf{Y}\), and the OLS estimate may be random. If the regressors are treated as fixed by design, the same calculations apply conditional on that fixed matrix.

Conditional Expectation of the OLS Estimator

Under full column rank, least squares gives the OLS estimator \(\hat{\boldsymbol{\beta}}=(\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\mathbf{Y}\). Substitute the model into this expression, then take the conditional expectation given \(\mathbf{X}\):

$$ \begin{aligned} \hat{\boldsymbol{\beta}} &=(\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'(\mathbf{X}\boldsymbol{\beta}+\mathbf{u})\\ &=\boldsymbol{\beta}+(\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\mathbf{u},\\ E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}] &=\boldsymbol{\beta}+(\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'E[\mathbf{u}\mid\mathbf{X}]. \end{aligned} $$

In the final line, \(\mathbf{X}\) and therefore \((\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\) are fixed once we condition on \(\mathbf{X}\), so they can be taken outside the conditional expectation. This identity is the general finite-sample expression. Under strict exogeneity, \(E[\mathbf{u}\mid\mathbf{X}]=\mathbf{0}\), and it simplifies to

$$ E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}]=\boldsymbol{\beta}. $$
Theorem: If \(\mathbf{X}\) has full column rank and \(E[\mathbf{u}\mid\mathbf{X}]=\mathbf{0}\), then OLS is conditionally unbiased in finite samples: \(E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}]=\boldsymbol{\beta}\). If the unconditional expectation of \(\hat{\boldsymbol{\beta}}\) exists, the law of iterated expectations also gives \(E[\hat{\boldsymbol{\beta}}]=\boldsymbol{\beta}\).

The phrase finite-sample matters: this identity holds for a given sample size \(n\), not just as \(n\) grows. Conditional unbiasedness is a statement about the average estimate over repeated outcomes at the same regressor matrix. It does not say that an estimate from any particular sample equals the true coefficient.

Worked Example: Verifying Conditional Unbiasedness

Suppose a hypothetical regression has an intercept and one regressor, with observed regressor values \(0,1,2\). Let the conditional mean model be \(Y_i=2+1.5x_i+u_i\), with \(E[\mathbf{u}\mid\mathbf{X}]=\mathbf{0}\). Verify the conditional expectation of both OLS coefficients.

The regressor matrix and its cross-product are

$$ \mathbf{X}= \begin{pmatrix} 1&0\\ 1&1\\ 1&2 \end{pmatrix}, \qquad \mathbf{X}'\mathbf{X}= \begin{pmatrix} 3&3\\ 3&5 \end{pmatrix}. $$

The determinant of \(\mathbf{X}'\mathbf{X}\) is \(3(5)-3(3)=6\), which is nonzero, so the matrix has full rank. Under the specified conditional mean, the conditional mean outcome vector is \((2,3.5,5)'\). Thus

$$ E[\mathbf{X}'\mathbf{Y}\mid\mathbf{X}] = \begin{pmatrix} 2+3.5+5\\ 0(2)+1(3.5)+2(5) \end{pmatrix} = \begin{pmatrix} 10\\13 \end{pmatrix}. $$

Also, \((\mathbf{X}'\mathbf{X})^{-1}=\frac{1}{6}\begin{pmatrix}5&-3\\-3&3\end{pmatrix}\). Therefore,

$$ E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}] = \frac{1}{6} \begin{pmatrix} 5&-3\\ -3&3 \end{pmatrix} \begin{pmatrix} 10\\13 \end{pmatrix} = \begin{pmatrix} (50-39)/6\\ (-30+39)/6 \end{pmatrix} = \begin{pmatrix} 11/6\\ 1.5 \end{pmatrix}. $$

This arithmetic does not match the stated intercept \(2\), because the first entry of the cross-product was added incorrectly if one treats the conditional mean outcomes as \(2,3.5,5\): their sum is \(10.5\), not \(10\). Using the correct sum gives \(E[\mathbf{X}'\mathbf{Y}\mid\mathbf{X}]=(10.5,13.5)'\), and hence

$$ \frac{1}{6} \begin{pmatrix} 5&-3\\ -3&3 \end{pmatrix} \begin{pmatrix} 10.5\\13.5 \end{pmatrix} = \begin{pmatrix} (52.5-40.5)/6\\ (-31.5+40.5)/6 \end{pmatrix} = \begin{pmatrix} 2\\1.5 \end{pmatrix}. $$

The corrected calculation recovers the stipulated intercept of \(2\) and slope of \(1.5\), as strict exogeneity requires. Checking the sums before multiplying is essential: a small arithmetic error can make a correct result appear to fail.

What Changes When Conditional Error Means Are Nonzero?

Let \(\mathbf{m}(\mathbf{X})=E[\mathbf{u}\mid\mathbf{X}]\) denote the vector of conditional error means. The general expression shows exactly how these means affect the conditional expectation of OLS:

$$ E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}]-\boldsymbol{\beta} =(\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\mathbf{m}(\mathbf{X}). $$

This shift is determined by how the conditional error means align with the columns of \(\mathbf{X}\). A nonzero conditional mean vector need not shift every coefficient, or even shift any coefficient in a particular sample, if its regressor-weighted sums are zero. But strict exogeneity guarantees the shift is zero for every full-rank regressor matrix.

Worked Example: A Conditional Error Mean Shifts the Slope

Keep the hypothetical regressor values \(0,1,2\) and the model coefficient vector \((2,1.5)'\), but suppose the conditional error means are \((0,0.5,1)'\). Find the conditional expectation of the OLS intercept and slope.

For this design, \((\mathbf{X}'\mathbf{X})^{-1}=\frac{1}{6}\begin{pmatrix}5&-3\\-3&3\end{pmatrix}\). The error-mean contribution to \(\mathbf{X}'\mathbf{u}\) in conditional expectation is

$$ \mathbf{X}'\mathbf{m} = \begin{pmatrix} 1&1&1\\ 0&1&2 \end{pmatrix} \begin{pmatrix} 0\\0.5\\1 \end{pmatrix} = \begin{pmatrix} 1.5\\2.5 \end{pmatrix}. $$

Consequently, the coefficient shift is

$$ (\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\mathbf{m} = \frac{1}{6} \begin{pmatrix} 5&-3\\ -3&3 \end{pmatrix} \begin{pmatrix} 1.5\\2.5 \end{pmatrix} = \begin{pmatrix} (7.5-7.5)/6\\ (-4.5+7.5)/6 \end{pmatrix} = \begin{pmatrix} 0\\0.5 \end{pmatrix}. $$

The error means \((0,0.5,1)'\) have average \(0.5\); their slope contribution is \(0.5\). The intercept shift is \(0.5-(0.5)(1)=0\), since the mean regressor value is \(\bar{x}=1\). Thus \(E[\hat{\beta}_0\mid\mathbf{X}]=2\) and \(E[\hat{\beta}_1\mid\mathbf{X}]=2.0\). The slope is shifted upward by \(0.5\) outcome units per regressor unit, while the intercept is unchanged. The conditional error means are not zero, so strict exogeneity fails.

Worked Example: Nonzero Conditional Means Can Still Give No Coefficient Shift

For the same regressor values, suppose instead that \(E[\mathbf{u}\mid\mathbf{X}]=(1,-2,1)'\). Strict exogeneity again fails because this vector is not zero. Check whether the conditional expectation of the OLS coefficients shifts.

The sum of the conditional error means is \(1-2+1=0\). Their regressor-weighted sum is \(0(1)+1(-2)+2(1)=0\). Therefore,

$$ \mathbf{X}'\mathbf{m} = \begin{pmatrix} 1-2+1\\ 0(1)+1(-2)+2(1) \end{pmatrix} = \begin{pmatrix} 0\\0 \end{pmatrix}, \qquad (\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\mathbf{m} = \begin{pmatrix} 0\\0 \end{pmatrix}. $$

The conditional expectation of each coefficient therefore equals its stipulated value, \(2\) and \(1.5\), despite the nonzero conditional error means. In this design, those means are orthogonal to both the intercept column and the regressor column. This demonstrates that strict exogeneity is sufficient for conditional unbiasedness, but it is not necessary for a particular design and coefficient vector.

Why a Zero Average Error Is Not Enough

The distinction between \(E[\mathbf{u}]=\mathbf{0}\) and \(E[\mathbf{u}\mid\mathbf{X}]=\mathbf{0}\) is important. An unconditional zero mean says errors average to zero across observations or repetitions without conditioning on the regressors. It does not rule out a systematic relationship between the errors and the regressors. Because OLS multiplies errors by the regressor matrix, such alignment can shift its expected coefficients.

For random regressors, conditional unbiasedness implies unconditional unbiasedness when the estimator is integrable: \(E[\hat{\boldsymbol{\beta}}]=E[E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}]]=E[\boldsymbol{\beta}]=\boldsymbol{\beta}\). The reverse implication does not generally hold: positive and negative conditional shifts can average to zero across different regressor matrices even though OLS is not conditionally unbiased at each one.

1
Write the regression model.
Use \(\mathbf{Y}=\mathbf{X}\boldsymbol{\beta}+\mathbf{u}\) and verify that \(\mathbf{X}\) has full column rank.
2
Condition on the regressor matrix.
Use the general identity \(E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}]=\boldsymbol{\beta}+(\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'E[\mathbf{u}\mid\mathbf{X}]\).
3
Assess the conditional error means.
If they are zero, OLS is conditionally unbiased. If not, calculate their projection through \((\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\) to determine the coefficient shift.

Common Mistakes and Practical Meaning

  • Using only a zero unconditional mean. The statement \(E[\mathbf{u}]=\mathbf{0}\) alone does not establish \(E[\hat{\boldsymbol{\beta}}\mid\mathbf{X}]=\boldsymbol{\beta}\). The relevant condition is \(E[\mathbf{u}\mid\mathbf{X}]=\mathbf{0}\).
  • Confusing unbiasedness with accuracy in one sample. Unbiasedness describes a conditional or repeated-sampling average. A realized estimate can differ substantially from \(\boldsymbol{\beta}\).
  • Assuming nonzero conditional means must shift every coefficient. The shift depends on \(\mathbf{X}'\mathbf{m}\). A nonzero \(\mathbf{m}\) orthogonal to the columns of \(\mathbf{X}\) gives no coefficient shift for that design.
  • Invoking unnecessary distributional assumptions. The expectation derivation uses linearity and the conditional mean restriction, not normality or constant variance. Those properties concern other aspects of inference, not this unbiasedness result.
Key takeaway: The finite-sample conditional bias of OLS is exactly \((\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'E[\mathbf{u}\mid\mathbf{X}]\). Strict exogeneity sets this expression to zero; when strict exogeneity fails, the direction and size of the shift depend on how the conditional error means align with the regressors.

Check Your Understanding

Use the conditional-expectation identity to answer these questions.

  1. State the full-rank condition needed for the usual OLS formula and explain why it matters.
  2. What does strict exogeneity require, and on what information is the error vector conditioned?
  3. If \(E[\mathbf{u}\mid\mathbf{X}]=\mathbf{m}\), write the conditional shift in the OLS coefficient vector.
  4. For the regressor values \(0,1,2\), why does the conditional error-mean vector \((1,-2,1)'\) cause no intercept or slope shift?
  5. Explain why a zero unconditional error mean does not, by itself, guarantee conditional unbiasedness of OLS.
Clinical Biostats