Hello,

See here : Box?Muller transform - Wikipedia, the free encyclopedia

fyi, -ln(uniform distribution over (0,1)) follows an exponential distribution with parameter 1. It can be proved by using this : http://en.wikipedia.org/wiki/Inverse_transform_samplingThe derivation[3] is based on the fact that, in a two-dimensional cartesian system where X and Y coordinates are described by two independent and normally distributed random variables, the random variables for R2 and Θ (shown above) in the corresponding polar coordinates are also independent and can be expressed as

and