Introduction
A regression line can summarize how the mean of an outcome changes with its predictors, but it need not describe the outcome’s conditional mean at every predictor value. The distinction is between a best linear predictor, which is chosen from a restricted class of linear functions, and the conditional expectation, which gives the mean outcome at each covariate value.
This distinction matters because a linear projection is defined by an optimization criterion and moment restrictions. It does not, by itself, assert that the underlying conditional mean is linear. The two objects coincide when the conditional mean belongs to the set of functions allowed in the projection. When it does not, the projection retains particular averages and covariances while smoothing away features such as curvature.
Two Different Objects
Let \(Y\) be a scalar outcome and let \(X\) be a vector of covariates. Assume \(Y\) and the chosen regressors have finite second moments. The conditional expectation \(m(X)=E[Y\mid X]\) is the mean of \(Y\) conditional on the observed covariates. It can be a nonlinear function of \(X\).
Choose a vector of regressors \(Z\) formed from \(X\), including an intercept. For example, with one covariate, \(Z=(1,X)'\), so \(Z'\beta=\beta_0+\beta_1X\). The population best linear predictor is the linear combination of those regressors that minimizes expected squared prediction error.
The projection is well defined and unique when the expected squared errors are finite and \(E[ZZ']\) is nonsingular. Its coefficients then satisfy the population normal equations \(E[Z(Y-Z'\beta^{LP})]=0\). These equations say the projection residual has zero average product with each included regressor. They do not say that the residual has conditional mean zero at every value of \(X\).
For a single scalar regressor \(X\) with an intercept, the formula is particularly familiar. If \(0<\operatorname{Var}(X)<\infty\), then \(\beta_1^{LP}=\operatorname{Cov}(X,Y)/\operatorname{Var}(X)\) and \(\beta_0^{LP}=E[Y]-\beta_1^{LP}E[X]\). These are population quantities: the calculation uses the distribution of \((X,Y)\), not a finite sample.
When Do They Coincide?
Suppose the regressors \(Z\) are functions of \(X\), as when \(Z=(1,X')'\). If the conditional expectation is exactly a linear combination of those regressors, then the projection and conditional expectation are the same, except possibly on a set of covariate values with probability zero. More generally, equality holds precisely when \(m(X)\) lies in the span of the chosen regressors almost surely.
The key justification is a squared-error decomposition. For any candidate coefficient vector \(\beta\), write \(m(X)=E[Y\mid X]\). Since \(Z\) is determined by \(X\), conditioning on \(X\) gives \(E[(Y-Z'\beta)^2\mid X]=E[(Y-m(X))^2\mid X]+(m(X)-Z'\beta)^2\). The cross-product term vanishes because \(E[Y-m(X)\mid X]=0\). Taking expectations yields
The first term does not depend on \(\beta\). Therefore, minimizing prediction error for \(Y\) is equivalent to finding the closest linear combination of \(Z\) to \(m(X)\) in expected squared distance. If \(m(X)\) is already in the regressor span, the second term can be zero, and the projection equals the conditional expectation. Conversely, if the two are equal almost surely, the conditional expectation is that linear combination. This also explains why a projection can summarize a nonlinear conditional mean without reproducing its shape.
Worked Example: A Linear Conditional Mean
Suppose \(X\) takes the values \(0,1,2\), each with probability \(1/3\), and \(Y=1+2X+u\), where \(u\) is independent of \(X\), takes the values \(-1\) and \(1\) with equal probability. Find the conditional expectation and the population linear projection of \(Y\) on an intercept and \(X\).
Because \(E[u\mid X]=0\), the conditional expectation is \(E[Y\mid X]=1+2X\). Also \(E[X]=1\) and \(\operatorname{Var}(X)=((0-1)^2+(1-1)^2+(2-1)^2)/3=2/3\). Independence and the zero mean of \(u\) give \(\operatorname{Cov}(X,u)=0\), so \(\operatorname{Cov}(X,Y)=2\operatorname{Var}(X)=4/3\). Thus \(\beta_1^{LP}=(4/3)/(2/3)=2\).
Since \(E[Y]=1+2E[X]+E[u]=3\), the intercept is \(\beta_0^{LP}=E[Y]-\beta_1^{LP}E[X]=3-2(1)=1\). The linear projection is \(1+2X\), exactly the conditional expectation. The equality holds because this conditional mean is in the span of the intercept and \(X\).
What a Projection Preserves When the Mean Is Nonlinear
When the conditional expectation is not in the chosen span, the projection generally differs from it pointwise. It still satisfies the normal equations: its residual has zero mean and zero covariance with each included regressor when an intercept is present. Those are aggregate moment statements, not a claim that the residual averages to zero within every covariate value.
Worked Example: A Curved Mean on Three Covariate Values
Let \(X\) take \(0,1,2\), each with probability \(1/3\), and let \(Y=X^2+u\), where \(E[u\mid X]=0\) and \(u\) has finite variance. Find the conditional expectation and the best affine predictor of \(Y\) using an intercept and \(X\).
The conditional expectation is \(E[Y\mid X]=X^2\). The relevant moments are \(E[X]=1\), \(E[X^2]=5/3\), and \(E[X^3]=3\). Since \(E[u\mid X]=0\), the error contributes neither to \(E[Y]\) nor to \(\operatorname{Cov}(X,Y)\). Therefore \(E[Y]=5/3\), \(\operatorname{Var}(X)=5/3-1^2=2/3\), and \(\operatorname{Cov}(X,Y)=E[X^3]-E[X]E[X^2]=3-5/3=4/3\).
The slope is \((4/3)/(2/3)=2\), and the intercept is \(5/3-2(1)=-1/3\). The linear projection is therefore \(-1/3+2X\). At \(X=0,1,2\), it predicts \(-1/3,5/3,11/3\), while the conditional expectations are \(0,1,4\). The predictions differ at all three values, but the projection residuals in conditional-mean terms are \(1/3,-2/3,1/3\). Their average is zero, and their average product with \(X\) is \((0-2/3+2/3)/3=0\), as the normal equations require.
The line preserves these particular average and linear-association restrictions. It does not preserve the curved pattern of the conditional expectation. In particular, its negative prediction at \(X=0\) is possible even though the conditional mean there is zero: squared-error optimization does not require the fitted line to stay within the range of the conditional means.
The shape of the projection also depends on which regressors are included. If the chosen regressors include \(1\), \(X\), and \(X^2\), then a conditional mean of the form \(a+bX+cX^2\) is in their span and can be represented exactly. Calling a predictor “linear” refers to being linear in the included coefficients and regressors; it does not require that the covariate enter only as its first power.
Worked Example: A Symmetric Distribution Can Hide Curvature
Suppose \(X\) is uniformly distributed on \([-1,1]\), and \(Y=X^2+u\), where \(E[u\mid X]=0\) and \(u\) has finite variance. Find the conditional expectation and the best affine predictor using an intercept and \(X\).
The conditional expectation is \(E[Y\mid X]=X^2\). Symmetry gives \(E[X]=0\) and \(E[X^3]=0\), while \(E[X^2]=1/3\). Thus \(\operatorname{Var}(X)=1/3\), \(E[Y]=1/3\), and \(\operatorname{Cov}(X,Y)=E[X^3]-E[X]E[X^2]=0\). The slope is \(0/(1/3)=0\), and the intercept is \(1/3-0(0)=1/3\). The best affine predictor is the constant \(1/3\), despite the conditional expectation varying from zero at \(X=0\) to one at the endpoints.
This is not a contradiction. The projection chooses one affine function to minimize expected squared error across the distribution of \(X\). Symmetry makes a nonzero linear slope unhelpful, so the best affine summary is flat. The conditional expectation retains the curvature that the restricted affine predictor cannot represent.
Why the Distinction Matters
A population projection is useful as a compact summary of a relationship and as the target described by its own optimization and orthogonality conditions. But those properties alone do not license a pointwise interpretation as the conditional mean. Nor does a projection by itself establish a causal effect: it describes a population relationship under the specified regressors and distribution.
The distinction can be stated in terms of conditional residual means. If \(m(X)=E[Y\mid X]\) and the projection is \(Z'\beta^{LP}\), then \(E[Y-Z'\beta^{LP}\mid X]=m(X)-Z'\beta^{LP}\). This conditional residual mean is zero at every covariate value (almost surely) exactly when the conditional expectation is represented by the chosen regressors. The normal equations require only that the residual’s expected products with the regressors are zero.
Common Mistake
- Wrong reasoning: “The population linear projection has zero residual covariance with \(X\), so the conditional mean of \(Y\) must be linear in \(X\).” Zero covariance is an unconditional moment restriction; nonlinear conditional-mean differences can cancel when averaged over the distribution of \(X\).
- Correction: Conclude that the linear projection is the best predictor within its specified span and satisfies the corresponding normal equations. Conclude that it equals \(E[Y\mid X]\) only when that conditional expectation belongs to the span almost surely.
Check Your Understanding
Use the distinction between pointwise conditional means and projection moment conditions to answer the following.
- State the condition under which the projection on an intercept and \(X\) equals \(E[Y\mid X]\) almost surely.
- For a nonlinear conditional expectation, what do the population normal equations say about the projection residual, and what do they not say?
- If \(X\) is symmetric about zero and \(E[Y\mid X]=X^2\), why can the best affine predictor have a zero slope?
- How does adding \(X^2\) to the regressor set change whether a quadratic conditional expectation can be represented exactly?
- Why is it possible for a linear projection to predict a value outside the range of the conditional expectations in a discrete example?