# Derivation of chi-squared pdf with one degree of freedom from normal distribution pdf

How can we derive the chi-squared probability density function (pdf) using the pdf of normal distribution?

I mean, I need to show that

$$f(x)=\frac{1}{2^{r/2}\Gamma(r/2)}x^{r/2-1}e^{-x/2} \>, \qquad x > 0\>.$$

• Did you read this? en.wikipedia.org/wiki/… – leonbloy Oct 10 '11 at 21:03
• The way you wrote this makes no sense. Did you mean $f_Y(x)$ rather than $f(Y)$? And it makes no sense to say "where X is..." when the foregoing statement doesn't mention anything called X. – Michael Hardy Oct 10 '11 at 21:14
• @Harald: Please do not deface your question, I have undone your edits. There is still value in the question, perhaps someone else with the same confusion will come along and be helped by this post. – Zev Chonoles Oct 10 '11 at 22:49
• I have tried to restate some things in the question. However, the OP is still encouraged to edit it further to clarify, as only they know what precisely they are trying to ask. – cardinal Oct 11 '11 at 1:37

The way the question is expressed is a mess, but I'll assume it means this: if $X\sim N(0,1)$, how do you find the pdf of $X^2$? Here's one way. Remember that the pdf of $X$ is $$\varphi(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2}.$$ Let $f$ be the pdf of $X^2$. Then \begin{align} f(x) & = \frac{d}{dx} \Pr(X^2 \le x) = \frac{d}{dx} \Pr(-\sqrt{x}\le X\le\sqrt{x}) \\ \\ & = \frac{d}{dx} \frac{1}{\sqrt{2\pi}} \int_{-\sqrt{x}}^\sqrt{x} e^{-u^2/2} \;du = \frac{2}{\sqrt{2\pi}}\frac{d}{dx} \int_0^\sqrt{x} e^{-u^2/2} \;du \\ \\ & = \frac{2}{\sqrt{2\pi}} e^{-\sqrt{x}^2/2} \frac{d}{dx} \sqrt{x} = \frac{2}{\sqrt{2\pi}} e^{-x/2} \frac{1}{2\sqrt{x}} \\ \\ \\ & = \frac{e^{-x/2}}{\sqrt{2\pi x}}. \end{align}
Sometimes it might be written as $\dfrac{1}{\sqrt{2\pi}} x^{\frac12 - 1}e^{-x/2}$ so that you can see how it resembles the function involved in defining the Gamma function.
Your title said $1$ degree of freedom. But what you write seems to allow $r$ to be some number other than $1$. If you want to do that, then there's more work to do.
If $X \sim (\mu, \Sigma) \neq (0, I)$, the result you wish to prove does not hold: even if the random variables are independent but have nonzero means, you get a non-central $\chi^2$ pdf which is not what you are trying to show.
If $X_1, \ldots, X_n$ are independent standard normal random variables, then $X_i^2$ has a Gamma distribution with scale parameter $\frac{1}{2}$ and order parameter $\frac{1}{2}$. Then, $\sum_{i= 1}^n X_i^2$ is a sum of $n$ independent Gamma random variables each with scale parameter $\frac{1}{2}$ and order parameter $\frac{1}{2}$ and is thus a Gamma random variable with scale parameter $\frac{1}{2}$ and order parameter $\frac{r}{2}$.