Random Number sampling method
Given a source of uniformly distributed random numbers, the Box-Muller Transform generates normally distributed random numbers.
Math
Suppose x1 and x2 are independent samples chosen from the uniform distribution on the unit interval (0, 1).
y1=Rcos(Θ)=−2lnx1cos(2πx2)
y1=Rsin(Θ)=−2lnx1sin(2πx2).
Then y1 and y2 are independent random variables with a standard normal distribution.
Alternatives