= Solution
Generate independent $U,V\sim\operatorname{Unif}(0,1)$ and use the <Box-Muller transform>
$$
\boxed{G_1=\sqrt{-2\log U}\cos(2\pi V),\qquad G_2=\sqrt{-2\log U}\sin(2\pi V).}
$$
For $R=\sqrt{-2\log U}$, $\mathbb P(R>r)=e^{-r^2/2}$, so its density is $re^{-r^2/2}$ on $r>0$. The angle $2\pi V$ is uniform on $[0,2\pi)$ and independent of $R$. Dividing the joint radial-angular density by the polar-coordinate Jacobian $r$ gives
$$
f_{G_1,G_2}(x,y)=\frac1{2\pi}e^{-(x^2+y^2)/2}
=\frac{e^{-x^2/2}}{\sqrt{2\pi}}\frac{e^{-y^2/2}}{\sqrt{2\pi}}.
$$
Thus \b[both outputs are independent and have the <standard normal distribution>]. Independent pairs of uniforms give further independent normal observations. The null event $U=0$ is excluded in implementation so the logarithm is finite.
Back to article page