I need to know how to compute the second moment of a Chi-square distribution with the Moment Generating Function. I know that the second moment of the Chi-square distribution is given by $\mu'_2 = r(r+2)$. But when I try to derive it, I don't get this answer.
This is what I get if I try it myself:
Moment Generating Function of the Chi-Square is given by $M_X(t) = (1-2t)^{-r/2}$
First moment $\mu'_1 = M_X'(0)=-2*{-r/2}(1-2t)^{-3r/2} =r(1-2t)^{-3r/2}|_{t=0}=r$
Second Moment $\mu'_2 = M_X''(0) =-3/2r^2*-2(1-2)^{-5r/2}=3r^2(1-2)^{-5r/2}|_{t=0}=3r^2$
As you can see the answer of the second moment I derived should not be correct. How do I solve this problem?
Best Answer
You made a mistake while taking the derivatives.
$$M_X'(t) = \dfrac{d}{dt} (1 - 2t)^{-r/2} = \dfrac{2r}{2} (1-2t)^{-r/2 -1} = r(1-2t)^{-\frac{r+2}{2} }.$$
The same mistake you made in taking the second derivative.