- #1

- 479

- 4

## Homework Statement

Suppose that ##Y \sim N_n\left(X\beta,\sigma^2I\right)##, where the density function of ##Y## is

$$\frac{1}{\left(2\pi\sigma^2\right)^{\frac{n}{2}}}e^{-\frac{1}{2\sigma^2}(Y-X\beta)^T(Y-X\beta)},$$

and ##X## is an ##n\times p## matrix of rank ##p##.

Let ##\hat{\beta}## be the least squares estimator of ##\beta##.

Show that ##(Y-X\beta)^T(Y-X\beta) = \left(Y-X\hat{\beta}\right)^T(Y-X\hat{\beta})+\left(\hat{\beta}-\beta\right)^TX^TX\left(\hat{\beta}-\beta\right)## and therefore that ##\hat{\beta}## is the least squares estimate.

Hint: ##Y-X\beta = Y-X\hat{\beta}+X\hat{\beta}-X\beta##.

## Homework Equations

## The Attempt at a Solution

I have no idea where to start. Do I substitute the hint into ##(Y-X\beta)^T(Y-X\beta)## and expand out the brackets?

Please help!