One method applies inverse transform sampling to the standard normal cumulative distribution function: , followed by for mean and standard deviation . Numerical approximations to are needed, and the endpoints must be avoided.
A convenient alternative is the Box-Muller transform. From independent uniforms setThe radial probability density function is for , and the angle is independently uniform on . Dividing their joint density by the polar-coordinate Jacobian determinant givesThus the outputs are independent standard normal distribution draws. Apply to obtain other normal means and variances. With finite pseudorandom number generators, this is an approximation to the ideal independent-uniform model; poor dependence in the input stream is not cured by the transform.
Articles by others on the same topic
There are currently no matching articles.