Gauss–Markov Theorem and the Proof of BLUE

Digging into what OLS actually guarantees — the 5 assumptions behind linear regression and why they make your estimates BLUE according to the Gauss-Markov theorem.

I did go over this in Linear Regression in Finance (Derivatives I Studied #3) , but only pretty lightly. There, with the linear regression function written as $y = ax + b$,

B equals y-bar minus a times x-bar

The least-squares slope a written with sums, and as rho times sigma_y over sigma_x

in formula form, we played the game of finding the $y = ax + b$ that minimizes the sum of the squared errors of the data (SSE), and pinned down just $a$ and $b$ with a bit of simple differentiation.

But what does it all actually mean? What assumptions are sitting underneath it?

Et cetera, et cetera — let’s take a proper look at all that here.

From now on, I’m switching the notation y = ax + b to y = β_1 + β_2 x + e and y = b_1 + b_2 x, like that.

Haven’t really mentioned it yet, but $b$ is an estimate and $\beta$ is the parameter being estimated. I’ll introduce that properly further down.

The ‘certain conditions’

OK, so let’s ask it straight out. When we want to do a regression:

“Is that thing (minimizing the SSE) any good?” “And if it’s good, why is it good?”

Ask me that, and the honest answer would be: “That method isn’t always good ^^. But when certain conditions hold, it has the smallest variance among linear unbiased estimators!!!” So first, let me introduce those ‘certain conditions’ I just mentioned.

  1. For each value of x, the $y$ value is linear: y = β_1 + β_2 x + e.

  2. The expected value of the random error $e$ is E(e) = 0, because we assumed E(y) = β_1 + β_2 x.

  3. The variance of the random error $e$ is var(e) = σ^2 = var(y). (The random variables $y$ and $e$ have the same variance, because they differ only by a constant.)

  4. The covariance of a pair of random errors e_i and e_j is cov(e_i, e_j) = cov(y_i, y_j) = 0. (Uncorrelated does not mean independent or rule out every nonlinear relationship.)

  5. The variable $x$ is not random, and it has to take at least two different values.

  6. (Optional) $e$ is normally distributed around its own mean ($E(e) = 0$).

The three error-moment conditions can be summarized as follows. The linear model and fixed, nonconstant regressor requirement are still needed; they have not disappeared:

The three conditions as formulas: E(e) = 0, Var(e) = Var(y) = sigma squared, cov(e_i, e_j) = cov(y_i, y_j) = 0

Now, here’s what I’m getting at.

Say we’ve got some data, and as estimates we’ve settled b_1 and b_2 into y = b_1 + b_2 x. Of course, the way b_1 and b_2 got settled is ’that method’ from before, the ‘method of least squares’ that minimizes the SSE.

And when the doubt creeps in — can we trust y = b_1 + b_2 x or not!!! — we get to say: “If the data follow the 5 assumptions above, the regression line y = b_1 + b_2 x you pulled out is plenty trustworthy ^^” “It’s the best!” “It’s BLUE (Best Linear Unbiased Estimator) ^^*”

But why? How?? Who’s guaranteeing that?

The one vouching for it is the Gauss–Markov theorem.

What the conditions look like

So let me draw those conditions the data have to meet as a few little pictures. First, what $E(e) = 0$ means, as a picture:

Hand sketch of a regression line with errors e1 to e7 scattered above and below it, and the sum of the e_i equal to 0

The picture is an intuition aid, but zero expected error does not require symmetry. The fitted line is y = b_1 + b_2 x, and its fitted residuals sum to zero because least squares includes an intercept. That sample identity is different from $E(e_i)=0$ for the true population errors; true errors need not sum to zero in a particular sample.

The second one says the variance of the errors is homoskedastic, and the picture homoskedasticity stands for would look something like this.

Hand sketch of homoskedasticity: the same bell curve of the errors sitting on the regression line at x1 and at x2

The variance is the same at any $x$!

And the third formula, well, says the errors aren’t correlated with each other… that’s gotta be important, right? So: totally uncorrelated errors.

(If this one breaks, that’s when we head into autocorrelation models, right?)

The data, I mean. If they satisfy the assumptions above, then!!! these estimators we wrote down within the method of least squares,

B equals y-bar minus a times x-bar, once more

The least-squares slope a, once more

are the Best.

Estimator vs. estimate, and unbiasedness

OK, estimator and estimate are bound to get muddled, so let me finally sort them out. “The number you get by using a formula on a particular sample” is called an estimate, and “the rule or formula set up systematically to get that number” is called an estimator.

What we’re about to do now is describe the properties of the least-squares estimators. First, “if the mean of an estimator lines up with the parameter value” → “that estimator is called an unbiased estimator.”

I’ll show that the estimators we’ve set up, $b_1$ and $b_2$, are unbiased estimators. It’s simple. For $b_2$, all we need to show is E(b_2) = β_2. To get E(b_2) = β_2, let me first massage $b_2$ a little.

Handwritten steps rewriting b2 as the sum of w_i times y_i

Handwritten steps showing b2 = beta2 + sum of w_i e_i, with side checks that sum w_i = 0 and sum w_i x_i = 1

That’s the massaging, up to here, and then

Handwritten steps showing E(b2) = beta2

like this…

And $E(b_1) = \beta_1$, if we bother to do it with formulas too:

Step-by-step computation of E(b1) ending in beta1

Since we’ve checked E(b_1) = β_1 and E(b_2) = β_2, we’ve basically confirmed that our estimators are unbiased.

Computing the variance

So now, as the grounds for trusting $b_1, b_2$, we’re going to compute $\text{var}(b_1)$ and $\text{var}(b_2)$. The smaller those variances are, the more we get to say ‘you can trust it!!’ — right? Here we go again:

Handwritten derivation of Var(b2) = sigma squared over the sum of squared deviations of x

From now on I’ll type things in the equation editor whenever I possibly can… please forgive me just this once T_T

Proving it’s the minimum

So the variance of $b_2$, the estimator of $\beta_2$, looks like that.

But is that value really the minimum?!

Let me prove it!!! Say there’s another estimator $b_2^*$ that is linear in the observations and unbiased for $\beta_2$…

(Hah.. typing in the equation editor, seriously, lol. Phew…)

That thing… let’s say b_2* exists!!!

Whereas b_2 = Σ w_i y_i~ (this one came up in the middle steps above; dragging that photo over one more time, here it is.)

The b2 = sum of w_i y_i steps again

Let’s say b_2* = Σ k_i y_i, and for $k_i$, let’s go with k_i = w_i + c_i.

Handwritten steps for the rival estimator b2-star = sum of k_i y_i, and the conditions sum c_i = 0 and sum c_i x_i = 0

Handwritten derivation of Var(b2-star) = Var(b2) + sigma squared times the sum of c_i squared

Var(b2-star) minus Var(b2) equals sigma squared times the sum of c_i squared, so b2 wins

We should run the same check for $b_1$ too… I’ll leave that as homework.

Bye bye bye, then.


Heads-up. The figures here are the original notes, slips and all. A few things to watch for:

  • In the $E(b_2)$ picture, the first two lines write $\beta_1$ where $\beta_2$ is meant: $b_2 = \beta_2 + \sum w_i e_i$.
  • In the $E(b_1)$ picture, $\bar y$ is random, so the clean step is $E(\bar y) = \beta_1 + \beta_2\bar x$ (because $E(e_i) = 0$); then $E(b_1) = \beta_1 + \beta_2\bar x - \bar x\beta_2 = \beta_1$, the same result.
  • In the variance picture, the sum over $i \ne j$ already counts each pair twice, so the factor 2 goes with a sum over $i \lt j$; the term is zero either way.
  • In the $b_2^*$ picture, the $\sum c_i$ term carries $\beta_1$: the sum is $\beta_1\sum c_i + \beta_2 + \beta_2\sum c_i x_i + \sum(w_i + c_i)e_i$ (the picture writes $\beta_2\sum c_i$). The conditions $\sum c_i = 0$ and $\sum c_i x_i = 0$ come out the same.
  • At the end, $\mathrm{Var}(b_2^*) - \mathrm{Var}(b_2) = \sigma^2\sum c_i^2 \ge 0$, with equality only when every $c_i = 0$, that is, when $b_2^*$ is $b_2$ itself.
  • The picture with errors summing to zero describes fitted OLS residuals when an intercept is included. Zero expected population error does not require symmetry or a zero sample sum.

Questions or corrections?

Did a step lose you, or does a number look off? Email me or use the contact page. Include the note title and the step or figure you mean.

Feedback goes to me privately by email; it is not posted as a public comment.