I have a question which I posted below.
And I did its solution by my self as follows.
My first question, please check my answer. Is my solution way correct? Do I have any mistakes or missings in my solution?
The second one, which is the real one that I ask, the question gives me a hint as it is seen. But I did not use this hint. Therefore, I am not sure about my solution. How can I use this hint? Do I have any missing in my solution? Also is there any other solution way for my question by using this hint?
I am waiting for your opinions and comments about this issue. Thank you.




Your solutions seems right. Alternative approach: You should show that $$ \frac{\sum_{i=1}^n(\hat{y}_i - y_i)^2}{\sigma^2} \sim \chi^2_{(n-p)} $$ where $p$ is the number of coefficients. In a nutshell, it stems from the fact that each $\hat{y}_i$ is a linear combination of normal r.v's (the estimators of the coefficients) with expected value of $x_i\beta$ and vaiance of $\sigma^2 h_{ii}$, i.e., $$ \mathbb{E}[\hat{Y}|X]=X\beta, \quad Var(\hat{Y}|X) = \sigma^2X(X'X)^{-1}X'=\sigma^2H. $$ Hence, $\hat{Y}|X \sim \mathcal{N} (X\beta , \sigma^2 H)$. Thus (why?), $$ Y'(I-H)Y=\sum_{i=1}^n(\hat{y}_i - y_i)^2, $$ where $tr(I-H) = n-p$, which is the dimension of the orthogonal complement space. As such , $$ \mathbb{E}[\hat{\sigma}_{MLE}^2] = \mathbb{E}[\frac{\sum_{i=1}^n(\hat{y}_i - y_i)^2}{n} ] = \frac{n-p}{n}\sigma^2 \, . $$
I didn't write all the steps (like - why $Y'(I-H)Y \sim \sigma^2\chi^2_{(n-p)}$), but this is the main idea of the "heuristic" approach.