$\chi^2$ PDF from standard normal PDF

chi squareddensity functiongamma distributionnormal distributionrandom variables

I was presented with the $\chi^2$ distribution as follows:

Let $Z$ be a standard normal random variable $N(0, 1)$ and consider $X = Z^2$. It has the density

$$f(x) = \dfrac{1}{\sqrt{2 \pi x}}e^{-x/2} = \dfrac{(1/2)^{1/2}}{\Gamma(1/2)}e^{-x/2}x^{1/2 – 1}$$

for $x > 0$. So $X = Z^2$ has the $\chi_1^2$ distribution with degree of freedom $1$ or $\text{Gamma}(1/2, 1/2)$.

The Wikipedia article for standard normal distribution gives the standard normal PDF as

$${\displaystyle \varphi (x)={\frac {1}{\sqrt {2\pi }}}e^{-{\frac {1}{2}}x^{2}}}$$

So $X = Z^2 \Rightarrow Z = \sqrt{X}$, and, if I'm not mistaken, we get that the PDF becomes

$$f(x) = \dfrac{1}{\sqrt{2 \pi \sqrt{x}}} e^{-x/2} = \dfrac{1}{x^{1/4} \sqrt{2 \pi}} e^{-x/2}$$

I don't see how one gets $\dfrac{1}{\sqrt{2 \pi x}}e^{-x/2}$. Am I misunderstanding something here? Or is there an error in what I was presented?

Thank you.

Best Answer

Your formula for the pdf of $X$ is incorrect. If we write $\Phi(z)$ for the CDF of the standard normal, then the CDF of $X:=Z^2$ is $$ \begin{align} F_X(x)&:=P(Z^2\le x)\\ &= P(-\sqrt x\le Z\le 0)+P(0\le Z\le\sqrt x)\\ &=2 P(0\le Z\le \sqrt x) \\ &=2[\Phi(\sqrt x)-\Phi(0)] \end{align}\tag1 $$ so the PDF of $X$ is the derivative of (1), which is $$ f(x)=\frac d{dx}F_X(x)\stackrel{(*)}=2\Phi'(\sqrt x)\frac d {dx}\sqrt x=2\varphi(\sqrt x)\frac1{2\sqrt x}=\frac1{\sqrt x}\frac1{\sqrt{2\pi}}e^{-x/2}. $$ Step (*) is the chain rule.

Related Question