# conditional variance is equal to the variance

I know that a question with the same topic has been asked a few years ago (How do you derive the conditional variance for $s^2$, the OLS estimator of $\sigma^2$?) however, My question is kind of different.

I have to prove that $var(s^2|\textbf{X})=\frac{2\sigma^4}{(n-k)}$ where $s^2=\frac{e'e}{n-k}$ and $e=y-X\beta$

So far I'm given the term $s^2$ which is unconditional. I have to prove that it's conditional variance on $\textbf{X}$ is equal to what I have stated earlier. The first step in order to solve this is this

$var(s^2|\textbf{X})= var\big(\frac{e'e}{n-k}\big)$

What I fail to understand is when it is algebraically correct to set that the conditional variance of $s^2$ is equal to its unconditional variance. I know that once this is solved, we can see that the variance of $s^2$ does not depend on $\textbf{X}$, so this assumption makes sense, but how can I know that before hand? Is there even a way?

The rest is easy to compute and the solution is:

multiplying and dividing by $\sigma^2$ I get:

$var(s^2|\textbf{X})= \frac{\sigma^4}{(n-k)^2}var\big(\frac{e'e}{\sigma^2}\big)$

Knowing that $\big(\frac{e'e}{\sigma^2}\big)$ follows a Chi-Squared distribution with $(n-k)$ degrees of freedom, I get that $var\big(\frac{e'e}{\sigma^2}\big)=2(n-k)$. Thus I can simplify my expression

$var(s^2|\textbf{X}) = \frac{2\sigma^4}{(n-k)}$

• True, it was a typo from my side. Corrected now. Commented Dec 27, 2015 at 12:04
• "So far I'm given the term $s^2$ which is unconditional." ... no, $s^2$ is not the unconditional variance. Commented Dec 27, 2015 at 12:07
• The notation $|X$ is not a conditionning. You can drop it everywhere, consider $X$ is fixed, not random. This is totally useless and puzzling. Commented Dec 27, 2015 at 13:55