# Calculate the joint PDF of the following random variables.

Suppose $$\theta$$ and $$R$$ are independent random variables, with $$\theta$$ being Uniform$$(−\pi/2,\pi/2)$$ and $$R$$ having the probability density function given by:

$$f_R(r)=\frac{2r}{(1+r^2)^2} \:\text{for } r>0, \quad f_R(r)=0 \:\text{otherwise}.$$

Determine the joint PDF for $$X=R\cos\theta$$ and $$Y=R\sin\theta$$.

It is simple enough to calculate the cumulative distribution functions of $$\theta$$ and $$R$$, having

$$F_\theta(x)=\frac{1}{\pi}x+\frac{1}{2} \:\text{ on }\: (-\pi/2,\pi/2),\quad \text{and } \:F_r(x)=\frac{x^2}{x^2+1}\:\text{ on }\:(0,\infty),$$

with my aim being eventually to calculate $$F_{XY}(x,y)$$ from which, by taking partial derivatives, I would be able to obtain $$f_{XY}(x,y).$$

However, $$F_{XY}(x,y)=\mathbb{P}[X=R\cos\theta\le x,Y=R\sin\theta\le y],$$ and no matter how much I try to interpret this expression, I can't seem to find a way to bring it into terms of $$F_r$$ and $$F_\theta$$ as would lead (I imagine) to the solution.

Is this the correct way to tackle this sort of problem? If so, any hints?

You only want the probability density function.   Thus you do not need to know what the cummulative density function is, just how to differentiate it, w.r.t. $$x,y$$.

Using $$~\arctan:\Bbb R\mapsto (-\pi/2.. \pi/2)$$

\begin{align}f_{\small X,Y}(x,y)&=\dfrac{\mathrm d^2 F_{\small X,Y}(x,y)}{\mathrm d x~\mathrm dy}\\[1ex]&=\dfrac{\mathrm d^2~F_{\small R,\Theta}(\surd (x^2+y^2),\arctan(x/y))}{\mathrm d x~\mathrm d y}\\[1ex]&=\left\lVert\dfrac{\partial\langle\surd(x^2+y^2),\arctan(x/y) \rangle}{\partial\langle x,y\rangle}\right\rVert \left.\dfrac{\mathrm d^2 F_{_{R,\Theta}(r,\theta)}}{\mathrm d r\,\mathrm d \theta}\right\vert_{r=\surd(x^2+y^2)\\\theta=\arctan(x/y)}\\[1ex]&=\left\lVert\dfrac{\partial\langle\surd(x^2+y^2),\arctan(x/y) \rangle}{\partial\langle x,y\rangle}\right\rVert f_{\small R,\Theta}(\surd(x^2+y^2),\arctan(x/y))\tag{1}\\[1ex]&=\begin{Vmatrix}\dfrac{\partial \surd(x^2+y^2)}{\partial x}& \dfrac{\partial\surd(x^2+y^2)}{\partial y}\\ \dfrac{\partial \arctan(x/y)}{\partial x}&\dfrac{\partial\arctan(x/y)}{\partial y}\end{Vmatrix}\,f_{\small R}(\surd(x^2+y^2))\,f_{\small\Theta}(\arctan(x/y))\\[1ex]&~~\vdots\end{align}

(1): This is known as the Jacobian Transformation. When $$U=g(X,Y), V=h(X,Y)$$ then: $$f_{\small X,Y}(x,y)=\left\lVert\dfrac{\partial \langle g(x,y), h(x,y)\rangle}{\partial\langle x,y\rangle}\right\rVert\,f_{\small U,V}(g(x,y),h(x,y))$$

• Thanks for such a detailed response. I wasn't aware of the Jacobian Transformation beforehand so will have to do some reading, but the result I obtain with your method checks out :). Nov 6, 2020 at 2:59

Let me give a different exposition of essentially the same answer as Graham Kemp's.

You want to find $$F_{XY}(x,y) = P[X≤x,Y≤y] = \int_{-\infty}^x\int_{-\infty}^y f_{XY}(\xi, \eta) d\xi d\eta$$ and, because you know the joint density function $$f_{R \theta}$$ of $$R$$ and $$\theta$$, you can compute the probability of an event of the form $$\{(R, \theta) \in A\}$$ as $$P[(R, \theta) \in A] = \iint_A f_{R\theta}(r, t) dr dt.$$

The key now is to use the change of variables formula, stated for an integrable function $$h$$ and a domain $$U$$ as $$\iint_{\phi(U)} h(\mathbf v) d\mathbf v = \iint_{U} h(\phi(\mathbf u)) \det(D\phi)(\mathbf u) d\mathbf u,$$ to calculate the probability of the event $$\{X≤x,Y≤y\}$$ using the known density $$f_{R\theta}$$. Thus,

• Let $$\mathbf v = (r, t)$$ and $$\mathbf u = (\xi, \eta)$$
• Let $$U = (-\infty, x] \times (-\infty, y]$$, so that $$P[X≤x,Y≤y] = P[(X, Y) \in U]$$
• Let $$\phi : \mathbb R^2 \to \mathbb R^2$$ be such that $$\phi(X,Y) = (R, \theta)$$. That is, $$\phi(\xi, \eta) = (\sqrt{\xi^2 + \eta^2}, \arctan(\eta / \xi))$$
• Let $$h=f_{R\theta}$$.

Then, $$P[X≤x,Y≤y] = P[(X, Y) \in U] = P[\phi(X,Y) \in \phi(U)] = P[(R, \theta) \in \phi(U)]$$ and, by definition of density and the change of variables formula, this last expression is equal to $$\iint_{\phi(U)} f_{R\theta}(r, t) dr dt = \iint_{U} f_{R\theta}(\phi(\xi, \eta)) \det(D\phi)(\xi, \eta) d\xi d\eta.$$

Finally, since $$U$$ is arbitrary, you can conclude that $$f_{XY}(\xi, \eta) = f_{R\theta}(\phi(\xi, \eta)) \det(D\phi)(\xi, \eta) \\ = f_{R}(\sqrt{\xi^2 + \eta^2}) f_\theta(\arctan(\eta / \xi)) \det(D\phi)(\xi, \eta) ,$$ and now all that is left is to compute the Jacobian $$\det(D\phi)$$.

Note that the description of the set $$\phi(U)$$ in terms of the variables $$r$$ and $$t$$ is not easy to write, but it is not necessary to do so, as it is possible to express probabilities of arbitrary events $$P[(R, \theta) \in A]$$ as integrals of the density over abstract sets $$A$$.

• Thank you both, I really appreciate the explanation; I would never have come up with either of these solutions, so they has been really enlightening to see. Nov 6, 2020 at 11:44