normalInverseCdf¶
Evaluates the inverse of the standard normal (Gaussian) distribution function.
Synopsis¶
normalInverseCdf (p)
Required Arguments¶
- float
p
(Input) - Probability for which the inverse of the normal distribution function is
to be evaluated. Argument
p
must be in the open interval (0.0, 1.0).
Return Value¶
The inverse of the normal distribution function evaluated at p
. The
probability that a standard normal random variable takes a value less than
or equal to normalInverseCdf
is p
.
Description¶
Function normalInverseCdf
evaluates the inverse of the distribution
function, \(F(x)\), of a standard normal (Gaussian) random variable,
normalInverseCdf
(p) = \(F^{-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 0 and a variance of 1.
Function normalInverseCdf
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 normalInverseCdf
are
described by Kinnucan and Kuki (1968).
Example¶
This example computes the point such that the probability is 0.9 that a standard normal random variable is less than or equal to this point.
from __future__ import print_function
from numpy import *
from pyimsl.stat.normalInverseCdf import normalInverseCdf
p = 0.9
x = normalInverseCdf(p)
print("The 90th percentile of a standard normal is %6.4f." % x)
Output¶
The 90th percentile of a standard normal is 1.2816.