naginterfaces.library.stat.prob_​normal_​vector

naginterfaces.library.stat.prob_normal_vector(tail, x, xmu, xstd)[source]

prob_normal_vector returns a number of one or two tail probabilities for the Normal distribution.

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

https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/g01/g01saf.html

Parameters
tailstr, length 1, array-like, shape

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

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

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

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

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

xfloat, array-like, shape

, the Normal variate values.

xmufloat, array-like, shape

, the means.

xstdfloat, array-like, shape

, the standard deviations.

Returns
pfloat, ndarray, shape

, the probabilities 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, .

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.

Check for more information.

Notes

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

where

The relationship

is used, where erfc is the complementary error function, and is computed using specfun.erfc_real.

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.

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