functionNormal

Normal

Extends from Var (prototype for variate generation functions).

Information

Normal

Normal probability distribution function.

Syntax

Normal(g,mu,sigma2)

Description

Generates a random variate following the Normal probability distribution, with mean mu and variance sigma2.

The algorithm used for this distribution is the same that the one implemented in SIMAN, and is detailed in:

J.D. Beasley and S.G. Springer (1977), The Percentage Points of the Normal Distribution, Applied Statistics, vol. 26, pp: 118-121.

Examples


(u,g) := Normal(g,0,1);

Inputs

TypeNameDefaultDescription
Generatorg (from Var)Random number generator
Reala (from Var)0First parameter of the prob. distribution
Realb (from Var)0Second parameter of the prob. distribution
Realc (from Var)0Third parameter of the prob. distribution (only for the Johnson and Triangular distributions)
Reald (from Var)0Fourth parameter of the prob. distribution (only for the Johnson distribution)

Outputs

TypeNameDefaultDescription
Realx (from Var)Generated random variate
Generatorgout (from Var)Updated random number generator