A few weeks ago I was asked to solve the following homework problem. The answer was published after it was submitted. The problem is as follows:
Let $y=X\beta + \epsilon$ where $\epsilon \sim N(0, \sigma^2I_N)$ where $I$ is the identity matrix and $N=10$ and $\beta$ is a vector of length $3$. We are told $y'y=58$ and the normal equations are: $$4\beta_1+2\beta_2-2\beta_3=4$$ $$2\beta_1+2\beta_2+\beta_3=7$$ $$-2\beta_1+\beta_2+6\beta_3=9$$
We are asked to find the least squares estimates of $\beta$ and $\sigma^2$.
I understand how to solve the system of equations to get $\hat{\beta}=[0,3,1]'$.
From here I have two questions:
How is it possible for $y'y=58$ when $y=[4,7,9]'$?
Using the formula from the textbook, $\hat{\sigma}^2 = \frac{1}{N-rank(X)}(y'y-\hat{\beta}'X'y)$. When I compute this using $X$ as given in the normal equations I get $95/7$. However when I transform $X$ to reduced row echelon form, the formula results in $\hat{\sigma}^2=4$ which is the correct answer. So my question on this front is, why is it necessary to transform $X$ to RREF, or is there some other aspect that I am missing here?
Thank you for your help.