PDF of $Z=X^2 + Y^2$ where $X,Y\sim N(0,\sigma)$

Using normal distribution probablilty density function(pdf),

\begin{align} f_Y(x) = f_X(X) &= \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{x^2}{2\sigma^2}} \\ \end{align}

Taking $$Z' = X^2 = Y^2$$, the corresponding pdf is, \begin{align} f_{Z'}(z) &= f_x(x) \left| \frac{\delta x}{\delta z}\right| = \frac{1}{\sigma\sqrt{2 \pi}} e^{- \frac{z}{2 \sigma^2}} \left( \frac{1}{2\sqrt{z}}\right) \\ \end{align}

Since $$X$$ and $$Y$$ are independent, so $$Z$$ pdf can be calculated using the following \begin{align} f_z(z) = \int^{\infty}_{-\infty}f_{X^2}(x)f_{Y^2}(z-x)dx \end{align}

Is this approach correct?

• That's one of the most difficult ways to approach this. Changing to polar coordinates is simpler. Computing the characteristic function of $Z^2$ as $E[\exp(it(X^2+Y^2))]$ is even a little easier.
– whuber
Sep 14, 2022 at 21:59
• @whuber can you explain more on how the characteristic function links to the pdf of $Z$? I don't really understand how to use it to calculate the pdf as it seems like it still need $f_z(z)$ which is what I am trying to find. Sep 15, 2022 at 3:45

Following the comment by whuber, for problems like this that involve convolutions of IID random variables, it is generally simpler to work with the characteristic function than with the density function. Using the law of the unconscious statistician we can obtain the characteristic function for $$X^2$$ as follows:

\begin{align} \phi_{X^2}(t) &\equiv \mathbb{E}(\exp(itX^2)) \\[16pt] &= \int \limits_{-\infty}^\infty \exp(it x^2) \cdot \text{N}(x|0, \sigma^2) \ dx \\[6pt] &= \int \limits_{-\infty}^\infty \exp(it x^2) \cdot \frac{1}{\sqrt{2 \pi \sigma^2}} \cdot \exp \bigg( -\frac{1}{2 \sigma^2} \cdot x^2 \bigg) \ dx \\[6pt] &= \int \limits_{-\infty}^\infty \frac{1}{\sqrt{2 \pi \sigma^2}} \cdot \exp \bigg( -\frac{1-2it \sigma^2}{2 \sigma^2} \cdot x^2 \bigg) \ dx \\[6pt] &= \frac{1}{\sqrt{1-2it \sigma^2}} \int \limits_{-\infty}^\infty \frac{1}{\sqrt{2 \pi}} \sqrt{\frac{1-2it \sigma^2}{\sigma^2}} \cdot \exp \bigg( -\frac{1-2it \sigma^2}{2 \sigma^2} \cdot x^2 \bigg) \ dx \\[6pt] &= \frac{1}{\sqrt{1-2it \sigma^2}} \int \limits_{-\infty}^\infty \text{N}\bigg( x \bigg| 0, \frac{\sigma^2}{1-2it \sigma^2} \bigg) \ dx \\[6pt] &= \frac{1}{\sqrt{1-2it \sigma^2}}. \\[6pt] \end{align}

(And of course, we have $$\phi_{X^2}(t) = \phi_{Y^2}(t)$$ in this case so the latter characteristic function is the same.) We then have:

\begin{align} \phi_Z(t) &\equiv \mathbb{E}(\exp(itZ)) \\[16pt] &= \mathbb{E}(\exp(itX^2 + itY^2)) \\[16pt] &= \mathbb{E}(\exp(itX^2)) \cdot \mathbb{E}(\exp(itY^2)) \\[12pt] &= \frac{1}{\sqrt{1-2it \sigma^2}} \cdot \frac{1}{\sqrt{1-2it \sigma^2}} \\[6pt] &= \frac{1}{1-2it \sigma^2}. \\[6pt] \end{align}

This is the characteristic function for the scaled chi-squared distribution with two degrees-of-freedom. Using the fact that the characteristic function is a unique representative of the distribution, you then have:

$$Z \sim \sigma^2 \cdot \text{ChiSq}(\text{df} = 2).$$

• "for problems like this that involve convolutions of IID random variables, it is generally simpler to work with the characteristic function than with the density function" except in this case where we can use a change of coordinates and transform the joint distribution of $x$ and $y$ into a distribution of $z$ and another parameter. Working with the characteristic functions is easier than computing the convolution, but using the transformation is even easier. (I agree that in other cases it won't work this way, it is only the case here because of the easy transform with spherical symmetry) Sep 16, 2022 at 7:49