5
$\begingroup$

I am working through Dirk P Kroese "Monte Carlo Methods" notes with one section based on Random Variable Generation from uniform random numbers using polar transformations (section 2.1.2.6).

The polar method is based on the polar coordinate transformation $ X=R \cos \Theta$, $Y=R\sin \Theta$, where $\Theta \sim \text{U}(0,2\pi)$ and $R\sim f_R$ are independent. Using standard transformation rules it follows that the joint pdf of $X$ and $Y$ satisfies:

$$f_{X,Y}(x,y)=\cfrac{f_R(r)}{2\pi r}$$

with $r=\sqrt{x^2+y^2}$.

I don't fully understand how expression $f_{X,Y}(x,y)$ is obtained from "standard transformation rules", please help or hint.

2 Answers 2

3

Note that $P_{X,Y}(X=x \land Y=y)=P_{R,\theta}(R=\sqrt{x^2+y^2} \land \tan\theta=\frac{y}{x})$. Now since $R$ and $\theta$ are independent we have

$$f_{X,Y}(x,y)dxdy=f_R(R=r).\frac{1}{2\pi} drd\theta$$ Now since $dxdy=rdrd\theta$, we have the desired result.

3

Rewrite the RHS as \begin{align}\frac{f_R(r)}{2\pi r}&=f_R(r)\cdot\frac1{2\pi}\cdot\frac1r=f_R(r)f_\Theta(\theta)\frac1r=f_{R,\Theta}(r,\theta)\frac1r\end{align} (where we used that $\Theta \sim \text{U}(0,2\pi)$ hence $f_\Theta(\theta)=\frac1{2\pi}$ and that $R,\Theta$ are independent) so that their assertion becomes $$f_{R,\Theta}(r,\theta)=f_{X,Y}(x,y)\cdot r$$ where $x$ stands actually for $x(r,\theta)=r\cos{(\theta)}$ and similarly $y$ stands for $y(r,\theta)=r\sin{(\theta)}$. Hence, we expect that $r$ is the absolute value of the determinant of the Jacobian of the transformation (this is the standard methodology for transforming bivariate random variables, just search for this in some textbook or on the internet), which we can indeed verify $$\det{(J)}=\frac{\partial x(r,\theta)}{\partial r}\frac{\partial y(r,\theta)}{\partial \theta}-\frac{\partial x(r,\theta)}{\partial \theta}\frac{\partial y(r,\theta)}{\partial r}=r\cos^2{(\theta)}+r\sin^2{(\theta)}=r\cdot1=r$$ Note: I would expect $|r|$ but since they omitted the absolute value, there must be some point where they assume that $r>0$ (if I am not mistaken).