Show that $\operatorname E\left(\frac{\widehat{E} \widehat{E}^T}{n-q}\right) = \Sigma$ We have $Y = X\beta+E,$ $X\in\mathbb R^{n\times q}$ and has rank $q,$ $n\gg q,$ $\beta\in\mathbb R^{q\times1},$ $E$ is a random vector taking values in $\mathbb R^n,$ $\operatorname{E}(E)=0\in\mathbb R^n,$ $\operatorname{var}(E) = \Sigma,$ so $\Sigma$ is a symmetric $n\times n$ real matrix. The variance $\Sigma$ is strictly positive-definite. As usual the hat matrix is the $n\times n$ matrix $H = X(X^T X)^{-1} X^T,$ of rank $q,$ which is the matrix of the orthogonal projection onto the column space of $X.$ And the vector of observable residuals is $\widehat E = (I-H)Y.$
The question is how to show that
$$\operatorname E \left(\frac{\widehat{E} \widehat{E}^T}{n-q} \right) = \Sigma$$

My Process:


*

*I know the $\operatorname E(\frac{1}{n-q}) = \frac{1}{n-q}$

*So I am left with $\operatorname E\left[\widehat{E} \widehat{E}^T \right]$

*This simplifies to $\operatorname E[Y^T (I-H) Y]$

*I don't believe I need to expand the hat-matrix $H$. 


What I want to do at this point is introduce $\Sigma$ somehow. The only thing I can think of is to introduce something like $\Sigma^{1/2} \Sigma^{-1/2}$ or $\Sigma \Sigma^{-1}$ but I'm not sure where or how to introduce this.
EDIT: Sorry for lack of clarity. This is a MULTIVARIATE STATISTICS problem. I've been so focused on just this that I forgot that other math exists :'D
$\Sigma$ is the Covariance Matrix. $n$ is the number of observations. $q$ independent variables. $\widehat{E}$ is the estimator for the error matrix.
 A: You have an $n\times n$ hat matrix whose rank is $q.$
The expected value $\operatorname E Y$ is in the column space of the hat matrix $H.$ Since $H^2=H,$ that implies $\operatorname E HY = \operatorname E Y.$ Therefore $\operatorname E ((I-H)Y) = 0.$
The fact that $H$ is symmetric and idempotent implies that $I-H$ is also symmetric and idempotent. Therefore $I-H = (I-H)^T(I-H).$ It follows that
$$
\operatorname{var}((I-H)Y) = (I-H)^T \Big( \operatorname{var}(Y) \Big) (I-H).
$$
At this point I'm wondering if you have some additional assumptions about the nature of the matrix $\Sigma = \operatorname{var}(Y).$ Very often one works with $\Sigma = \sigma^2 I,$ a positive scalar multiple of the identity matrix. In that case you'd have
$$
(I-H)^T \Big( \sigma^2 I\Big) (I-H) = \sigma^2 (I-H).
$$
Then you can say that since $I-H$ is a symmetric idempotent matrix of rank $n-q,$ there is some orthonormal basis of $\mathbb R^n$ with respect to which the matrix $I-H$ is transformed to
$$
\begin{bmatrix} 0 \\ & 0 \\ & & 0 \\ & & & \ddots \\ & & & & 1 \\ & & & & & 1 \\ & & & & & & \ddots \\ & & & & & & & 1 \end{bmatrix}
$$
where the number of $1$s on the diagonal is $n-q$ and the number of $0$s is $q.$ Hence $\widehat E^T\widehat E$ becomes a sum of squares of $n-q$ entries, each with expected value $\sigma^2.$
