Why OLS Still Has a Target When the Mean Is Nonlinear
A straight line can be useful even when the relationship it summarizes is curved. The key is to be precise about what the line represents. If the conditional mean of an outcome is not linear in the regressors, the population OLS coefficients are generally not parameters of a correctly specified linear conditional-mean model. They instead define the best linear approximation, under squared-error loss and the population distribution of the regressors.
This target is well-defined under suitable moment and rank conditions. With a representative random sample, sample OLS can estimate it consistently even though the conditional mean is nonlinear. Consistency does not make the linear model correct: it says that the sample coefficients approach this particular population approximation.
The finite second moment conditions matter: they ensure the squared-error objective is finite and that the cross-moment \(E[\mathbf{X}Y]\) exists. Nonsingularity rules out a nonzero linear combination of regressors that is zero almost surely; without it, the coefficients need not be uniquely determined.
What Is Being Approximated?
Write the conditional mean as \(m(\mathbf{X})=E[Y\mid\mathbf{X}]\). A linear conditional-mean model would require \(m(\mathbf{X})=\mathbf{X}'\boldsymbol{\beta}\) almost surely for some fixed coefficient vector. If no such vector exists, the linear conditional mean is misspecified. Nevertheless, the population projection remains a meaningful approximation to \(m(\mathbf{X})\).
To see the connection, condition on \(\mathbf{X}\). The identity \(Y-\mathbf{X}'\boldsymbol{\beta}=(Y-m(\mathbf{X}))+(m(\mathbf{X})-\mathbf{X}'\boldsymbol{\beta})\) gives
The cross-product has expectation zero because \(E[Y-m(\mathbf{X})\mid\mathbf{X}]=0\). The first term does not depend on \(\boldsymbol{\beta}\). Thus minimizing mean squared prediction error over linear functions is equivalent to finding the linear function closest to the conditional mean in squared error, averaging over the population distribution of \(\mathbf{X}\). This approximation depends on that distribution: where regressor values occur more often contributes more to the average.
Worked Example: Projecting a Curved Mean on a Discrete Regressor
Suppose \(X\) takes values \(0,1,2\) with probabilities \(1/2,1/4,1/4\), and \(Y=X^2\). The conditional mean is \(m(X)=X^2\), which is not a straight line across these three points. Find the population projection of \(Y\) on an intercept and \(X\).
The moments are $$ E[X]=0(1/2)+1(1/4)+2(1/4)=0.75,\quad E[X^2]=0+1/4+4(1/4)=1.25, $$ $$ E[Y]=E[X^2]=1.25,\qquad E[XY]=E[X^3]=0+1/4+8(1/4)=2.25. $$ The regressor variance and covariance are $$ \operatorname{Var}(X)=1.25-(0.75)^2=0.6875=\frac{11}{16}, \qquad \operatorname{Cov}(X,Y)=2.25-(0.75)(1.25)=1.3125=\frac{21}{16}. $$
For a regression with an intercept and one regressor, the projection slope is \(\operatorname{Cov}(X,Y)/\operatorname{Var}(X)\), and the intercept is \(E[Y]-\beta_1^{*}E[X]\). Therefore, $$ \beta_1^{*}=\frac{21/16}{11/16}=\frac{21}{11}\approx1.909,\qquad \beta_0^{*}=1.25-\frac{21}{11}(0.75)=-\frac{2}{11}\approx-0.1818. $$ The best linear approximation is \(-2/11+(21/11)X\). It is not equal to \(X^2\) at every support point: the fitted values at \(X=0,1,2\) are approximately \(-0.1818,1.727,3.636\), whereas the conditional means are \(0,1,4\).
Why the Projection Has These Coefficients
The projection formula follows from the population least-squares objective. Let \(Q=E[\mathbf{X}\mathbf{X}']\) and \(q=E[\mathbf{X}Y]\). Expanding the objective gives
Because \(Q\) is nonsingular, the objective is a strictly convex quadratic in \(\boldsymbol{\beta}\). Its gradient is \(-2q+2Q\boldsymbol{\beta}\). Setting this gradient to zero yields \(Q\boldsymbol{\beta}=q\), so the unique minimizer is \(\boldsymbol{\beta}^{*}=Q^{-1}q\). Equivalently, the projection residual \(u^{*}=Y-\mathbf{X}'\boldsymbol{\beta}^{*}\) obeys the population normal equations:
These equations say that the residual is uncorrelated with each included regressor in the population. They do not say \(E[u^{*}\mid\mathbf{X}]=0\). In fact, when the conditional mean is misspecified, \(E[u^{*}\mid\mathbf{X}]=m(\mathbf{X})-\mathbf{X}'\boldsymbol{\beta}^{*}\) will generally vary with \(\mathbf{X}\).
Why Sample OLS Can Estimate the Projection
Suppose \((Y_i,\mathbf{X}_i)\), for \(i=1,\ldots,n\), are independent and identically distributed draws from the population, the second moments in the definition are finite, and \(E[\mathbf{X}\mathbf{X}']\) is nonsingular. The sample OLS coefficient is
whenever the sample regressor matrix has full column rank. The law of large numbers makes the first sample moment matrix converge to \(E[\mathbf{X}\mathbf{X}']\) and the second converge to \(E[\mathbf{X}Y]\). Since the limiting matrix is nonsingular, its inverse varies continuously near that limit. Consequently, the sample coefficient converges in probability to \(Q^{-1}q=\boldsymbol{\beta}^{*}\). This argument does not require \(m(\mathbf{X})\) to be linear; it requires the sample moments to converge to the moments defining the projection.
The finite second moments ensure the required entries are integrable. For example, \(E[|X_jY|]\leq\sqrt{E[X_j^2]E[Y^2]}<\infty\) for each regressor component \(X_j\). These conditions describe consistency for the projection target; they do not establish that the target is a causal effect or that the linear model correctly describes the conditional mean.
Worked Example: A Continuous Curved Conditional Mean
Let \(X\) be uniformly distributed on \([0,1]\), and let \(Y=X^2\). With an intercept and \(X\) as regressors, calculate the population projection. The moments are finite, and \(\operatorname{Var}(X)=1/12>0\), so the projection is unique.
For a uniform variable on this interval, \(E[X]=1/2\), \(E[X^2]=1/3\), and \(E[X^3]=1/4\). Hence $$ \operatorname{Var}(X)=\frac{1}{3}-\left(\frac{1}{2}\right)^2=\frac{1}{12}, \qquad \operatorname{Cov}(X,Y)=E[X^3]-E[X]E[X^2] =\frac{1}{4}-\frac{1}{6}=\frac{1}{12}. $$ The slope is \((1/12)/(1/12)=1\), and the intercept is $$ \beta_0^{*}=E[Y]-\beta_1^{*}E[X]=\frac{1}{3}-1\left(\frac{1}{2}\right)=-\frac{1}{6}. $$ Thus the projection is \(-1/6+X\), not the conditional mean \(X^2\). The local change in the conditional mean is \(2X\), which varies across the interval; the projection slope of \(1\) is a single global approximation, not that changing local slope.
The projection also depends on the distribution of \(X\). In the preceding discrete population, the same curved conditional mean \(X^2\) produced slope \(21/11\), whereas the uniform population produces slope \(1\). Different populations put different weight on different regressor values, so their best linear approximations can differ even when the functional relationship \(m(x)=x^2\) is unchanged.
Worked Sample Calculation and Its Limit
A sample estimate need not equal the population projection in every finite sample. The following hypothetical sample illustrates both the calculation and the role of sample moments.
Worked Example: Sample OLS Near the Population Projection
Draw \(n=400\) observations from the discrete population in the first example, where \(Y=X^2\). Suppose this particular sample contains 202 observations with \(X=0\), 98 with \(X=1\), and 100 with \(X=2\). The sample proportions are \(0.505,0.245,0.250\), respectively. (These are hypothetical counts, not claims about an actual study.)
Using those proportions, $$ \bar X=0(0.505)+1(0.245)+2(0.250)=0.745,\quad \overline{X^2}=1(0.245)+4(0.250)=1.245. $$ Since \(Y=X^2\), \(\bar Y=1.245\), and \(\overline{XY}=1(0.245)+8(0.250)=2.245\). Thus $$ s_{X,\mathrm{emp}}^2=1.245-(0.745)^2=0.689975,\qquad \widehat{\operatorname{Cov}}(X,Y)=2.245-(0.745)(1.245)=1.317475. $$ Here the empirical variance and covariance use denominator \(n\); that common divisor cancels in the slope ratio. The fitted slope and intercept are therefore $$ \hat\beta_1=\frac{1.317475}{0.689975}\approx1.909,\qquad \hat\beta_0=1.245-\left(\frac{1.317475}{0.689975}\right)(0.745)\approx-0.1775. $$ They are close to the population values \(21/11\approx1.909\) and \(-2/11\approx-0.1818\), but are not identical. Under repeated independent sampling, the sample moments converge to the population moments, and the OLS coefficients converge to the population projection.
Interpretation and a Common Pitfall
A projection coefficient summarizes the best linear fit for a specified set of regressors and a specified population distribution. If the regressor vector contains an intercept and one continuous variable, the slope describes how the fitted linear approximation changes per one-unit increase in that regressor. It need not equal the derivative of the conditional mean at any particular value. In multiple regression, it belongs to the best linear approximation using the included regressors; it is not automatically a structural parameter.
Common mistake: “OLS is consistent, so the coefficient must be the true causal effect.” This reasoning confuses the target of estimation with the meaning of the target. Consistency here means \(\hat{\boldsymbol{\beta}}\) converges to the population linear projection. The projection is defined by squared-error approximation, not by a causal intervention. A causal interpretation requires additional substantive identification assumptions, and linearity of the conditional mean is a separate modeling claim.
A related mistake is to read \(E[\mathbf{X}u^{*}]=0\) as proof that the residual has conditional mean zero. The normal equations impose only zero population cross-moments with the included regressors. Under misspecification, the conditional residual can still systematically vary with \(\mathbf{X}\). It is therefore important to state both what OLS estimates and what the resulting coefficients do not establish.
Check Your Understanding
Use the definitions and calculations above to answer the following questions.
- What does the population linear projection minimize, and why are finite second moments relevant to that definition?
- In the discrete example with probabilities \(1/2,1/4,1/4\), verify that the projection residuals at \(X=0,1,2\) have zero population mean and zero population cross-moment with \(X\).
- Why can the same nonlinear conditional mean produce different projection slopes under different distributions of the regressor?
- What sample-moment convergence argument explains why sample OLS can estimate the population projection without a linear conditional mean?
- Explain why consistency for a population projection does not, by itself, justify interpreting an OLS coefficient as a causal effect.