IMSL C# Numerical Library

Random.NextNormalAR Method 

Generate a pseudorandom number from a standard normal distribution using an acceptance/rejection method.

public virtual double NextNormalAR();

Return Value

A double which represents a pseudorandom number from a standard normal distribution.

Remarks

NextNormalAR generates pseudorandom numbers from a standard normal (Gaussian) distribution using an acceptance/rejection technique due to Kinderman and Ramage (1976). In this method, the normal density is represented as a mixture of densities over which a variety of acceptance/rejection methods due to Marsaglia (1964), Marsaglia and Bray (1964), and Marsaglia, MacLaren, and Bray (1964) are applied. This method is faster than the inverse CDF technique used in NextNormal to generate standard normal deviates.

Deviates from the normal distribution with mean x_m and standard deviation x_{std} can be obtained by scaling the output from NextNormalAR. To do this first scale the output of NextNormalAR by x_{std} and then add x_m to the result.

See Also

Random Class | Imsl.Stat Namespace | Example