naginterfaces.library.stat.prob_​normal

naginterfaces.library.stat.prob_normal(x, tail='L')[source]

prob_normal returns a one or two tail probability for the standard Normal distribution.

For full information please refer to the NAG Library document for g01ea

https://www.nag.com/numeric/nl/nagdoc_27.3/flhtml/g01/g01eaf.html

Parameters
xfloat

, the value of the standard Normal variate.

tailstr, length 1, optional

Indicates which tail the returned probability should represent.

The lower tail probability is returned, i.e., .

The upper tail probability is returned, i.e., .

The two tail (significance level) probability is returned, i.e., .

The two tail (confidence interval) probability is returned, i.e., .

Returns
pfloat

A one or two tail probability for the standard Normal distribution.

Raises
NagValueError
(errno )

On entry, .

Constraint: , , or .

Notes

The lower tail probability for the standard Normal distribution, is defined by:

where

The relationship

is used, where erfc is the complementary error function, and is computed using specfun.erfc_real. For the upper tail probability the relationship is used and for the two tail significance level probability twice the probability obtained from the absolute value of is returned.

When the two tail confidence probability is required the relationship

is used, where erf is the error function, and is computed using specfun.erf_real.

References

NIST Digital Library of Mathematical Functions

Hastings, N A J and Peacock, J B, 1975, Statistical Distributions, Butterworth