# Math Help - Variance

1. ## Variance

$\displaystyle f(x)=\frac{1}{2^{n/2}\Gamma\left(\frac{n}{2}\right)}x^{\frac{n}{2}-1}e^{-x/2}$

$\displaystyle M(t)=\text{E}[e^{tX}]=\frac{1}{2^{n/2}\Gamma\left(\frac{n}{2}\right)}\lim_{b\to\infty} \int_0^bx^{\frac{n}{2}-1}e^{-x\left(\frac{1}{2}-t\right)} \ dx$

$\displaystyle =\frac{1}{2^{n/2}\Gamma\left(\frac{n}{2}\right)}\Gamma\left(\frac {n}{2}\right)\left(\frac{1}{\frac{1}{2}-t}\right)^{\frac{n}{2}}=(1-2t)^{-\frac{n}{2}}$

$\displaystyle\left[\frac{dM(t)}{dt}\right]_{t=0}=n$

$\displaystyle\left[\frac{d^2M(t)}{dt^2}\right]_{t=0}=n(n+2)$

$\text{Var}[X]=n^2+2n-n^2=2n$

Correct?

2. I wouldn't have done it that way, but yes, it is correct.

3. By the way this is a $\Gamma({n\over 2},2)=\chi^2_n$ random variable.

You can prove that the MGF of a $\Gamma(\alpha, \beta)$ random variable is $(1-\beta t)^{-\alpha}$
Then plug in the n/2 and 2.