# naginterfaces.library.stat.prob_​multi_​normal¶

naginterfaces.library.stat.prob_multi_normal(xmu, sig, a=None, b=None, tol=0.0001)[source]

prob_multi_normal returns the upper tail, lower tail or central probability associated with a multivariate Normal distribution of up to ten dimensions.

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

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/g01/g01hbf.html

Parameters
xmufloat, array-like, shape

, the mean vector of the multivariate Normal distribution.

sigfloat, array-like, shape

, the variance-covariance matrix of the multivariate Normal distribution. Only the lower triangle is referenced.

aNone or float, array-like, shape , optional

If upper tail or central probablilities are to be returned, should supply the lower bounds, , for .

bNone or float, array-like, shape , optional

If lower tail or central probablilities are to be returned, should supply the upper bounds, , for .

tolfloat, optional

If the relative accuracy required for the probability, and if the upper or the lower tail probability is requested then is also used to determine the cut-off points, see Accuracy.

If , is not referenced.

Returns
pfloat

The upper tail, lower tail or central probability associated with then multivariate Normal distribution.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, the value in is less than or equal to the corresponding value in .

(errno )

On entry, is not positive definite.

Warns
NagAlgorithmicWarning
(errno )

Full accuracy not achieved, relative accuracy .

(errno )

Accuracy requested by is too strict: .

Notes

Let the vector random variable follow an -dimensional multivariate Normal distribution with mean vector and variance-covariance matrix , then the probability density function, , is given by

The lower tail probability is defined by:

The upper tail probability is defined by:

The central probability is defined by:

To evaluate the probability for , the probability density function of is considered as the product of the conditional probability of given and and the marginal bivariate Normal distribution of and . The bivariate Normal probability can be evaluated as described in prob_bivariate_normal() and numerical integration is then used over the remaining dimensions. In the case of , quad.dim1_fin_bad is used and for quad.md_adapt is used.

To evaluate the probability for a direct call to prob_normal() is made and for calls to prob_bivariate_normal() are made.

References

Kendall, M G and Stuart, A, 1969, The Advanced Theory of Statistics (Volume 1), (3rd Edition), Griffin