Solved – Proof of Variance Formula for Central Chi-Squared Distribution

chi-squared-distributionmathematical-statisticsvariance

I wanted to know what the proof for the variance term in a central chi-squared distribution (degree n) is. I know that the answer is 2n, but I was wondering how to derive it.

Here's my attempt so far:

Let $X_2$ denote a variable governed by the central chi-squared distribution.

$Var(X_2) = E[(X_2)^2] – (E[X_2])^2$

$= E[(X_2)^2] – (n^2)$

I was able to prove that the mean of a central chi-squared distribution is it's degree (n), by using the formula:

$E[Za*Za] = Cov(Za, Za) + E[Za]^2$

$= sa*sa + 0$

$= sa^2 = 1^2 = 1.$

$E[X_2] = SUM(E[Za^2])$, a goes from 1 to n. (using linearity of expectation)

$= SUM(1)$, 1 to n

= n

where,

$X_2 = SUM(Za^2)$, a goes from 1 to n, and Za ~ N(0, 1) (this is the chi-squared definition)

sa = standard deviation, which in this case, is = 1.

So using this knowledge, the only term in the variance definition for the chi-squared distribution that I don't know, is $E[(X2)^2]$. However, I'm at a loss as to how to compute this. Any help here would be greatly appreciated.

N.B. This is my first post here, and I don't know a lot about mathematical typing. Pardon my poor notation and lack of detail in the question, if any. Would be happy to answer any counter-questions.

Thanks!

Best Answer

The $k$-th moment $E[X^k]$ of a general Gamma random variable with (order, rate) parameters $(s,\lambda)$ is \begin{align} E[X^k] &= \int_0^\infty x^k\cdot \underbrace{\lambda\frac{(\lambda x)^{s-1}}{\Gamma(s)}e^{-\lambda x}}_{\Gamma(s,\lambda)~\text{density}} \,\mathrm dx\\ &= \lambda^{-k}\int_0^\infty \lambda\frac{(\lambda x)^{k+s-1}}{\Gamma(s)} e^{-\lambda x}\,\mathrm dx\\ &= \lambda^{-k} \frac{\Gamma(k+s)}{\Gamma(s)}\int_0^\infty \underbrace{\lambda\frac{(\lambda x)^{k+s-1}}{\Gamma(k+s)}e^{-\lambda x}}_{\Gamma(k+s,\lambda)~\text{density}} \,\mathrm dx\\ &= \lambda^{-k} \frac{(k+s-1)\cdot(k+s-2)\cdot~\cdots~\cdot s\cdot\Gamma(s)}{\Gamma(s)}\\ &= \frac{(k+s-1)\cdot(k+s-2)\cdot~\cdots~\cdot s}{\lambda^{k}} \end{align} Applying this to the case of a $\chi^2$ random variable with $n$ degrees of freedom which is a $\Gamma\left(\frac n2,\frac 12\right)$ random variable, we get that $$E[X] = \frac{\left(\frac n2\right)}{\frac 12} = n; \quad E[X^2] = \frac{\left(\frac n2+1\right)\left(\frac n2\right)}{\left(\frac 12\right)^2} = n^2+2n$$ and $$ \operatorname{var}(X) = E[X^2] - (E[X])^2 = 2n.$$


Alternatively, from the properties of standard normal random variables, \begin{align} E[Z^4] &= \int_{-\infty}^\infty z^4 f(z)\,\mathrm dz = 2\int_0^\infty z^4 \frac{1}{\sqrt{2\pi}}e^{-z^2/2}\,\mathrm dz\\ &= \frac{4}{\sqrt{\pi}}\int_0^\infty y^{3/2}e^{-y}\,\mathrm dy \qquad\scriptstyle{\text{on substituting $y$ for $z^2/2$}}\\ &= \frac{4}{\sqrt{\pi}}\Gamma\left(\frac 52\right) = \frac{4}{\sqrt{\pi}} \times \frac 32 \times \frac 12 \times \sqrt{\pi}\\ &= 3 \end{align} and so \begin{align} E\left[\left(\sum_{i=1}^n Z_i^2\right)^2 \right] &= E\left[\sum_{i=1}^n Z_i^4\right] + 2 \sum_{i=1}^n\sum_{j=i+1}^n E[Z_i^2]E[Z_j^2]\\ &= 3n + n(n-1)\\ &= n^2+2n \end{align} giving $\displaystyle\operatorname{var}\left(\sum_{i=1}^n Z_i^2\right) = E\left[\left(\sum_{i=1}^n Z_i^2\right)^2 \right] - \left(E\left[\sum_{i=1}^n Z_i^2\right]\right)^2 = 2n$ as before.