inormcdf

The inormcdf function calculates the inverse normal cumulative distribution function (CDF).

Synopsis

inormcdf(prob,mean,std_dev)

Summary

The inverse normal CDF, corresponding to the cumulative probability of prob given a normal distribution with the specified mean and std_dev.

Example

The standard normal distribution has mean μ = 0 and standard deviation σ = 1. This example shows the cumulative probabilities that corresponds to probabilities from 0.25 up to 0.975.
 

  1. Create a 1-dimensional array of size 20 to hold probabilities, and fill it with probability values from 0.25 to 0.975:

    AFL% store(build(<prob:double>[x=0:19], (x+0.5)/20.0), probabilities);


    The output is:

    {x} prob
    {0} 0.025
    {1} 0.075
    {2} 0.125
    {3} 0.175
    {4} 0.225
    {5} 0.275
    {6} 0.325
    {7} 0.375
    {8} 0.425
    {9} 0.475
    {10} 0.525
    {11} 0.575
    {12} 0.625
    {13} 0.675
    {14} 0.725
    {15} 0.775
    {16} 0.825
    {17} 0.875
    {18} 0.925
    {19} 0.975
  2. Calculate the inverse normal CDF using the values in the probabilities array:

    apply(probabilities, standard_deviations, inormcdf(prob,0,1));


    The output is:

    {x} prob,standard_deviations
    {0} 0.025,-1.95996
    {1} 0.075,-1.43953
    {2} 0.125,-1.15035
    {3} 0.175,-0.934589
    {4} 0.225,-0.755415
    {5} 0.275,-0.59776
    {6} 0.325,-0.453762
    {7} 0.375,-0.318639
    {8} 0.425,-0.189118
    {9} 0.475,-0.0627068
    {10} 0.525,0.0627068
    {11} 0.575,0.189118
    {12} 0.625,0.318639
    {13} 0.675,0.453762
    {14} 0.725,0.59776
    {15} 0.775,0.755415
    {16} 0.825,0.934589
    {17} 0.875,1.15035
    {18} 0.925,1.43953
    {19} 0.975,1.95996

    Note that more than 95% of values fall within two standard deviations of the mean for the standard normal distribution. That is, for the standard normal distribution, two standard deviations comprise a 95% confidence interval.

     

  3. Remove the example array:

    AFL% remove(probabilities);