6 Conditional expectation and linear projection
Regression is simply a set of tools for evaluating the relationship between an outcome variable, \(Y_i\), and a set of covariates, \(\X_i\). In the next two chapters we will explore how to estimate a regression using least squares, but first we need to understand what it is that we are estimating. To that end, this chapter will explore what regression means in the population and focus on two potential targets of inference: the conditional expectation function and the best linear predictor. Applied work often conflates these concepts, but understanding the differences between them is crucial to understanding how least squares works.
Regression is so ubiquitous across many scientific fields that it has generated a lot of acquired notational baggage. In particular, the labels of the \(Y_i\) and \(\X_i\) vary greatly:
- The outcome can also be called: the response variable, the dependent variable, the labels (in machine learning), the left-hand side variable, or the regressand.
- The covariates are also called: the explanatory variables, the independent variables, the predictors, the right-hand side variables, the regressors, inputs, or features.
6.1 Conditional expectation functions and the need for modeling
A common way to measure the relationship between \(Y_i\) and \(\X_i\) is to show how the conditional mean of \(Y_i\) varies as a function of \(\X_i\). For example, we may want to know how voter wait times vary as a function of various demographic or socioeconomic features of the voter, like income, race, or class. We can accomplish this by estimating the conditional expectation function (CEF) of the outcome given the covariates, \[ \mu(\bfx) = \E[Y_i \mid \X_i = \bfx]. \] This function can tell us, for instance, how average voter wait times are different for members of different racial groups that all have the same income.
Why are estimation and inference for the CEF special? Why can’t we just use the approaches we have seen for the mean, variance, covariance, and so on? The fundamental problem with the CEF is that there may be many values \(\bfx\) that can occur and many different conditional expectations that we will need to estimate. If any variable in \(\X_i\) is continuous, we must estimate an infinite number of possible values of \(\mu(\bfx)\). While there are nonparametric approaches for a single continuous variable, the problem compounds exponentially as we add more variables, which we call the curse of dimensionality. How can we resolve this with our measly finite data?
6.1.1 Why do we need models?
At first glance, the connection between the CEF and parametric models might be hazy. For example, imagine we are interested in estimating the average voter wait times (\(Y_i\)) for Black voters (\(X_i = 1\)) versus non-Black voters (\(X_i=0\)). In that case, there are two parameters to estimate, \[ \mu(1) = \E[Y_i \mid X_i = 1] \quad \text{and}\quad \mu(0) = \E[Y_i \mid X_i = 0], \] which we could estimate by using the plug-in estimators that replace the population averages with their sample counterparts, \[ \widehat{\mu}(1) = \frac{\sum_{i=1}^{n} Y_{i}\mathbb{1}(X_{i} = 1)}{\sum_{i=1}^{n}\mathbb{1}(X_{i} = 1)} \qquad \widehat{\mu}(0) = \frac{\sum_{i=1}^{n} Y_{i}\mathbb{1}(X_{i} = 0)}{\sum_{i=1}^{n}\mathbb{1}(X_{i} = 0)}. \] These are just the sample averages of the wait times for Black and non-Black voters, respectively. And because the race variable here is discrete, we are simply estimating sample means within subpopulations defined by race. The same logic would apply if we had \(k\) racial categories: we would have \(k\) conditional expectations to estimate and \(k\) (conditional) sample means.
Now imagine that we want to know how the average wait time varies as a function of income so that \(X_i\) is (essentially) continuous. (Perhaps the theory here is that wait times may be lower for more affluent voters.) Now we have a different conditional expectation for every possible dollar amount from 0 to however much the wealthiest earner makes. Suppose we choose one particular income, $42,238, and that we are interested in the conditional expectation \(\mu(42{,}238)= \E[Y_{i}\mid X_{i} = 42{,}238]\). We could use the same plug-in estimator as in the discrete case, \[ \widehat{\mu}(42{,}238) = \frac{\sum_{i=1}^{n} Y_{i}\mathbb{1}(X_{i} = 42{,}238)}{\sum_{i=1}^{n}\mathbb{1}(X_{i} = 42{,}238)}. \] This is straightforward, but there is one glaring problem with this estimator: in all likelihood, no units in the particular dataset have that exact income, meaning this estimator is undefined because we would be dividing by zero.
One solution to this problem is to use subclassification to turn the continuous variable into a discrete one and then proceed with the discrete approach above. For example, we could group incomes into $25,000 bins and then calculate the average wait times of anyone between, say, $25,000 and $50,000 income. When we make this estimator switch for practical purposes, we need to connect it back to the DGP of interest. We could assume that the CEF of interest only depends on these binned means, giving us:
\[
\mu(x) =
\begin{cases}
\E[Y_{i} \mid 0 \leq X_{i} < 25{,}000] &\text{if } 0 \leq x < 25{,}000 \\
\E[Y_{i} \mid 25{,}000 \leq X_{i} < 50{,}000] &\text{if } 25{,}000 \leq x < 50{,}000\\
\E[Y_{i} \mid 50{,}000 \leq X_{i} < 75{,}000] &\text{if } 50{,}000 \leq x < 75{,}000\\
\vdots \\
\E[Y_{i} \mid 200{,}000 \leq X_{i} < 225{,}000] &\text{if } 200{,}000 \leq x < 225{,}000 \\
\end{cases}
\] This approach assumes, perhaps incorrectly, that the average wait time does not vary within the bins. Figure 6.1 shows a hypothetical joint distribution between income and wait times with the true CEF, \(\mu(x)\), shown in red.1 The figure also shows the bins created by subclassification and the implied CEF if we assume bin-constant means in blue. Note that the blue function approximates the true CEF but deviates from it close to the bin edges. The trade-off is that once we make the assumption that wait times do not vary within the bins, we only have to estimate one mean for every bin rather than an infinite number of means for each possible income.
Similarly, we could assume that the CEF follows a simple functional form such as a line: \[ \mu(x) = \E[Y_{i}\mid X_{i} = x] = \beta_{0} + \beta_{1} x. \] This assumption reduces our infinite number of unknowns (the conditional mean at every possible income) to just two unknowns: (1) the slope and (2) the intercept. As we will see, we can use ordinary least squares to estimate these parameters. Note that if the true CEF is nonlinear, this assumption is incorrect, and any estimate based on this assumption might be biased or even inconsistent for the CEF.
We call the binning and linear assumptions on \(\mu(x)\) functional form assumptions because they restrict the class of functions that \(\mu(x)\) can take. While powerful, these types of assumptions can muddy the roles of defining the quantity of interest and estimation. If our estimator \(\widehat{\mu}(x)\) performs poorly, it will be difficult to tell if this is because the estimator is flawed or our functional form assumptions are incorrect.
To clarify these issues, we will pursue a different approach: specifying a particular linear functional form under minimal assumptions and then investigating how well this estimand approximates the true CEF.
6.2 Population linear projection
6.2.1 Bivariate linear projection
Let’s set aside the idea of the conditional expectation function and instead focus on finding the linear function of a single covariate \(X_i\) that best predicts the outcome. Recall from your earlier mathematical training that linear functions have the form \(a + bX_i\). The best linear predictor (BLP) or population linear projection of \(Y_i\) on \(X_i\) is defined as \[ \begin{aligned} m(x) &= \beta_0 + \beta_1 x \quad\text{where} \\ (\beta_{0}, \beta_{1}) &= \argmin_{(b_{0}, b_{1}) \in \real^{2}}\; \E[(Y_{i} - b_{0} - b_{1}X_{i} )^{2}]. \end{aligned} \] The expression being minimized is the expected squared prediction error, or the (squared) distance between the observed outcome and the outcome as predicted with a particular slope and intercept. The best linear predictor is the line (that is, slope and intercept values) that results in the lowest expected squared prediction error. Note that this function is a feature of the joint distribution of the data—the DGP—and so we cannot observe it directly. It must be estimated. The BLP is an alternative to the CEF for summarizing the relationship between the outcome and the covariate, though, as we discuss later, they will sometimes be equal. We call \((\beta_{0}, \beta_{1})\) the population linear projection coefficients.
The BLP goes by many names, including the population linear regression. We avoid that term here because practitioners use the phrase “regression” loosely to refer to many different concepts including different statistical models and estimators.
We can solve for the best linear predictor using standard calculus (taking the derivative with respect to each coefficient, setting those equations equal to 0, and solving the system of equations). The first-order conditions, in this case, are \[ \begin{aligned} \frac{\partial \E[(Y_{i} - b_{0} - b_{1}X_{i} )^{2}]}{\partial b_{0}} = \E[-2(Y_{i} - \beta_{0} - \beta_{1}X_{i})] = 0 \\ \frac{\partial \E[(Y_{i} - b_{0} - b_{1}X_{i} )^{2}]}{\partial b_{1}} = \E[-2(Y_{i} - \beta_{0} - \beta_{1}X_{i})X_{i}] = 0 \end{aligned}, \] where we have evaluated the derivatives at the optimum values, \(\beta_0\) and \(\beta_1\), in the first equality of both lines.
Given the linearity of expectations, it is easy to solve for \(\beta_0\) in terms of \(\beta_1\), \[ \beta_{0} = \E[Y_{i}] - \beta_{1}\E[X_{i}]. \] We can plug this into the first-order condition for \(\beta_1\) to get \[ \begin{aligned} 0 &= \E[Y_{i}X_{i}] - (\E[Y_{i}] - \beta_{1}\E[X_{i}])\E[X_{i}] - \beta_{1}\E[X_{i}^{2}] \\ &= \E[Y_{i}X_{i}] - \E[Y_{i}]\E[X_{i}] - \beta_{1}(\E[X_{i}^{2}] - \E[X_{i}]^{2}) \\ &= \cov(X_{i},Y_{i}) - \beta_{1}\V[X_{i}]\\ \beta_{1} &= \frac{\cov(X_{i},Y_{i})}{\V[X_{i}]} \end{aligned} \]
Thus, the slope of the linear projection of \(Y_i\) on \(X_i\) is equal to the ratio of the covariance of the two variables divided by the variance of \(X_i\). It follows from this that the covariance will determine the sign of the slope: positive covariances will lead to positive \(\beta_1\) and negative covariances will lead to negative \(\beta_1\). If we define the correlation between these variables as \(\rho_{YX}\), then we can relate the coefficient to this quantity as \[ \beta_1 = \rho_{YX}\sqrt{\frac{\V[Y_i]}{\V[X_i]}}. \] From this, we can see that if \(Y_i\) and \(X_i\) are uncorrelated, \(\beta_1 = 0\). Furthermore, for a given correlation, the slope will be smaller in magnitude when \(X_i\) is more spread out and higher in magnitude when \(Y_i\) is more spread out.
Collecting these various results together, we can write the BLP as \[ m(x) = \beta_0 + \beta_1x = \E[Y_i] + \beta_1(x - \E[X_i]), \] which shows how we adjust our best guess about \(Y_i\) from the mean of the outcome using the covariate.
Be sure to remember that the BLP, \(m(x)\), and the CEF, \(\mu(x)\), are distinct entities. If the CEF is nonlinear, as in Figure 6.2, there will be a difference between these functions, meaning that the BLP might produce subpar predictions. We will derive a formal connection between the BLP and the CEF below.
6.2.2 Linear projection with multiple covariates
We now generalize the idea of a best linear predictor to a setting with an arbitrary number of covariates, which more flexibly captures real-life empirical research scenarios. In this setting, recall that the linear function will be
\[ \bfx'\bfbeta = \beta_0 + x_{1}\beta_{1} + x_{2}\beta_{2} + \cdots + x_{k}\beta_{k}. \] Define the \((k+1)\)-length random vector of covariates plus a constant as \(\X_i = (1, X_{i1}, X_{i2}, \ldots, X_{ik})'\). Then, we will define the best linear predictor (BLP) to be \[ \begin{aligned} m(\bfx) &= \bfx'\bfbeta, \quad \text{where} \\ \bfbeta &= \argmin_{\mb{b} \in \real^{k+1}}\; \E\bigl[ \bigl(Y_{i} - \mb{X}_{i}'\mb{b} \bigr)^2\bigr]. \end{aligned} \]
This BLP solves the same fundamental optimization problem as in the bivariate case: it chooses the set of coefficients that minimizes the mean-squared error, where the expectation is over the joint distribution of the data. We make the following mild assumptions to ensure the BLP exists. A matrix \(\mb{A}\) is positive definite if \(\mb{c}'\mb{A}\mb{c} >0\) for all \(\mb{c} \neq 0\).
Assumption 6.1 (Best linear projection assumptions)
- \(\E[Y_i^2] < \infty\) (outcome has finite mean/variance)
- \(\E\Vert \X_i \Vert^2 < \infty\) (\(\X_i\) has finite means/variances/covariances)
- \(\mb{Q}_{\mb{XX}} = \E[\X_i\X_i']\) is positive definite (no entry of \(\X_i\) is a perfect linear combination of the others).
Under these assumptions, it is possible to derive a closed-form expression for the population coefficients \(\bfbeta\) using matrix calculus.
Theorem 6.1 (Best linear predictor) Let \(\mb{Q}_{\X Y} = \E[\X_iY_i]\). Under Assumption 6.1, the population projection coefficients for the best linear predictor are \[ \bfbeta = \left(\E[\X_{i}\X_{i}']\right)^{-1}\E[\X_{i}Y_{i}] = \mb{Q}_{\mb{XX}}^{-1}\mb{Q}_{\mb{X}Y}. \]
Proof. To set up the optimization problem, we find the first-order condition by taking the derivative of the expectation of the squared errors. We know that this first-order condition will identify the minimum because the objective is convex in \(\mb{b}\) since \(\mb{Q}_{\X\X}\) is positive definite. First, take the derivative of the squared prediction errors using the chain rule: \[ \begin{aligned} \frac{\partial}{\partial \mb{b}}\left(Y_{i} - \X_{i}'\mb{b}\right)^{2} &= 2\left(Y_{i} - \X_{i}'\mb{b}\right)\frac{\partial}{\partial \mb{b}}(Y_{i} - \X_{i}'\mb{b}) \\ &= -2\left(Y_{i} - \X_{i}'\mb{b}\right)\X_{i} \\ &= -2\X_{i}\left(Y_{i} - \X_{i}'\mb{b}\right) \\ &= -2\left(\X_{i}Y_{i} - \X_{i}\X_{i}'\mb{b}\right), \end{aligned} \] where the third equality comes from the fact that \((Y_{i} - \X_{i}'\mb{b})\) is a scalar. We can plug this into the expectation to get the first-order condition and solve for \(\bfbeta\), \[ \begin{aligned} 0 &= -2\E[\X_{i}Y_{i} - \X_{i}\X_{i}'\bfbeta ] \\ \E[\X_{i}\X_{i}'] \bfbeta &= \E[\X_{i}Y_{i}]. \end{aligned} \] Multiplying by the inverse of \(\mb{Q}_{\mb{XX}}\) (which exists under Assumption 6.1) gives the result.
A key part of Assumption 6.1 is that \(\mb{Q}_{\mb{XX}}\) is positive definite, which is the matrix version of “positive.” We can see that \(\mb{Q}_{\mb{XX}}\) is the second derivative of the objective function, \(\E\left[ \left(Y_{i} - \mb{X}_{i}'\mb{b} \right)^2\right]\), and its positive definiteness means that this function will have a bowl shape with a unique minimum (rather than a trough with a flat floor). When there are multiple values of \(\mb{b}\) at the minimum, we say that the coefficients are not identified.
An equivalent condition in our context that none of the entries of \(\X_i\) are deterministic linear functions of any of the others. This condition is the population version of a no multicollinearity assumption that we will also see in Chapter 7.
This gives us an expression for the coefficients for the population best linear predictor in terms of the joint distribution \((Y_{i}, \X_{i})\).
A couple of facts might be useful for interpreting this expression substantively. Recall that \(\mb{Q}_{\mb{XX}} = \E[\X_{i}\X_{i}']\) is a \((k+1) \times (k+1)\) matrix and \(\mb{Q}_{\X Y} = \E[\X_{i}Y_{i}]\) is a \((k+1)\times 1\) column vector, which implies that \(\bfbeta\) is also a \((k+1) \times 1\) column vector.
What does the expression for the projection coefficients mean? It is helpful to separate the intercept or constant term, so let \(\X_{i,-0} = (X_{i1}, \ldots, X_{ik})'\) be the covariate vector without the intercept and \(\bfbeta_{-0} = (\beta_1, \ldots, \beta_k)'\) be the vector of associated coefficients. Then, we can write the model as \[ m(\X_i) = \beta_0 + \X_{i,-0}'\bfbeta_{-0}. \] In this case, we can write the coefficients in a more interpretable way: \[ \bfbeta_{-0} = \V[\X_{i,-0}]^{-1}\cov(\X_{i,-0}, Y_i), \qquad \beta_0 = \E[Y_i] - \E[\X_{i,-0}']\bfbeta_{-0}. \]
Thus, the population coefficients take the covariance between the outcome and the covariates and “divide” it by information about variances and covariances of the covariates. The intercept recenters the projection so that the prediction errors are mean zero. This means that these coefficients generalize the bivariate formula to this multiple covariate context.
With an expression for the coefficients, we can write the BLP as \[ m(\X_{i}) = \X_{i}'\left(\E[\X_{i}\X_{i}']\right)^{-1}\E[\X_{i}Y_{i}] = \X_{i}'\mb{Q}_{\mb{XX}}^{-1}\mb{Q}_{\mb{X}Y} \]
6.2.3 Beyond linear approximations
The linear part of the “best linear predictor” is less restrictive than it appears at first glance. When using multivariate BLP, we can define the covariates in clever ways to allow for a particular covariate to use a quadratic, cubic, or general polynomial function of \(X_i\) to predict \(Y_i\). For example, suppose we have a single continuous covariate of interest, \(X_i\). We can define the random vector \(\X_i = (1, X_i, X_i^2)'\) and calculate the BLP with regard to this vector: \[ \begin{aligned} m(\X_i) &= \beta_0 + \beta_1X_i + \beta_2X_i^2, \quad\text{where} \\ (\beta_0,\beta_1,\beta_2)&=\argmin_{(b_0,b_1,b_2) \in \mathbb{R}^3}\;\E[(Y_{i} - b_{0} - b_{1}X_{i} - b_{2}X_{i}^{2})^{2}]. \end{aligned} \] While the equation is now a quadratic function of the covariates, it is still a linear function of the unknown parameters \((\beta_{0}, \beta_{1}, \beta_{2})\), so we still call this a best linear predictor. Note that this vector does not violate Assumption 6.1 since \(X_i\) and \(X_i^2\) are nonlinear functions of one another so long as \(X_i\) takes on more than two values.
We could include higher-order terms of \(X_i\) in the same manner, and including more polynomial terms, \(X_i^p\), will allow the BLP to be a more flexible function of \(X_i\). When we estimate the BLP, however, we usually pay for this flexibility with overfitting and high variance in our estimates.
6.2.4 Projection error
The projection error is the difference between the actual value of \(Y_i\) and the projection, \[ e_{i} = Y_{i} - m(\X_{i}) = Y_i - \X_{i}'\bfbeta, \] where we have made no assumptions about this error yet. The projection error is simply the prediction error of the best linear prediction for a particular unit in the data. Rewriting this definition, we can see that we can always write the outcome as the linear projection plus the projection error, \[ Y_{i} = \X_{i}'\bfbeta + e_{i}. \] Notice that this looks suspiciously similar to a linearity assumption on the CEF, but we haven’t made any assumptions here. Instead, we just used the definition of the projection error to write a tautological statement: \[ Y_{i} = \X_{i}'\bfbeta + e_{i} = \X_{i}'\bfbeta + Y_{i} - \X_{i}'\bfbeta = Y_{i}. \] The critical difference between this representation and the usual linear model assumption is what properties \(e_{i}\) possesses.
A key property of the projection errors is that when the covariate vector includes an “intercept” or constant term, the projection errors are uncorrelated with the covariates. To see this, first note that \(\E[\X_{i}e_{i}] = 0\) since \[ \begin{aligned} \E[\X_{i}e_{i}] &= \E[\X_{i}(Y_{i} - \X_{i}'\bfbeta)] \\ &= \E[\X_{i}Y_{i}] - \E[\X_{i}\X_{i}']\bfbeta \\ &= \E[\X_{i}Y_{i}] - \E[\X_{i}\X_{i}']\left(\E[\X_{i}\X_{i}']\right)^{-1}\E[\X_{i}Y_{i}] \\ &= \E[\X_{i}Y_{i}] - \E[\X_{i}Y_{i}] = 0 \end{aligned} \] Thus, for every \(X_{ij}\) in \(\X_{i}\), we have \(\E[X_{ij}e_{i}] = 0\). Since one of the entries in \(\X_i\) is a constant 1, then this also implies that \(\E[e_{i}] = 0\). Together, these facts imply that the projection error is uncorrelated with each \(X_{ij}\), since \[ \cov(X_{ij}, e_{i}) = \E[X_{ij}e_{i}] - \E[X_{ij}]\E[e_{i}] = 0 - 0 = 0 \] Note that we still have made no assumptions about these projection errors except for some mild regularity conditions on the joint distribution of the outcome and covariates. Thus, in very general settings, we can write the linear projection model \(Y_i = \X_i'\bfbeta + e_i\) where \(\bfbeta = \left(\E[\X_{i}\X_{i}']\right)^{-1}\E[\X_{i}Y_{i}]\) and conclude that \(\E[\X_{i}e_{i}] = 0\) by definition, not by assumption.
The projection error is uncorrelated with the covariates, so does this mean that the CEF is linear? Unfortunately, no. To understand why, we define a weaker version of independence. A variable \(A\) is mean independent of another variable \(B\) if \(\E[A \mid B] = \E[A]\). Independence implies mean independence which in turn implies no correlation, but nothing holds in the reverse direction. So when we look at the CEF, we have \[ \E[Y_{i} \mid \X_{i}] = \X_{i}'\bfbeta + \E[e_{i} \mid \X_{i}], \] and the last term \(\E[e_{i} \mid \X_{i}]\) would only be 0 if the errors were mean independent of the covariates, so \(\E[e_{i} \mid \X_{i}] = \E[e_{i}] = 0\). But nowhere in the linear projection model did we assume this. So while we can (almost) always write the outcome as \(Y_i = \X_i'\bfbeta + e_i\) and have those projection errors be uncorrelated with the covariates, it will require additional assumptions to ensure that the true CEF is, in fact, linear: \(\E[Y_{i} \mid \X_{i}] = \X_{i}'\bfbeta\).
To step back for a moment, what have we shown here? In a nutshell, we showed that a population linear projection exists under very general conditions and that we can write the coefficients of that projection as a function of expectations of the joint distribution of the data. We did not, however, assume that the CEF was linear nor that the projection errors were normally distributed.
Why is this important? The ordinary least squares estimator, the workhorse regression estimator of the social sciences, targets this quantity of interest in large samples, regardless of whether the true CEF is linear or not. Thus, even when a linear CEF assumption is incorrect and the projection errors are not normally distributed, OLS still targets a perfectly valid quantity of interest: the coefficients from this population linear projection.
6.3 The BLP and the CEF
6.3.1 The BLP as the best linear approximation to the CEF
What is the relationship between the best linear predictor (which we just saw generally exists) and the CEF? To draw the connection, remember that the conditional expectation is the function of \(\X_i\) that best predicts \(Y_{i}\). The population linear projection was the best linear predictor, but the CEF is the best predictor among all nicely behaved functions of \(\X_{i}\), linear or nonlinear. To show this and to understand how the CEF and the best linear predictor relate, we can decompose the squared prediction error for any predictor \(g(\cdot)\) into two terms: the CEF prediction error and the error from \(g(\cdot)\) being different than the CEF.
Theorem 6.2 (CEF prediction decomposition) Let \(g(\cdot)\) be a function such that \(\E[g(\X_{i})^{2}] < \infty\). Then, \[ \E\left[(Y_{i} - g(\X_{i}))^{2}\right] = \E\left[(Y_i - \mu(\X_i))^2\right] + \E\left[(\mu(\X_i) - g(\X_i))^2\right] \]
Proof. Adding and subtracting \(\mu(\X_i)\) and then expanding terms, we have \[ \begin{aligned} \E\left[(Y_{i} - g(\X_{i}))^{2}\right] &= \E\left[(Y_{i} - \mu(\X_i) + \mu(\X_i) - g(\X_{i}))^{2}\right] \\ &= \E\left[(Y_{i} - \mu(\X_{i}))^{2}\right] + \E\left[(\mu(\X_i) - g(\X_{i}))^{2}\right] \\ &\;\;+ 2\E\left[(Y_i - \mu(\X_i))(\mu(\X_i) - g(\X_i))\right]. \end{aligned} \]
Using the law of iterated expectations, \(\E[Y_i\mu(\X_i)] = \E[\mu(\X_i)\E[Y_i \mid \X_i]] = \E[\mu(\X_i)^2]\) and, similarly, \(\E[Y_ig(\X_i)] = \E[\mu(\X_i)g(\X_i)]\). Using these facts, we can show that, \[ \begin{split} \E\left[(Y_i - \mu(\X_i))(\mu(\X_i) - g(\X_i))\right] &= \E[Y_i\mu(\X_i)] - \E[Y_ig(\X_i)] \\ & \;\; - \E[\mu(\X_i)^2] + \E[\mu(\X_i)g(\X_i)] \\ &= 0, \end{split} \] which gives the result.
From this decomposition, setting \(g = \mu\) shows that the CEF has lowest squared prediction error in this class of functions: \[ \mu(\X_i) = \E[Y_{i} \mid \X_{i}] = \argmin_{g(\X_i) \in L_2}\; \E\left[(Y_{i} - g(\X_{i}))^{2}\right]. \]
If we focus on linear predictors, \(g(\X_i) = \X_i'\mb{b}\), the first term in the decomposition of Theorem 6.2 does not depend on \(\mb{b}\). Thus, \(\bfbeta\) also minimizes the squared difference between the CEF and a linear predictor, \[ \bfbeta = \argmin_{\mb{b}} \E\left[(Y_i - \X_i'\mb{b})^2\right] = \argmin_{\mb{b}} \E\left[(\mu(\X_i) - \X_i'\mb{b})^2\right]. \tag{6.1}\] Thus, one important interpretation of the BLP is as the best linear approximation to the CEF, regardless of whether the CEF is linear or not.
So we have established that the CEF is the best predictor and the linear projection \(m(\X_{i})\) is the best linear predictor for both the outcome and the CEF. These facts allow us to connect the CEF to the linear projection.
Theorem 6.3 (Linear CEFs are BLPs) If \(\mu(\X_{i})\) is a linear function of \(\X_i\), then \(\mu(\X_{i}) = m(\X_{i}) = \X_i'\bfbeta\).
Proof. This follows immediately from Equation 6.1. If \(m(\X_i)\) is the best linear predictor of \(\mu(\X_i)\) and \(\mu(\X_i)\) is linear, then \(\mu(\X_i)\) must be exactly equal to \(m(\X_i)\).
This theorem says that if the true CEF is linear, it must equal the population linear projection. The proof of this is straightforward: the CEF is the best predictor, so if it is linear, it must also be the best linear predictor.
6.3.2 Saturated models: linear CEFs without assumptions
In general, we are in the business of learning about the CEF, so we are unlikely to know if it genuinely is linear or not. In some situations, however, we can write the CEF as an exact linear function without any additional assumptions. These are situations where the regressors saturate the possible values of \(\X_i\)—that is, there is an indicator for each combination of covariate values (other than a baseline combination absorbed by the constant). Going back to the example from the chapter introduction, suppose we are interested in the CEF of voter wait times for Black (\(X_i = 1\)) vs. non-Black (\(X_i = 0\)) voters. In this case, there are two possible values of the CEF, \(\mu(1) = \E[Y_{i}\mid X_{i}= 1]\), the average wait time for Black voters, and \(\mu(0) = \E[Y_{i}\mid X_{i} = 0]\), the average wait time for non-Black voters. Notice that we can write the CEF as \[ \mu(x) = x \mu(1) + (1 - x) \mu(0) = \mu(0) + x\left(\mu(1) - \mu(0)\right)= \beta_0 + x\beta_1, \] which is clearly a linear function of \(x\). Based on this derivation, we obtain coefficients of this linear CEF that have clear substantive interpretations:
- \(\beta_0 = \mu(0)\): the expected wait time for a non-Black voter.
- \(\beta_1 = \mu(1) - \mu(0)\): the difference in average wait times between Black and non-Black voters.
How \(X_{i}\) is defined here is important since the intercept will always be the average outcome when \(X_i = 0\), and the slope will always be the difference in means between the \(X_i = 1\) group and the \(X_i = 0\) group.
What about a categorical covariate with more than two levels? For example, we may be interested in wait times by party identification, where \(X_i = 1\) indicates Democratic voters, \(X_i = 2\) indicates Republican voters, and \(X_i = 3\) indicates Independent voters. We could write the CEF of wait times as a linear function of this variable, but that would assume that the difference between Democrats and Republicans is exactly the same as for Independents and Republicans—which is probably false. With more than two levels, we can represent a categorical variable as a vector of binary variables plus the constant, \(\X_i = (1, X_{i1}, X_{i2})'\), where \[ \begin{aligned} X_{i1} &= \begin{cases} 1&\text{if Republican} \\ 0 & \text{if not Republican} \end{cases} \\ X_{i2} &= \begin{cases} 1&\text{if Independent} \\ 0 & \text{if not Independent} \end{cases} \\ \end{aligned} \] These two indicator variables encode the same information as the original single three-level variable, \(X_{i}\), so if we know the values of \(X_{i1}\) and \(X_{i2}\), then we know exactly to which party \(i\) belongs. Thus, the CEFs for \(X_i\) and the pair of indicator variables, \(\X_i\), are precisely the same, but the latter allows for a lovely linear representation, \[ \E[Y_i \mid X_{i1}, X_{i2}] = \beta_0 + \beta_1 X_{i1} + \beta_2 X_{i2}, \] where
- \(\beta_0 = \E[Y_{i} \mid X_{i1} = 0, X_{i2} = 0]\) is the average wait time for the group that does not get an indicator variable (Democrats in this case). This group is sometimes called the baseline group or the omitted group.
- \(\beta_1 = \E[Y_{i} \mid X_{i1} = 1, X_{i2} = 0] - \E[Y_{i} \mid X_{i1} = 0, X_{i2} = 0]\) is the difference in means between Republican voters and Democratic voters, or the difference between the first indicator group and the baseline group.
- \(\beta_2 = \E[Y_{i} \mid X_{i1} = 0, X_{i2} = 1] - \E[Y_{i} \mid X_{i1} = 0, X_{i2} = 0]\) is the difference in means between Independent voters and Democratic voters, or the difference between the second indicator group and the baseline group.
This approach easily generalizes to categorical variables with an arbitrary number of levels.
What have we shown? The CEF is exactly linear in the saturated set of indicators. We can show that this continues to hold even when we have multiple categorical variables. We now have two binary covariates: \(X_{i1}=1\) indicating a Black voter, and \(X_{i2} = 1\) indicating a retired voter versus a working-age voter. These two binary variables give us four possible values of the CEF: \[ \mu(x_1, x_2) = \begin{cases} \mu_{00} & \text{if } x_1 = 0 \text{ and } x_2 = 0 \text{ (non-Black, working age)} \\ \mu_{10} & \text{if } x_1 = 1 \text{ and } x_2 = 0 \text{ (Black, working age)} \\ \mu_{01} & \text{if } x_1 = 0 \text{ and } x_2 = 1 \text{ (non-Black, retired)} \\ \mu_{11} & \text{if } x_1 = 1 \text{ and } x_2 = 1 \text{ (Black, retired)} \end{cases} \] We can write this as \[ \mu(x_{1}, x_{2}) = (1 - x_{1})(1 - x_{2})\mu_{00} + x_{1}(1 -x_{2})\mu_{10} + (1-x_{1})x_{2}\mu_{01} + x_{1}x_{2}\mu_{11}, \] which we can rewrite as \[ \mu(x_1, x_2) = \beta_0 + x_1\beta_1 + x_2\beta_2 + x_1x_2\beta_3, \] where the substantive interpretations are
- \(\beta_0 = \mu_{00}\): average wait times for working-age non-Black voters.
- \(\beta_1 = \mu_{10} - \mu_{00}\): difference in means for working-age Black vs. working-age non-Black voters.
- \(\beta_2 = \mu_{01} - \mu_{00}\): difference in means for retired non-Black vs. working-age non-Black voters.
- \(\beta_3 = (\mu_{11} - \mu_{01}) - (\mu_{10} - \mu_{00})\): difference in retired racial difference vs working-age racial difference.
Thus, we can write the CEF with two binary covariates as linear when the linear specification includes a multiplicative interaction between them (\(x_1x_2\)). This result holds for all pairs of binary covariates, and we can generalize the interpretation of the coefficients in the CEF as
- \(\beta_0 = \mu_{00}\): average outcome when both variables are 0.
- \(\beta_1 = \mu_{10} - \mu_{00}\): difference in average outcomes for the first covariate when the second covariate is 0.
- \(\beta_2 = \mu_{01} - \mu_{00}\): difference in average outcomes for the second covariate when the first covariate is 0.
- \(\beta_3 = (\mu_{11} - \mu_{01}) - (\mu_{10} - \mu_{00})\): change in the difference-in-average outcomes of the first (second) covariate when the second (first) covariate goes from 0 to 1.
This result also generalizes to an arbitrary number of binary covariates. If we have \(p\) binary covariates, then the CEF will be linear with all two-way interactions, \(x_1x_2\), all three-way interactions, \(x_1x_2x_3\), up to the \(p\)-way interaction \(x_1\times\cdots\times x_p\). Furthermore, we can generalize to arbitrary numbers of categorical variables by expanding each into a series of binary variables and then including all interactions between the resulting binary variables.
We have established that when regressors saturate the covariate levels, the true CEF will be linear, and we have seen the various ways to represent that CEF. Note that when we use, for example, ordinary least squares, we are free to choose how to include our variables. We could run a regression of \(Y_i\) on \(X_{i1}\) and \(X_{i2}\) without an interaction term, but this model will only be equal to the CEF if \(\beta_3\) is equal to 0, and so the interaction term is irrelevant (otherwise, it will still be a valid BLP, just not the CEF). A saturated model can, by its nature, always be written as a linear function without assumptions, and, by Theorem 6.3, this saturated BLP must recover the CEF exactly. The above examples show how to construct saturated models in various situations.
6.4 Interpretation of the projection coefficients
We have seen how to interpret population projection coefficients when the CEF is linear without assumptions. How do we interpret the population coefficients \(\bfbeta\) in other settings?
Consider the simplest case, one in which every entry in \(\X_{i}\) represents a different covariate and no covariate is any function of another (we will see why this caveat is necessary below). In this simple case, the \(j\)th coefficient, \(\beta_{j}\), represents the change in the predicted outcome for a one-unit change in the \(j\)th covariate \(X_{ij}\), holding all other covariates fixed. We can see this from \[ \begin{aligned} m(x_{1} + 1, x_{2}) & = \beta_{0} + \beta_{1}(x_{1} + 1) + \beta_{2}x_{2} \\ m(x_{1}, x_{2}) &= \beta_{0} + \beta_{1}x_{1} + \beta_{2}x_{2}, \end{aligned} \] so that the change in the predicted outcome for increasing \(X_{i1}\) by one unit is \[ m(x_{1} + 1, x_{2}) - m(x_{1}, x_{2}) = \beta_1. \] Notice that nothing changes in this interpretation when adding more covariates to the vector, \[ m(x_{1} + 1, \bfx_{2}) - m(x_{1}, \bfx_{2}) = \beta_1. \] The coefficient on a particular variable is the change in the predicted outcome corresponding to a one-unit change in the covariate holding all other covariates constant. Each coefficient summarizes the “all else equal” difference in the predicted outcome for each covariate. Section 6.5 will make precise what we mean by “holding fixed” in the context of a linear projection.
6.4.1 Polynomial functions of the covariates
The interpretation of the linear projection coefficients becomes more complicated when including nonlinear functions of the covariates. In that case, multiple coefficients control how a change in a covariate will change the predicted value of \(Y_i\). For example, suppose we have a quadratic function of \(X_{i1}\), \[ m(x_1, x_1^2, x_{2}) = \beta_{0} + \beta_{1}x_{1} + \beta_{2}x_{1}^{2} + \beta_{3}x_{2}, \] and try to look at a one-unit change in \(x_1\), \[ \begin{aligned} m(x_{1} + 1, (x_{1} + 1)^{2}, x_{2}) & = \beta_{0} + \beta_{1}(x_{1} + 1) + \beta_{2}(x_{1} + 1)^{2}+ \beta_{3}x_{2} \\ m(x_{1}, x_{1}^{2}, x_{2}) &= \beta_{0} + \beta_{1}x_{1} + \beta_{2}x_{1}^{2} + \beta_{3}x_{2}, \end{aligned} \] resulting in \(\beta_1 + \beta_2(2x_{1} + 1)\). This formula might be an interesting quantity, but we more commonly use the derivative of \(m(\bfx)\) with respect to \(x_1\) as a measure of how \(X_{i1}\) changes the predicted value of \(Y_i\) (holding all other variables constant). We refer to this as the “marginal change” where marginal means the change in prediction for a very small change in \(X_{i1}\). In the case of the quadratic covariate, we have \[ \frac{\partial m(x_{1}, x_{1}^{2}, x_{2})}{\partial x_{1}} = \beta_{1} + 2\beta_{2}x_{1}, \] so the marginal change in prediction varies as a function of \(x_1\). From this, we see that the individual interpretations of the coefficients are less interesting: \(\beta_1\) is the marginal change when \(X_{i1} = 0\) and \(2\beta_2\) describes how a one-unit difference in \(X_{i1}\) alters the marginal change. As is hopefully clear, it will often be more straightforward to visualize the nonlinear predictor function.
6.4.2 Interactions
Another common nonlinear function occurs when including interaction terms or covariates that are products of two other covariates, \[ m(x_{1}, x_{2}, x_{1}x_{2}) = \beta_{0} + \beta_{1}x_{1} + \beta_{2}x_{2} + \beta_{3}x_{1}x_{2}. \] In these situations, we can use the derivative of the BLP to measure the marginal effect of one variable or the other on the predicted value of \(Y_i\). In particular, we have \[ \begin{aligned} \frac{\partial m(x_{1}, x_{2}, x_{1}x_{2})}{\partial x_1} &= \beta_1 + \beta_3x_2, \\ \frac{\partial m(x_{1}, x_{2}, x_{1}x_{2})}{\partial x_2} &= \beta_2 + \beta_3x_1. \end{aligned} \] Here, the coefficients are slightly more interpretable:
- \(\beta_1\): the marginal effect of \(X_{i1}\) on predicted \(Y_i\) when \(X_{i2} = 0\).
- \(\beta_2\): the marginal effect of \(X_{i2}\) on predicted \(Y_i\) when \(X_{i1} = 0\).
- \(\beta_3\): the change in the marginal effect of \(X_{i1}\) due to a one-unit change in \(X_{i2}\) OR the change in the marginal effect of \(X_{i2}\) due to a one-unit change in \(X_{i1}\).
If we add more covariates to this BLP, these interpretations change to “holding all other covariates constant.”
Interactions are a standard part of social science research because they allow us to assess how the relationship between the outcome and an independent variable varies by the values of another variable. In the context of our study of voter wait times, if \(X_{i1}\) is income and \(X_{i2}\) is the Black/non-Black voter indicator, then \(\beta_3\) represents the change in the slope of the wait time–income relationship between Black and non-Black voters.
In many cases, the coefficients on the lower-order terms (\(\beta_1\) for \(X_{i1}\) and \(\beta_2\) for \(X_{i2}\)) are uninteresting because they represent the marginal effect of one variable when the other is 0. Switching our running example, suppose \(X_{i1}\) is age and \(X_{i2}\) is the Black/non-Black indicator, then \(\beta_2\) is the difference in predicted voter wait times for voters who are zero years old, an obviously nonsensical parameter. We can improve the interpretability of the coefficient by recentering the age variable. Suppose we include a mean-centered version of age, \[ \widetilde{X}_{i1} = X_{i1} - \E[X_{i1}] \] in place of \(X_{i1}\). That is, we regress \(Y_i\) on \(\widetilde{\X}_i = (1, \widetilde{X}_{i1}, X_{i2}, \widetilde{X}_{i1}X_{i2})\). These regressors are just an invertible linear transformation of the original \(\X_i\), so the two BLPs must be the same function. Thus, to see how to interpret the coefficients from this new BLP, we can substitute \(X_{i1} = \widetilde{X}_{i1} + \E[X_{i1}]\) into the original BLP: \[ \begin{aligned} m(\X_i) &= \beta_0 + \beta_1 X_{i1} + \beta_2 X_{i2} + \beta_3 X_{i1}X_{i2} \\ &= \beta_0 + \beta_1 (\widetilde{X}_{i1} + \E[X_{i1}]) + \beta_2 X_{i2} + \beta_3 (\widetilde{X}_{i1} + \E[X_{i1}])X_{i2} \\ &= \underbrace{(\beta_0 + \beta_1 \E[X_{i1}])}_{\widetilde{\beta}_0} + \underbrace{\beta_1}_{\widetilde{\beta}_1} \widetilde{X}_{i1} + \underbrace{(\beta_2 + \beta_3 \E[X_{i1}])}_{\widetilde{\beta}_2}X_{i2} + \underbrace{\beta_3}_{\widetilde{\beta}_3}\widetilde{X}_{i1}X_{i2}. \end{aligned} \] In this case, \(\widetilde{\beta}_2\) (the coefficient on the race indicator \(X_{i2}\) in the transformed BLP) is the marginal change in the prediction of \(X_{i2}\) when \(\widetilde{X}_{i1} = 0\) or when \(X_{i1} = \E[X_{i1}]\). Thus, this coefficient is now the difference in predicted voter wait times for the average-aged voter, which is far more interpretable. The recentering changes the interpretation of the intercept as well. As the display shows, however, \(\widetilde{\beta}_1 = \beta_1\) and \(\widetilde{\beta}_3 = \beta_3\), so the coefficients on age and the interaction are unchanged.
6.5 Multivariate coefficients from orthogonal projection
We often interpret the linear projection coefficients as describing the relationship between the outcome and a covariate holding the other covariates fixed. But the formula for the coefficients does not make that interpretation obvious. Another way to represent multivariate linear projection—through orthogonal projection–helps to build intuition.
We can start with a linear projection of an outcome on two covariates. Consider the following BLP: \[ (\alpha, \beta, \gamma) = \argmin_{(a,b,c) \in \mathbb{R}^{3}} \; \E[(Y_{i} - (a + bX_{i} + cZ_{i}))^{2}] \tag{6.2}\] Can we understand the \(\beta\) coefficient here in terms of a bivariate linear projection? As it turns out, yes. From the above results, we know that the intercept has a simple form: \[ \alpha = \E[Y_i] - \beta\E[X_i] - \gamma\E[Z_i]. \] Let’s investigate the first-order condition for \(\beta\): \[ \begin{aligned} 0 &= \E[Y_{i}X_{i}] - \alpha\E[X_{i}] - \beta\E[X_{i}^{2}] - \gamma\E[X_{i}Z_{i}] \\ &= \E[Y_{i}X_{i}] - \E[Y_{i}]\E[X_{i}] + \beta\E[X_{i}]^{2} + \gamma\E[X_{i}]\E[Z_{i}] - \beta\E[X_{i}^{2}] - \gamma\E[X_{i}Z_{i}] \\ &= \cov(Y_i, X_i) - \beta\V[X_{i}] - \gamma \cov(X_{i}, Z_{i}) \end{aligned} \] We can see from this that if \(\cov(X_{i}, Z_{i}) = 0\), then the coefficient on \(X_i\) will be the same as in the bivariate projection case, \(\cov(Y_{i}, X_{i})/\V[X_{i}]\).
To write a simple formula for \(\beta\) when the covariates are not orthogonal, we orthogonalize \(X_i\) by obtaining the prediction errors from a population linear projection of \(X_i\) on \(Z_i\): \[ \begin{aligned} \widetilde{X}_{i} &= X_{i} - (\lambda_{0} + \lambda_{1}Z_{i}) \quad\text{where}\quad \\ (\lambda_{0}, \lambda_{1}) &= \argmin_{(b_{0},b_{1}) \in \mathbb{R}^{2}} \; \E[(X_{i} - (b_{0} + b_{1}Z_{i}))^{2}] \end{aligned} \] Given the properties of projection errors, we know that this orthogonalized version of \(X_{i}\) will be uncorrelated with \(Z_{i}\) since \(\E[\widetilde{X}_{i}Z_{i}] = 0\). In fact, the coefficient on \(X_i\) from the “long” BLP in Equation 6.2 is the same as the coefficient from the projection of \(Y_i\) on this orthogonalized \(\widetilde{X}_i\). To see this, let’s substitute the linear projection of \(Y_i\) onto \((1, X_i, Z_i)\) into the covariance for that projection: \[ \cov(Y_{i}, \widetilde{X}_{i}) = \cov(\alpha + \beta X_i + \gamma Z_i + e_i, \widetilde{X}_i) = \beta\cov(X_i, \widetilde{X}_i) + \gamma\cov(Z_i, \widetilde{X}_i) + \cov(e_i, \widetilde{X}_i). \] As described above, we know \(\cov(Z_i, \widetilde{X}_i) = 0\) by construction. The last term is also zero because \(\widetilde{X}_i\) is a linear function of \(X_i\) and \(Z_i\), both of which are uncorrelated with the projection error from Equation 6.2. Now, notice that this also implies that \(\cov(\pi_0 + \pi_1 Z_i, \widetilde{X}_i) = 0\) so we have the following: \[ \begin{aligned} \cov(X_i, \widetilde{X}_i) &= \cov(X_i, \widetilde{X}_i) - \cov(\pi_0 + \pi_1 Z_i, \widetilde{X}_i) \\ &= \cov(\widetilde{X}_i, \widetilde{X}_i) \\&= \V[\widetilde{X}_i] \end{aligned} \] Combining these facts, we have \(\cov(Y_{i}, \widetilde{X}_{i}) = \beta \V[\widetilde{X}_i]\), or \[ \beta = \frac{\cov(Y_{i}, \widetilde{X}_{i})}{\V[\widetilde{X}_{i}]}. \] This is the population version of the Frisch-Waugh-Lovell theorem (Frisch and Waugh 1933; Lovell 1963) (see Section 7.6).
We can expand this idea to when there are several other covariates. Suppose now that we project \(Y_i\) on \(\X_i\) and are interested in the coefficient on the \(j\) th covariate. Let \(\X_{i,-j}\) be the vector of covariates omitting the \(j\)th entry but retaining the constant and let \(\widetilde{m}_j(\X_{i,-j})\) represent the BLP of \(X_{ij}\) on these other covariates. We can define \(\widetilde{X}_{ij} = X_{ij} - \widetilde{m}_{j}(\X_{i,-j})\) as the \(j\)th variable orthogonalized with respect to the rest of the variables and we can write the coefficient on \(X_{ij}\) as \[ \beta_j = \frac{\cov(Y_i, \widetilde{X}_{ij})}{\V[\widetilde{X}_{ij}]}. \] Thus, the linear projection coefficient in the BLP is the same as the coefficient from a bivariate projection of the outcome on the projection error for \(X_{ij}\) projected on all other covariates. One interpretation of coefficients in a multivariate projection is that they represent the relationship between the outcome and the covariate after removing the linear relationships of all other variables.
6.6 Omitted variable bias
In many situations, we may need to reason about variables we omitted from a particular linear projection, often because we have no ability to measure that variable. In our voting wait times example, we might want to include a respondent’s sense of civic duty but we may lack any good survey instrument for this concept. It will be useful, then, to understand theoretically how adding this variable would change our projection coefficients.
Suppose we have our usual BLP \(m(\X_{i}) = \X_i'\bfbeta\) and let \(Z_i\) be the variable we are considering adding to our projection. We can write this new projection as \[ m(\X_i, Z_i) = \X_i'\bs{\delta} + Z_i\gamma. \] In this context, we sometimes refer to \(m(\X_i, Z_i)\) as the long projection and \(m(\X_i)\) as the short projection.
Recall from the definition of the BLP that we can write the short coefficients as \[ \bfbeta = \left(\E[\X_{i}\X_{i}']\right)^{-1} \E[\X_{i}Y_{i}]. \] Letting \(u_i = Y_i - m(\X_{i}, Z_{i})\) be the projection errors from the long projection, we can write this as \[ \begin{aligned} \bfbeta &= \left(\E[\X_{i}\X_{i}']\right)^{-1} \E[\X_{i}(\X_{i}'\bs{\delta} + Z_{i}\gamma + u_{i})] \\ &= \left(\E[\X_{i}\X_{i}']\right)^{-1}(\E[\X_{i}\X_{i}']\bs{\delta} + \E[\X_{i}Z_{i}]\gamma + \E[\X_{i}u_{i}]) \\ &= \bs{\delta} + \left(\E[\X_{i}\X_{i}']\right)^{-1}\E[\X_{i}Z_{i}]\gamma \end{aligned} \] Note that the vector in the second term is the vector of linear projection coefficients of a population linear projection of \(Z_i\) on \(\X_i\). If we call these coefficients \(\bs{\pi}\), then the short coefficients are \[ \bfbeta = \bs{\delta} + \bs{\pi}\gamma. \tag{6.3}\]
We can rewrite this to show that the difference between the coefficients in these two projections is the product of \(\gamma\), the coefficient on the “excluded” \(Z_i\), and \(\bs{\pi}\), the coefficient from the BLP of the excluded \(Z_i\) on the included \(\X_i\).
Consider the case where the short projection only has a single independent variable (other than the constant), \(X_i\), and so the coefficients on \(X_i\) are \(\beta_1\) in the short projection and \(\delta_1\) in the long projection. If the partial correlation between \(Y_i\) and \(Z_i\) and the correlation between \(X_i\) and \(Z_i\) are the same sign, Equation 6.3 tells us omitting \(Z_i\) increases the coefficient for \(X_i\) (\(\beta_1 > \delta_1\)). When those correlations are of opposite sign, omitting \(Z_i\) decreases the coefficient (\(\beta_1 < \delta_1\)).
Most textbooks refer to this difference as the omitted variable bias of omitting \(Z_i\) under the idea that \(\bs{\delta}\) is the true target of inference. This phrasing presupposing the long projection is the target (which may or may not be true), but the result is much broader since it tells us how to relate the coefficients of any two nested projections.
The last two results (orthogonal projection and omitted variable bias) are sometimes presented as results for the ordinary least squares estimator that we will show in the next chapter. We introduce them here as features of a particular population quantity, the linear projection.
6.7 Drawbacks of the BLP
The best linear predictor is, of course, a linear approximation to the CEF, and this approximation could be quite poor if the true CEF is highly nonlinear. A more subtle issue with the BLP is that it is sensitive to the marginal distribution of the covariates when the CEF is nonlinear. The BLP is “best” on average over the distribution of the covariates, so changing the distribution of the covariates will also change what linear predictor is best. Indeed, Equation 6.1 showed that the BLP minimizes the squared distance to the CEF weighted by the distribution of \(\X_i\). Let’s return to our example of voter wait times and income. In Figure 6.3, we show the true CEF and the BLPs when we restrict income below $50,000 or above $100,000. The BLP can vary quite dramatically here. This figure is an extreme example, but the essential point still holds as the marginal distribution of \(X_i\) changes.
6.8 Summary
As we discussed in this chapter, with even a moderate number of covariates, conditional expectation functions become very difficult to estimate because of the high dimensionality involved. To avoid this problem, we can focus on a different quantity, the best linear predictor, which is the linear function of the covariates that best predicts the outcome in mean-squared error. The BLP exists under very mild conditions and has a clear interpretation as the best linear summary of the CEF over the distribution of the covariates. Another strategy is to impose a linearity assumption on the conditional expectation function to make it more estimable, in which case, the BLP and the CEF are the same function. With a small number of discrete covariates it is possible to saturate a model so that linearity holds mechanically. Coefficients on population linear projections with multiple independent variables can always be written in terms of a projection of the outcome on one variable orthogonalized relative to the rest of the independent variables. The omitted variable bias formula shows how leaving a variable out of the best linear predictor affects the coefficients on other independent variables. In the next chapter, we will turn to using data to estimate the coefficients for these population linear projections.
The true DGP in this case is \(X_i = 10000e^{1.5 + 0.75 Z_i}\) where \(Z_i \sim \N(0, 1)\) so \(X_i\) is log-normal. The outcome \(Y_i\) is Poisson with rate \(e^{4 - (0.15 / 10000) X_i}\).↩︎