Given:
$x_1, x_2....x_n$ is a random sample and an iid with normal distribution $N(0,\theta)$ where variance is the unknown paramter.
I calculated the sufficient statistic for this case and it comes out to be: $$Y = \sum_{i=1}^n x_i^2$$
Now, I want to find the pdf of this Sufficient statistic Y and the distribution of Y?
I know $Y/\theta$ is equal to $Y = \sum_{i=1}^n x_i^2/\theta$ is a chi-square of distribution with n degrees of freedom. How can I get the pdf:
- Using the change of variables
- Using moment generating function (MGF)
Can anyone help me know how to do this? What are the steps? Thanks.
First observe that $\frac{X}{\sqrt{\theta}}\sim N(0;1)$ and thus
$$ \bbox[5px,border:2px solid black] { \frac{X^2}{\theta}\sim \chi_{(1)}^2=Gamma\Big(\frac{1}{2};\frac{1}{2}\Big) \qquad (1) } $$
Now it is evident that
$$ \bbox[5px,border:2px solid black] { T=\frac{1}{\theta}\sum_{i=1}^{n}X_i^2\sim Gamma\Big(\frac{n}{2};\frac{1}{2}\Big) \qquad (2) } $$
Concluding, $Y=\theta T$,
thus
$$ \bbox[5px,border:2px solid black] { Y\sim Gamma\Big(\frac{n}{2};\frac{1}{2\theta}\Big) \qquad (3) } $$
To prove (1) and (3) use the fundamental transformation theorem (change of variable)
To prove (2) use MGF's properties
Some hints for the proofs:
For (1), use the change of variable
$Z=\frac{X^2}{\theta}$ then
$$F_Z(z)=\mathbb{P}[Z\leq z]=\mathbb{P}[X^2\leq z\theta]=\mathbb{P}[-\sqrt{z\theta}\leq X \leq \sqrt{z\theta}]=F_X(\sqrt{z\theta})-F_X(-\sqrt{z\theta})$$
derivate it and get you first PDF:
$$f_Z(z)=\frac{1}{\sqrt{2\pi}}z^{-\frac{1}{2}}e^{-\frac{z}{2}}$$
This can be rewritten in the following way:
$$f_Z(z)=\frac{\Big(\frac{1}{2}\Big)^{\frac{1}{2}}}{\Gamma\Big(\frac{1}{2}\Big)}z^{\frac{1}{2}-1}e^{-\frac{z}{2}}$$
...and the first step is done! $f(z)$ is evidently a $Gamma\Big(\frac{1}{2};\frac{1}{2}\Big)$
For step (2) very easily multiply the n identical MGF's
For step (3) same procedure as (1): change of variable.