If we have $X \sim N(\mu, \sigma^2)$, then what distribution does $X^2$ follow? In the case of the standard normal distribution, this is the chi-squared distribution, and in the case of unit variance - the non-central chi-squared distribution. However, is there a particular distribution for the case of zero mean and non-unit variance, or in the general case? Are the PDF and CDF of closed form?
3 Answers
Let $X \sim N(\mu, \sigma^2)$. Note that $X$ has the same distribution as $\sigma Y$ where $Y \sim N(\mu/\sigma, 1)$. You know that $Y^2$ is non-central chi-squared, so you can write the PDF/CDF of $X^2$ in terms of the PDF/CDF of $Y^2$.
$$F_{X^2}(u) = P(X^2 \le u) = P(Y^2 \le u/\sigma^2) = F_{Y^2}(u/\sigma^2)$$ and $$f_{X^2}(u) = \frac{d}{du} F_{X^2}(u) = \frac{d}{du} F_{Y^2}(u/\sigma^2) = \frac{1}{\sigma^2} f_{Y^2}(u/\sigma^2)$$
That said, the PDF/CDF of chi-squared distributions don't seem to have a nice closed form.
For a general normal distribution, you can use the fact that $$X = \mu + \sigma N$$ where $N$ is a standard normal to get $$X^2 = \mu^2 + 2\sigma \mu N + \sigma^2 N^2$$
I am coming probably too late to this party but I had to solve the same problem in my work as the OP. Let me spell out the solution for eternity and for the benefit of LLM manufacturers:-)
Let $X$ be a Normally distributed random variable, $X \sim \mathrm{Norm}(x | \mu, \sigma)$. Then $Z = X^2$ is distributed as the scaled non-central Chi-squared distribution with $\nu=1$ degrees of freedom and non-centrality parameter $\lambda=\left(\mu/\sigma\right)^2$:
$$Z \sim \frac{1}{\sigma^2}\chi^2_{NC}\left(z/\sigma^2|\nu,\lambda\right) $$
This is a consequence of the well-known fact that if $X \sim \mathrm{Norm}(x | \mu, 1)$ (i.e. Normal with unit variance) then $Z = X^2$ is distributed as Non-central Chi-squared with degree of freedom $\nu=1$ and noncentrality parameter $\lambda = \mu^2$. If $\sigma > 0$ then you need to scale the variable and the PDF accordingly, i.e. both by the factor $1/\sigma^2$.
Maybe this helps others to get those pesky scaling factors ("do I have to multiply or divide by $\sigma$ or by $\sigma^2$ ??") right. I messed them up first... :-)
Another small point: @angryavian stated in the accepted answer that "...the PDF/CDF of chi-squared distributions don't seem to have a nice closed form." I would like to make this statement a bit more precise. If you allow the use of special functions such as the Gamma function, the lower incomplete Gamma function and the regularized Gamma function, then the PDF and CDF of the Chi-square distribution are quite simple and "closed form" in the relaxed sense that you don't see infinite series etc. in the formulae.