389. Given the density function $f(x)=\frac{1}{\sqrt{2 \pi}} \mathrm{e}^{-x^{2} / 2},(-\infty<x<\infty)$ of a normally distributed random variable $X$. Find the density function $g(y)$ of the random variable $Y=X^{2}$.
Solution. From the equation $y=x^{2}$, we find the inverse function. Since in the interval $(-\infty, \infty)$ the function $y=x^{2}$ is not monotonic, we divide this interval into intervals $(-\infty, 0)$ and $(0, \infty)$, in which the considered function is monotonic. In the interval $(-\infty, 0)$, the inverse function is $\psi_{1}(y)=-\sqrt{y}$; in the interval $(0, \infty)$, the inverse function is $\psi_{\mathbf{z}}(y)=\sqrt{y}$.

The desired density function can be found from the equality

$$
g(y)=f\left[\psi_{1}(y)\right] \cdot\left|\psi_{1}^{\prime}(y)\right|+f\left[\psi_{2}(y)\right] \cdot\left|\psi_{2}^{\prime}(y)\right|
$$

We find the derivatives of the inverse functions:

$$
\psi_{1}^{\prime}(y)=-1 /(2 \sqrt{y}), \quad \psi_{2}^{\prime}(y)=1 /(2 \cdot \sqrt{y})
$$

We find the absolute values of the derivatives:

$$
\left|\psi_{1}^{\prime}(y)\right|=1 /(2 \sqrt{y}), \quad\left|\psi_{2}^{\prime}(y)\right|=1 /(2 \sqrt{y}) .
$$

Considering that $f(x)=\frac{1}{\sqrt{2 \pi}} \mathrm{e}^{-x^{2 / 2}}, \psi_{1}(y)=-\sqrt{y_{1}}, \psi_{2}(y)=\sqrt{y}$, we get

$$
f\left[\psi_{1}(y)\right]=\frac{1}{\sqrt{2 \pi}} \mathrm{e}^{-y / 2}, \quad f\left[\psi_{2}(y)\right]=\frac{1}{\sqrt{2 \pi}} \mathrm{e}^{-y / 2}
$$

Substituting (**) and (***) into (*), we have

$$
g(y)=\frac{1}{\sqrt{2 \pi y}} e^{-y / 2}
$$

Since $y=x^{2}$, and $-\infty<x<\infty$, then $0<y<\infty$.

Thus, in the interval $(0, \infty)$, the desired density function is

$$
g(y)=\frac{1}{\sqrt{2 \pi y}} e^{-y / 2}
$$

outside this interval, $g(y)=0$.

Control:

$$
\int_{0}^{\infty} g(y) d y=\frac{1}{\sqrt{2 \pi}} \int_{0}^{\infty} \frac{1}{\sqrt{y}} e^{-y / 2} d y
$$

Setting $y=t^{2}$ and, consequently, $d y=2 t \mathrm{~d} t$, we get

$$
\int_{0}^{\infty} g(y) d y=\frac{2}{\sqrt{2 \pi}} \int_{0}^{\infty} e^{-t^{2 / 2}} \mathrm{dt}
$$

Considering that the Poisson integral $\int_{0}^{\infty} \mathrm{e}^{-t^{2} / 2} \mathrm{~d} t=\frac{\sqrt{2 \pi}}{2}$, we find

$$
\int_{0}^{\infty} g(y) \mathrm{d} y=\frac{2}{\sqrt{2 \pi}} \cdot \frac{\sqrt{2 \pi}}{2}=1
$$