# Heteroskedasticity-robust White estimator

The heteroskedasticity-robust White estimator is defined as: \begin{align} V_{\hat{\beta}} = (X'X)^{-1}\left(\sum_{i=1}^n x_i x_i' \hat{e}_i^2 \right)(X'X)^{-1} \end{align} with X the matrix of observations of size $$(n,k)$$, $$x_i$$ the i-th observation of size $$(k,1)$$ and $$\hat{e}_i=y_i - \hat{y}_i$$ the observed i-th residual.

This estimator is biased, how do we prove that the unbiased estimator is: \begin{align} V_{\hat{\beta},unbiased} = \frac{n}{n-k}(X'X)^{-1}\left(\sum_{i=1}^n x_i x_i' \hat{e}_i^2 \right)(X'X)^{-1} \end{align} Here's what I've tried so far:

We know that the population variance is:

\begin{align} V_{{\beta}} = (X'X)^{-1}\left(\sum_{i=1}^n x_i x_i' \sigma_i^2 \right)(X'X)^{-1} \end{align}

I have: \begin{align} E[V_{\hat{\beta}}|X] &= E\left[(X'X)^{-1}\left(\sum_{i=1}^n x_i x_i' \hat{e}_i^2 \right)(X'X)^{-1} \vert X\right] \\ &= (X'X)^{-1}\left(\sum_{i=1}^n x_i x_i' E[\hat{e}_i^2\vert X] \right)(X'X)^{-1} \\ \end{align} In other words, we need to show that: \begin{align} E[\hat{e}_i^2\vert X] = \frac{n-k}{n}\sigma_i^2 \end{align}

Let's use the projection matrix $$M$$: \begin{align} M= I_n - P = I_n - X(X'X)^{-1}X' \end{align} Let's denote $$\hat{e} = (\hat{e}_1, \dots, \hat{e}_n)'$$ and $$e = (e_1, \dots, e_n)'$$, we have:

\begin{align} E(\hat{e}\hat{e}' \vert X) &= E(Me(Me)' \vert X)\\ &= M E(ee' \vert X) M \\ &= M D M \end{align} with $$D = diag(\sigma_1^2, \dots, \sigma_n^2)$$.

By definition, the diagonal of the left-hand-side of the equation is: \begin{align} diag(E(\hat{e}_1^2\vert X), \dots, E(\hat{e}_n^2\vert X)) \end{align}

So, to complete the proof, what I would like to show is that the diagonal on the right-hand-side of the equation is equal to: \begin{align} diag\left(\frac{n-k}{n}\sigma_1^2, \dots, \frac{n-k}{n}\sigma_n^2\right) \end{align}

• Please show us some effort, what have you tried to prove it? Also, add the self-study tag to your question, if its homework/assignment related. – Lucas Farias Mar 12 '19 at 4:30
• Can you give a precise reference for the statement to be proven? This may be useful: jstor.org/stable/pdf/1267698.pdf – Christoph Hanck Mar 12 '19 at 14:27
• Heuristically, under homoskedasticity, $E(\sum_i\hat e_i^2)=\sum_iE(\hat e_i^2)=(n-k)\sigma^2$, so that, on average, each squared residual is too small by a factor of $(n-k)/k$, see also stats.stackexchange.com/questions/64425/…. – Christoph Hanck Mar 12 '19 at 14:30