The IMSL_NORMALCDF function evaluates the standard normal (Gaussian) distribution function. Using a keyword, the inverse of the standard normal (Gaussian) distribution can be evaluated.

This routine requires an IDL Advanced Math and Stats license. For more information, contact your sales or technical support representative.

The IMSL_NORMALCDF function evaluates the distribution function, Φ, of a standard normal (Gaussian) random variable; that is:

The value of the distribution function at the point x is the probability that the random variable takes a value less than or equal to x.

The standard normal distribution (for which IMSL_NORMALCDF is the distribution function) has mean of zero and variance of 1. The probability that a normal random variable with mean µ and variance σ2 is less than y is given by IMSL_NORMALCDF evaluated at (y – µ)/σ.

The function Φ(x) is evaluated by use of the complementary error function, IMSL_ERFC. The relationship follows below:

If the keyword INVERSE is specified, the IMSL_NORMALCDF function evaluates the inverse of the distribution function, Φ, of a standard normal (Gaussian) random variable; that is:

IMSL_NORMALCDF (x, /INVERSE) = Φ–1 (x)

where:

The value of the distribution function at the point x is the probability that the random variable takes a value less than or equal to x. The standard normal distribution has a mean of zero and a variance of 1.

The IMSL_NORMALCDF function is evaluated by use of minimax rational-function approximations for the inverse of the error function. General descriptions of these approximations are given in Hart et al. (1968) and Strecok (1968). The rational functions used in IMSL_NORMALCDF are described by Kinnucan and Kuki (1968).

Example


Suppose X is a normal random variable with mean 100 and variance 225. This example finds the probability that X is less than 90 and the probability that X is between 105 and 110.

x1 = (90-100)/15.
p = IMSL_NORMALCDF(x1)
PM, p, Title = 'The probability that X is less than 90 is:'
The probability that X is less than 90 is: 0.252493
x1 = (105 - 100)/15.
x2 = (110 - 100)/15.
p = IMSL_NORMALCDF(x2) - IMSL_NORMALCDF(x1)
PM, p, Title = 'The probability that X is between 105 and ', $
  '110 is:'
 
The probability that X is between 105 and 110 is: 0.116949

Syntax


Result = IMSL_NORMALCDF(x [, /DOUBLE] [, /INVERSE])

Return Value


The probability that a normal random variable takes a value less than or equal to x.

Arguments


X

Expression for which the normal distribution function is to be evaluated.

Keywords


DOUBLE (optional)

If present and nonzero, double precision is used.

INVERSE (optional)

If present and nonzero, evaluates the inverse of the standard normal (Gaussian) distribution function. If INVERSE is specified, then argument x represents the probability for which the inverse of the normal distribution function is to be evaluated. In this case, x must be in the open interval (0.0, 1.0).

Version History


6.4

Introduced