# Thread: [SOLVED] bivariate RVs, joint and marginal densities, and transformations

1. ## [SOLVED] bivariate RVs, joint and marginal densities, and transformations

Hello, I'd like some help on this tough problem. Thanks in advance!

Given the joint density:
$\displaystyle f_{XY}(x,y) = {1 \over 2\pi} e^{-{1 \over 2}((x-\mu)^2 + (y-\mu)^2)}, \text{where } \mu \in\mathbb{R}$
find the joint density function
$\displaystyle f_{UV}(u,v) \text{ of } U = X - Y \text{ and } V = X + Y$
and find out if U, V are independent.

My work for this part of the problem:
I got a joint density function
$\displaystyle f_{UV}(u,v) = {1 \over 4\pi} e^{-{1 \over 2}(({U+V \over 2}-\mu)^2+({V-U \over 2}-\mu)^2)}$

is that correct? and also, how do I integrate that with the crazy exponents? or is there a simpler way to test for independence other that checking
$\displaystyle f_{UV}(u,v) = f_U(u)f_V(v)$
?

The second part of the problem:
Let the transformation from (X,Y) -> (R,θ) be defined as
$\displaystyle R = \sqrt{(X-\mu)^2+(Y-\mu)^2}$
$\displaystyle \theta=$
$\displaystyle arctan \left ({(Y-\mu) \over (X-\mu)} \right ), \text{if }X \ge \mu$
$\displaystyle -\pi + arctan \left ({(Y-\mu) \over (X-\mu)} \right ), \text{if }X < \mu; Y < \mu$
$\displaystyle \pi + arctan \left ({(Y-\mu) \over (X-\mu)} \right ), \text{if }X < \mu; Y \ge \mu$

find the joint density and marginal densities.

So far on this part I have it solved for X and Y:
$\displaystyle X = \sqrt{R^2 - (Y-\mu)^2} + \mu$
$\displaystyle Y = tan(\theta)(X-\mu) + \mu$

I tried plugging in the equations into each other but I don't know how to get rid of the tan(). Any help is appreciated.

2. Originally Posted by joop
Hello, I'd like some help on this tough problem. Thanks in advance!

Given the joint density:
$\displaystyle f_{XY}(x,y) = {1 \over 2\pi} e^{-{1 \over 2}((x-\mu)^2 + (y-\mu)^2)}, \text{where } \mu \in\mathbb{R}$
find the joint density function
$\displaystyle f_{UV}(u,v) \text{ of } U = X - Y \text{ and } V = X + Y$
and find out if U, V are independent.

My work for this part of the problem:
I got a joint density function
$\displaystyle f_{UV}(u,v) = {1 \over 4\pi} e^{-{1 \over 2}(({u+v \over 2}-\mu)^2+({v-u \over 2}-\mu)^2)}$

is that correct? and also, how do I integrate that with the crazy exponents? or is there a simpler way to test for independence other that checking
$\displaystyle f_{UV}(u,v) = f_U(u)f_V(v)$
?
I think this is correct. As for checking the independence, it suffices to show that $\displaystyle f_{U,V}(u,v)$ writes as a product of a function of $\displaystyle u$ times a function of $\displaystyle v$ (not necessarily probability density functions). For that, you have to expand the exponent and see that the terms $\displaystyle uv$ vanish. Once you know that the joint density functions writes $\displaystyle f(u)g(v)$, you deduce by Fubini that $\displaystyle \int f \int g =1$, hence dividing $\displaystyle f$ by its integral and $\displaystyle g$ by its own, you end up with density functions. But you don't have to compute these integrals to show the independence.

The second part of the problem:
Let the transformation from (X,Y) -> (R,θ) be defined as
$\displaystyle R = \sqrt{(X-\mu)^2+(Y-\mu)^2}$
$\displaystyle \theta=$
$\displaystyle arctan \left ({(Y-\mu) \over (X-\mu)} \right ), \text{if }X \ge \mu$
$\displaystyle -\pi + arctan \left ({(Y-\mu) \over (X-\mu)} \right ), \text{if }X < \mu; Y < \mu$
$\displaystyle \pi + arctan \left ({(Y-\mu) \over (X-\mu)} \right ), \text{if }X < \mu; Y \ge \mu$

find the joint density and marginal densities.

So far on this part I have it solved for X and Y:
$\displaystyle X = \sqrt{R^2 - (Y-\mu)^2} + \mu$
$\displaystyle Y = tan(\theta)(X-\mu) + \mu$

I tried plugging in the equations into each other but I don't know how to get rid of the tan(). Any help is appreciated.
As you can guess, this is a polar change of coordinates. You can show that $\displaystyle X=\mu+R\cos\theta$ and $\displaystyle Y=\mu+R\sin\theta$.
For instance, you can write $\displaystyle X=\sqrt{R^2-\tan^2\theta(X-\mu)^2}+\mu$, square this equation and deduce the expression for $\displaystyle X$ (using $\displaystyle X\geq \mu$ at the end, and $\displaystyle \frac{1}{1+\tan^2\theta}=\cos^2\theta$).

3. My book says that the joint pdf = product of the two marginal pdfs if they are independent. And as for how to integrate I was not trying to integrate the marginal pdfs but the joint pdf (to get the marginal pdf) as in:
$\displaystyle f_{U}(u) = \int_{-\infty}^{\infty} {1 \over 4\pi} e^{-{1 \over 2}(({u+v \over 2}-\mu)^2+({v-u \over 2}-\mu)^2)} \, dv$

As for the second part, I do not see anywhere where I can use the identity you gave me. Basically I get something like
$\displaystyle {1 \over tan(\theta)}x^2 + (X-\mu)^2 = R^2 + \mu^2$
(above eqn might not be exact eqn for this problem but is basically what I get)

Thank you for your efforts though but please advise some more, can't quite get my head around this.

4. Originally Posted by joop
My book says that the joint pdf = product of the two marginal pdfs if they are independent. And as for how to integrate I was not trying to integrate the marginal pdfs but the joint pdf (to get the marginal pdf) as in:
$\displaystyle f_{U}(u) = \int_{-\infty}^{\infty} {1 \over 4\pi} e^{-{1 \over 2}(({u+v \over 2}-\mu)^2+({v-u \over 2}-\mu)^2)} \, dv$
Ok, let's do it the way your book says. If you want to compute this integral, a first thing is to do is to expand the exponent (as I said before) to separate the terms with $\displaystyle u$ and $\displaystyle v$: $\displaystyle -{1 \over 2}\left(\left({u+v \over 2}-\mu\right)^2+\left({v-u \over 2}-\mu\right)^2\right)=\frac{1}{2}\left(\frac{u^2}{2} +\frac{1}{2}(v-2\mu)^2\right)$. Then $\displaystyle e^{-{1 \over 2}(({u+v \over 2}-\mu)^2+({v-u \over 2}-\mu)^2)}=e^{-{1\over 2}\cdot\frac{u^2}{2}}e^{-\frac{1}{2}\cdot\frac{(v-2\mu)^2}{2}}$ and the integral you want reduces to the integration of the density function of a normal distribution, which you know: $\displaystyle \int e^{-\frac{1}{2}\cdot\frac{(v-2\mu)^2}{2}}\frac{dv}{\sqrt{4\pi}}=1$ (mean $\displaystyle 2\mu$, variance $\displaystyle 2$).

As for the second part, I do not see anywhere where I can use the identity you gave me. Basically I get something like
$\displaystyle {1 \over tan(\theta)}x^2 + (X-\mu)^2 = R^2 + \mu^2$
(above eqn might not be exact eqn for this problem but is basically what I get)

Thank you for your efforts though but please advise some more, can't quite get my head around this.
Did you get $\displaystyle X=\sqrt{R^2-\tan^2\theta(X-\mu)^2}+\mu$? This is just plugging $\displaystyle Y$ into the expression for $\displaystyle X$ that you found by yourself. My equation writes also $\displaystyle X-\mu=\sqrt{R^2-\tan^2\theta(X-\mu)^2}$. Square this, and solve for $\displaystyle X-\mu$, so that you readily find $\displaystyle \left(1+\frac{1}{\tan^2\theta}\right)(X-\mu)^2=R^2$ and finally $\displaystyle X=\mu+R\cos\theta$ (with the identity on $\displaystyle \tan$ that I gave before and that results from $\displaystyle \tan=\frac{\sin}{\cos}$ and $\displaystyle \cos^2+\sin^2=1$).
Once you have $\displaystyle X=\mu+R\cos\theta$ and $\displaystyle Y=\mu+R\sin\theta$, you can do the change of variable: you integrate on $\displaystyle 0<\theta<2\pi$ and $\displaystyle r>0$, the measure $\displaystyle dx\,dy$ becomes $\displaystyle r\,dr\,d\theta$ (by computing the Jacobian determinant) and $\displaystyle (x-\mu)^2+(y-\mu)^2=r^2$.