*** Welcome to piglix ***

Marsaglia polar method


The polar method (attributed to George Marsaglia, 1964) is a pseudo-random number sampling method for generating a pair of independent standard normal random variables. While it is superior to the Box–Muller transform, the Ziggurat algorithm is even more efficient.

Standard normal random variables are frequently used in computer science, computational statistics, and in particular, in applications of the Monte Carlo method.

The polar method works by choosing random points (xy) in the square −1 < x < 1, −1 < y < 1 until

and then returning the required pair of normal random variables as

or, equivalently,

where and represent the cosine and sine of the angle that the vector (x, y) makes with x axis.


...
Wikipedia

...