# Given X and Y are independent ~N(0,1), what is the distribution of $Z=X^2 + Y^2$

Our joint pdf is $$f(x,y) = \frac{1}{\sqrt{2π}} e^\frac{x^2+y^2}{2}$$

Now we let $$U = X^2 + Y^2$$ and $$V = Y$$, we can then get our Jacobian as $$J = \frac{1}{\sqrt{u-v^2}}$$

Since this transformation isnt one to one on this range, we need to divide into to ranges $$S_{1} = (-∞,0]$$ and $$S_{2} = (0, ∞)$$

Thus I get $$f(u,v) = \frac{1}{\sqrt{u-v^2}}(\frac{1}{2π}e^\frac{-u}{2})$$

This seems wrong, for some reason. Please tell me if this is incorrect thus far.

• Use polar coordinates if you want to do this by change of variables. – StubbornAtom Feb 2 at 20:03

By definition, it's Chi squared with two degree of freedoms. The one you've found is the joint PDF of $$U$$ and $$V$$. You need to marginalize it to obtain $$f_U(u)$$: $$f_U(u)=\int_{-\sqrt u}^\sqrt u \frac{1}{\sqrt{u-v^2}}\frac{e^{-u/2}}{2\pi}dv=\frac{e^{-u/2}}{2\pi}\overbrace{\int_{-\sqrt{u}}^{\sqrt u}\frac{1}{u-v^2}dv}^\pi=\frac{1}{2}e^{-u/2}$$ where $$u\geq 0$$. This is at the same time an exponential RV with $$\lambda=1/2$$, and Chi-Squared RV with $$k=2$$.