# naginterfaces.library.stat.inv_​cdf_​normal_​vector¶

naginterfaces.library.stat.inv_cdf_normal_vector(tail, p, xmu, xstd)[source]

inv_cdf_normal_vector returns a number of deviates associated with given probabilities of the Normal distribution.

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

https://www.nag.com/numeric/nl/nagdoc_29.2/flhtml/g01/g01taf.html

Parameters
tailstr, length 1, array-like, shape

Indicates which tail the supplied probabilities represent. Letting denote a variate from a standard Normal distribution, and , then for , for :

The lower tail probability, i.e., .

The upper tail probability, i.e., .

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

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

pfloat, array-like, shape

, the probabilities for the Normal distribution as defined by with , .

xmufloat, array-like, shape

, the means.

xstdfloat, array-like, shape

, the standard deviations.

Returns
xfloat, ndarray, shape

, the deviates for the Normal distribution.

ivalidint, ndarray, shape

indicates any errors with the input arguments, with

No error.

On entry, invalid value supplied in when calculating .

On entry, , or, .

On entry, .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

On entry, at least one value of , or was invalid.

Notes

The deviate, associated with the lower tail probability, , for the Normal distribution is defined as the solution to

where

The method used is an extension of that of Wichura (1988). is first replaced by .

1. If , is computed by a rational Chebyshev approximation

where and , are polynomials of degree .

2. If , is computed by a rational Chebyshev approximation

where and , are polynomials of degree .

3. If , is computed as

where and , are polynomials of degree .

is then calculated from , using the relationsship .

For the upper tail probability is returned, while for the two tail probabilities the value is returned, where is the required tail probability computed from the input value of .

The input arrays to this function are designed to allow maximum flexibility in the supply of vector arguments by re-using elements of any arrays that are shorter than the total number of evaluations required. See the G01 Introduction for further information.

References

NIST Digital Library of Mathematical Functions

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

Wichura, 1988, Algorithm AS 241: the percentage points of the Normal distribution, Appl. Statist. (37), 477–484