normal_cdf
Evaluates the standard normal (Gaussian) distribution function.
Synopsis
#include <imsls.h>
float imsls_f_normal_cdf (float x)
The type double function is imsls_d_normal_cdf.
Required Arguments
float x (Input)
Point at which the normal distribution function is to be evaluated.
Return Value
The probability that a normal random variable takes a value less than or equal to x.
Description
Function imsls_f_normal_cdf evaluates the distribution function, F(x), of a standard normal (Gaussian) random variable as follows:
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 imsls_f_normal_cdf is the distribution function) has mean of 0 and variance of 1. The probability that a normal random variable with mean μ and variance σ2 is less than y is given by imsls_f_normal_cdf evaluated at (y  μ)/σ.
Figure 18, Plot of F(x)
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.
 
#include <imsls.h>
#include <stdio.h>
 
int main()
{
    float      p, x1, x2;
 
    x1  = (90.0-100.0)/15.0;
    p   = imsls_f_normal_cdf(x1);
    printf("The probability that X is less than 90 "
        "is %6.4f\n", p);
 
    x1 = (105.0-100.0)/15.0;
    x2 = (110.0-100.0)/15.0;
    p  = imsls_f_normal_cdf(x2) - imsls_f_normal_cdf(x1);
    printf("The probability that X is between 105 and "
        "110 is %6.4f\n", p);
}
Output
 
The probability that X is less than 90 is 0.2525
The probability that X is between 105 and 110 is 0.1169