# If $X \sim \mathcal{N}(\mu,\sigma^2)$, then how is $X^2$ distributed?

If $$X \sim \mathcal{N}(0,\sigma^2)$$, then $$X^2$$ is distributed according to a scaled chi-square distribution.

If $$X \sim \mathcal{N}(\mu,1)$$, then $$X^2$$ is distributed according to a noncentral chi-square distribution.

But what about the case when $$X \sim \mathcal{N}(\mu,\sigma^2)$$, is the distribution of $$X^2$$ known in this situation?

• Must be a scaled noncentral $\chi^2(1)$. Also, did you mean $\sigma$ or $\sigma^2$ in the last line? Nov 17, 2020 at 12:36
• Observe that $X/\sigma\sim\mathcal{N}(\mu/\sigma,1)$ and (immediately) draw your conclusion.
– whuber
Nov 17, 2020 at 12:39
• Does this answer your question? Distribution of a quadratic form, non-central chi-squared distribution Nov 17, 2020 at 13:30

Graphs in R per @whuber's Comment:

set.seed(1117)
par(mfrow=c(1,3))

w = rnorm(10^6, 150, 15)
summary(w); sd(x)
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
77.08  139.86  150.01  150.02  160.15  221.71
[1] 1.000814

hdr1 = "W ~ NORM(150, 15)"
hist(w, prob=T, br=30, col="skyblue2", main=hdr1)


.

x = w/15
summary(x); sd(x)
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
5.138   9.324  10.001  10.001  10.676  14.781
[1] 1.000814

hdr2 = "X = W/15 ~ NORM(10, 1)"
hist(x, prob=T, br=40, col="skyblue2", main=hdr2)


See Wikipedia on non-central chi-squared distribution. Notice that the mean of $$m = 10^6$$ observations from $$Y \sim \mathsf{Chisq}(\nu=1,\lambda=10^2)$$ is consistent with $$E(Y) = \nu+\lambda=101.$$

y = x^2
summary(y); sd(y)
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
26.40   86.94  100.01  101.02  113.99  218.48
[1] 20.07186

hdr3 = "Y ~ CHISQ(DF=1, NCP=100)"
hist(y, prob=T, br=30, col="skyblue2", main=hdr3)

par(mfrow=c(1,1))


There is a really good proof of this on https://online.stat.psu.edu/stat414/lesson/16/16.5. To prove the theorem, it is needed to show that the p.d.f. of the random variable is the same as the p.d.f. of a chi-square random variable with 1 degree of freedom

We have $$X \sim \mathcal{N}(\mu, \sigma^2) = \sigma \mathcal{N}(\frac{\mu}{\sigma}, 1)$$.
So $$X/\sigma \sim \mathcal{N}(\frac{\mu}{\sigma},1)$$ and thus $$X^2/\sigma^2$$ is is distributed according to $$\chi_{1,\frac{\mu^2}{\sigma^2}}^2$$, a noncentral chi-square distribution where the subscripts indicate we have $$1$$ degree of freedom and a noncentrality parameter $$\frac{\mu^2}{\sigma^2}$$, respectively.
Then $$X^2 \sim \sigma^2 \chi_{1,\frac{\mu^2}{\sigma^2}}^2$$. The pdf of $$\sigma^2 \chi_{1,\frac{\mu^2}{\sigma^2}}^2$$ is $$f_{\sigma^2 \chi_{1,\frac{\mu^2}{\sigma^2}}^2}(x) = \frac{1}{\sigma^2}f_{\chi_{1,\frac{\mu^2}{\sigma^2}}^2}\bigg(\frac{x}{\sigma^2}\bigg),$$ where $$f_{\sigma^2 \chi_{1,\lambda}^2}(x)$$ is defined as $$f_{\sigma^2 \chi_{1,\lambda}^2}(x) = \frac{1}{2}e^{-(x+\lambda)}\bigg(\frac{x}{\lambda}\bigg)^{-1/4}I_{-1/2}(\sqrt{\lambda x}).$$
• When you divide by $\sigma$ you need to consider what that does to the mean Nov 17, 2020 at 22:45
• Thanks, I've edited it to properly account for the division by $\sigma$. Nov 18, 2020 at 9:54