Contents
03Unbiasedness
Is \hat\beta unbiased? To answer, we first say what “unbiased” means, and then which assumptions make it true.
3.1What unbiased means
Our slope, 10.2, comes from one study of 442 patients. Imagine repeating the whole study: recruit 442 new patients from the same population, measure their body mass index and, a year later, their disease progression, and fit a new line. Each study gives its own estimate: \hat\beta^{(1)} from study one, \hat\beta^{(2)} from study two, and so on. They differ, because every study has different patients with different errors. The estimator is unbiased if these estimates average out to the true coefficients:
where the expectation \E is the average over all such studies.
With real data we never see the true \beta, so we watch it in a game where we know the truth (Figure 2). Say the population’s true line is our fitted line, so the true slope is 10.2. Each simulated study draws 442 new patients, with body mass index spread like that of our patients, and gives each one a disease score: the true line plus a random error that averages zero. Two such studies give the slopes 10.22 and 9.45 (panel a). Repeat it 160 times: the slopes scatter from about 9 to 12, and their average, 10.3, is close to the true 10.2 (panel b); the more studies, the closer it gets. So unbiased does not mean right every time; it means right on average.
3.2The first two assumptions
Two assumptions make (7) hold, for the intercept and every slope. Both are about how the data were generated.
Definition 1 (Linearity and zero-mean errors). Assumption 1 (linearity). The model is linear in the coefficients: y=X\beta+\varepsilon, as in (1).
Assumption 2 (zero-mean errors). The errors average zero at every value of the inputs: \E[\varepsilon\mid X]=0.
In fact we do not need to worry about Assumption 1: once we write the equation, y is linear in \beta by construction. What makes it important is that y need not be linear in x. If the relationship curves, add x^2 as one more input, one more column of X: the model y=\beta_0+\beta_1x+\beta_2x^2+\varepsilon is still linear in \beta, so the closed form (5) and every result below apply unchanged; the same goes for columns such as \log x or a product x_1x_2. Linear regression therefore fits curves too: it is more powerful than the word “linear” suggests. Only a model in which a coefficient enters non-linearly, such as y=\beta_0e^{\beta_1x}+\varepsilon, falls outside and needs nonlinear least squares. The real worry, a bend in the truth that we fit with a straight line, is not a separate assumption: the bend lands in \varepsilon, so the errors no longer average zero at every x, and it is Assumption 2 that fails (Wooldridge, 2020, §3.3).
Zero-mean errors is the deep one. The error holds everything that affects y but is not in the model. Do not confuse it with the residuals: the residuals of a least-squares fit always average zero and are uncorrelated with every input, whatever the truth (the Pause and think of Chapter 2); Assumption 2 is about the true errors \varepsilon, which we never see. Assumption 2 says that nothing we left out moves with x: patients with high and low values of the inputs have, on average, the same left-out influences. We also need X to have full column rank, so that (5) exists; we return to that in Chapter 6.
Theorem 1 (Least squares is unbiased). Under Assumptions 1 and 2, \E[\hat\beta\mid X]=\beta.
Substitute y=X\beta+\varepsilon into (5):
Given X, the matrix (X^\top X)^{-1}X^\top is fixed, so \E[\hat\beta\mid X]=\beta+(X^\top X)^{-1}X^\top\,\E[\varepsilon\mid X]=\beta, by Assumption 2.
Equation (8) is worth remembering: the estimate is the truth plus a weighted sum of the errors. The theorem holds whatever the patients’ body mass index, that is, for every X, so it also holds averaged over new studies with new patients: \E[\hat\beta]=\E\bigl[\E[\hat\beta\mid X]\bigr]=\beta, which is (7). It does not mean that any one estimate is right, only that the method has no systematic tilt. Break Assumption 2, and \hat\beta is biased: the intercept and the slopes alike.
3.3When the errors do not average zero: omitted variables
The most common way to break Assumption 2 is to leave out a variable that matters and moves with an included one. Suppose the truth is y=\beta_0+\beta_1x_1+\beta_2x_2+\varepsilon, but we regress y on x_1 alone. Then \beta_2x_2 sits inside the error of the short model, and if x_2 moves with x_1, that error no longer averages zero at every x_1.
Proposition 1 (Omitted-variable bias). Let \tilde\beta_1 be the slope from regressing y on x_1 alone, and let \delta_1=\sum_i(x_{1i}-\bar x_1)(x_{2i}-\bar x_2)/\sum_i(x_{1i}-\bar x_1)^2 be the slope from regressing x_2 on x_1. If the true model contains both, then
By (6), \tilde\beta_1=\sum_i(x_{1i}-\bar x_1)y_i/S_{11} with S_{11}=\sum_i(x_{1i}-\bar x_1)^2 (the term with \bar y drops out because \sum_i(x_{1i}-\bar x_1)=0). Substitute y_i=\beta_0+\beta_1x_{1i}+\beta_2x_{2i}+\varepsilon_i; the same fact removes \beta_0, and \sum_i(x_{1i}-\bar x_1)x_{1i}=S_{11}, so
The last term has expectation zero given X.
The bias \beta_2\delta_1 needs both ingredients: the left-out variable must matter for y (\beta_2\neq0) and be correlated with the included one (\delta_1\neq0). Its sign is the product of the two signs. In any sample the same identity holds exactly, with the long regression’s estimates in place of \beta_1 and \beta_2.
Worked example 2 (Blood pressure picks up part of the effect of body mass index). Now fit a different regression: progression on average blood pressure (in mm Hg) alone, \hat y=\beta_0+\beta_1\,\mathrm{bp}. Each extra mm Hg goes with 2.46 more points of progression. Add body mass index as a second input, \hat y=\beta_0+\beta_1\,\mathrm{bp}+\beta_2\,\mathrm{bmi}, and the slope of blood pressure drops to 1.38 (Figure 3b). Why the drop? Heavier patients tend to have higher blood pressure (correlation 0.40, Figure 3a), so in the short regression blood pressure took credit for body mass index. The numbers obey (9) to the digit: 2.46=1.38+8.52\times0.1263, where 8.52 is the slope of body mass index in the long model and 0.1263 is how much heavier the patients are, on average, per mm Hg.
If the omitted term \beta_2\delta_1 is larger than \beta_1 and of the opposite sign, the short regression even gets the sign wrong: a hidden grouping variable reverses the trend seen within every group. That reversal is Simpson’s paradox (Simpson, 1951). No amount of data cures omitted-variable bias; only including the variable, or designing the study so that it cannot move with x (a randomized experiment), does.
So with the first two assumptions the slope is unbiased. But unbiased is not enough: an unbiased estimator can still vary a lot from sample to sample. What is the variance of \hat\beta, and could another unbiased estimator have less? Chapter 4 answers both.