# Showing that two random variables are independent [duplicate]

I have the following problem:

Given two independent standard normal random variables, call them $$X$$ and $$Y$$, how can I show that $$Z = X^2 + Y^2$$ and $$W=\frac{X}{Y}$$ are also independent?

I know that because $$X$$ and $$Y$$ are standard normal I can write their distributions as $$f_X(x) = \frac{1}{2\pi}e^\frac{-(x)^2}{2}$$ $$f_Y(y) = \frac{1}{2\pi}e^\frac{-(y)^2}{2}$$ Then because they are independent I can write their joint probability distribution as $$f_{X,Y}(x,y) = \frac{1}{2\pi}e^\frac{-(x^+y^2)}{2}$$

Now I know that to show $$Z$$ and $$W$$ are independent, I need to show that their joint probability distribution is equal to the product of the marginal distribution functions. But I'm not sure how to find $$f_{Z,W}(z,w)$$, $$f_Z(z)$$ and $$f_W(w)$$.

Any help is much appreciated.

## marked as duplicate by StubbornAtom, Community♦Oct 21 '18 at 22:03

The joint distribution for $$(X^2,Y^2)$$ is $$\frac{x^{-1/2}e^{-x/2}}{\sqrt{2}\Gamma(1/2)}1_{(0,+\infty)}(x)\times \frac{y^{-1/2}e^{-y/2}}{\sqrt{2}\Gamma(1/2)}1_{(0,+\infty)}(x)=\frac{(xy)^{-1/2}e^{-(x+y)/2}}{2(\Gamma(1/2))^2}1_{(0,+\infty)}(x)1_{(0,+\infty)}(y)$$ Since $$X^2=Z-\frac{Z}{W^2+1}=\frac{ZW^2}{W^2+1},Y^2=\frac{Z}{W^2+1}$$, the Jacobian matrix is $$\left|\begin{array}{cc} \frac{W^2}{W^2+1}& \frac{1}{W^2+1}\\ \frac{2ZW}{(W^2+1)^2} & -\frac{2ZW}{(W^2+1)^2} \end{array}\right| =\frac{2ZW}{(W^2+1)^2}$$ Therefore, the joint pdf of $$(Z,W)$$ is $$\frac{(\frac{ZW^2}{W^2+1}\frac{Z}{W^2+1})^{-1/2}e^{-(\frac{ZW^2}{W^2+1}+\frac{Z}{W^2+1})/2}}{2(\Gamma(1/2))^2}\times \frac{2ZW}{(W^2+1)^2}1_{(0,+\infty)}(z)=\frac{1}{w^2+1}\frac{e^{-z/2}}{\pi}1_{(0,+\infty)}(z).$$ Hence, the pdf of $$W$$ and $$Z$$ are $$\frac{1}{\pi (1+w^2)}$$ and $$\frac{1}{2}e^{-z/2}1_{(0,+\infty)}(z)$$. For now, one can see the independence of $$W$$ and $$Z$$.