# For the OLS estimator $\hat{\beta}$, show that: $SS_e(\beta)=SS_{Res}+(\beta-\hat{\beta})'X'X(\beta-\hat{\beta})$

All is in matrix notation!
Define the error sum squares as:
$SS_e(\beta)=(y-X\beta)'(y-X\beta)=y'y-2\beta'X'y+\beta'X'X\beta$

For the OLS estimator $\hat{\beta}$, show that:
$SS_e(\beta)=SS_{Res}+(\beta-\hat{\beta})'X'X(\beta-\hat{\beta})$

So we have: $SS_{Res}=(y-X\hat{\beta})'(y-X\hat{\beta})=y'y-y'X\hat{\beta}-\hat{\beta}'X'y+\hat{\beta}'X'X\hat{\beta}=y'y-2\hat{\beta}'X'y+\hat{\beta}'X'X\hat{\beta}$

and $(\beta-\hat{\beta})'X'X(\beta-\hat{\beta})=\beta'X'X\beta-\beta'X'X\hat{\beta}-\hat{\beta}'X'X\beta+\hat{\beta}'X'X\hat{\beta}=\beta'X'X\beta-2\hat{\beta}'X'X\beta+\hat{\beta}'X'X\hat{\beta}$

Together we get:
$y'y-2(\hat{\beta}'X'y+\hat{\beta}'X'X\beta-\hat{\beta}'X'X\hat{\beta})+\beta'X'X\beta$

Here is where I run into trouble, I can't manage to show that $\hat{\beta}'X'y+\hat{\beta}'X'X\beta-\hat{\beta}'X'X\hat{\beta}=\beta'X'y$

Could really need some help, thx.

• Ok, think I solved it. – Something Mar 2 '18 at 10:27

$\hat\beta'X'y=y'X(X'X)^{-1}X'y=y'Hy=y'\hat y=y'(y+e)=y'y+y'e=y'y$
$\hat\beta'X'X\beta=y'X(X'X)^{-1}X'X\beta=y'X\beta=\beta'X'y$
$\hat\beta'X'X\hat\beta=y'X(X'X)^{-1}X'X(X'X)^{-1}X'y=y'Hy=y'y$