# If $X$ is distributed $\mathcal{N}\sim(\mu,1)$ then what is the PDF of $X^2$?

If $$X$$ is distributed $$\mathcal{N}\sim(\mu,1)$$ then what is the distribution of $$X^2$$? Here is my try:

\begin{align*} \mathbb{P}(X^2

Then:

\begin{align*} f_{X^{2}}(x) &= \frac{d}{dx}\int_{\sqrt{-x}}^{\sqrt{x}} f(x) \,dx \\[6pt] &= f_X(\sqrt{x})\frac{1}{2\sqrt{x}}+f_X(-\sqrt{x})\frac{1}{2\sqrt{x}} \\[6pt] &= \frac{1}{\sqrt{2\pi x}} e^{\frac{-(x-\mu)^2}{2}}. \\[6pt] \end{align*}

How should I continue?

Your algebra is wrong in the transition from your penultimate step to your last step (see correct step below). Part of the problem here is that you are using $$x$$ both as the variable-of-integration and as the argument for your new density function, which confuses your mathematical statements. To simplify the notation, let us instead take $$R = X^2$$ as the new random variable of interest, and specify its arguments by $$r$$. You then get:

$$\mathbb{P}(R \leqslant r) = \mathbb{P}(- \sqrt{r} \leqslant X \leqslant \sqrt{r}) = \int \limits_{-\sqrt{r}}^{\sqrt{r}} f_X(x) \ dx.$$

Using Leibniz integral rule on your probability integral you should then get (omitting some of the steps, which I will leave for you):

\begin{align} f_R(r) &= \frac{d}{dr} \int \limits_{-\sqrt{r}}^{\sqrt{r}} f_X(x) \ dx \\[6pt] &= \frac{1}{2 \sqrt{r}} \cdot f_X(\sqrt{r}) + \frac{1}{2 \sqrt{r}} f_X(-\sqrt{r}) \\[6pt] &= \frac{1}{2 \sqrt{r}} \Bigg[ \text{N}(\sqrt{r}|\mu, 1) + \text{N}(-\sqrt{r}|\mu, 1) \Bigg] \\[6pt] &= \frac{1}{2 \sqrt{r}} \cdot \frac{1}{\sqrt{2 \pi}} \Bigg[ \exp \Big(-\frac{1}{2} ( \sqrt{r} - \mu)^2 \Big) + \exp \Big(-\frac{1}{2} ( -\sqrt{r} - \mu)^2 \Big) \Bigg] \\[6pt] &\ \ \ \vdots \\[6pt] &= \frac{1}{\sqrt{2 \pi r}} \cdot \exp \Big( - \frac{r + \mu^2}{2} \Big) \cdot \cosh(\mu \sqrt{r}) \\[12pt] &= \text{ChiSq}(r | \text{df} = 1, \text{ncp} = \mu^2). \\[12pt] \end{align}

This demonstrates that the random variable $$R=X^2$$ has a non-central chi-squared distribution with one-degree-of-freedom and non-centrality parameter $$\mu^2$$. This is consistent with the general theory for how this kind of distribution arises in general.

• From this result can I derive the density function of the sum of several normal distributed random variables with different mean and variance 1? Dec 3, 2020 at 16:35
• Presumably you mean the sum of their squares? Yes; that will also have a non-central chi-squared distribution.
– Ben
Dec 3, 2020 at 21:08
• you have this proof? Dec 3, 2020 at 22:30
• A simple Google search away: Guenther (2012)
– Ben
Dec 3, 2020 at 22:40