Skip to main content
3 of 8
added 451 characters in body
Glen_b
  • 290.5k
  • 37
  • 652
  • 1.1k

You're referring to a transformation from a pair of independent variates $(X,Y)$ to the polar representation $(R,\theta)$ (radius and angle), and then looking at the marginal distribution of $\theta$.

I'm going to offer a somewhat intuitive explanation (though a mathematical derivation of the density does essentially what I describe informally).

Note that if you scale the two variables, X and Y by some common scale (e.g. go from U(-1,1) to U(-10,10) or from N(0,1) to N(0,20) on both variables at the same time) that makes no difference to the distribution of the angle (it only affects the scale of the distribution of the radius). So let's just consider the unit cases.

First consider what's going on with the uniform case. Note that the distribution is uniform over the unit square, so that the probability density in a region that's contained within $[-1,1]^2$ is proportional to the area of the region. Specifically, look at the density associated with an element of angle, $d\theta$ near the horizontal (near angle $\theta=0$) and on the diagonal (near angle $\theta=\pi/4$):

enter image description here

Clearly the probability element $df_\theta$ (i.e. area) corresponding to an element of angle ($d\theta$) is larger when the angle is near one of the diagonals. Indeed consider inscribing a circle inside the square; the area spanned by a given tiny angle within the circle is constant, and then the part outside the circle (of same width as the square) grows as we approach the diagonal, where it at its maximum.

This completely accounts for the pattern you see in the simulations.


By contrast, if the joint distribution is rationally symmetric about the origin then the probability element at some angle doesn't depend on the angle (this is essentially a tautology!). The bivariate distribution of two independent standard Gaussians is rotationally symmetric about the origin:

enter image description here

(code for this image based on Elan Cohen's code here but there's a nice alternative here)

Consequently the area in some angle $d\theta$ is the same for every $\theta$, so the density associated with the angle is uniform on $[0,2\pi)$

Glen_b
  • 290.5k
  • 37
  • 652
  • 1.1k