naginterfaces.library.stat.pdf_​multi_​normal_​vector

naginterfaces.library.stat.pdf_multi_normal_vector(ilog, x, xmu, iuld, sig)[source]

pdf_multi_normal_vector returns a number of values of the probability density function (PDF), or its logarithm, for the multivariate Normal (Gaussian) distribution.

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

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

Parameters
ilogint

The value of determines whether the logarithmic value is returned in PDF.

, the probability density function is returned.

, the logarithm of the probability density function is returned.

xfloat, array-like, shape

, the matrix of points at which to evaluate the probability density function, with the th dimension for the th point held in .

xmufloat, array-like, shape

, the mean vector of the multivariate Normal distribution.

iuldint

Indicates the form of and how it is stored in .

holds the lower triangular portion of .

holds the upper triangular portion of .

is a diagonal matrix and only holds the diagonal elements.

holds the lower Cholesky decomposition, such that .

holds the upper Cholesky decomposition, such that .

sigfloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Information defining the variance-covariance matrix, .

or

must hold the lower or upper portion of , with held in . The supplied variance-covariance matrix must be positive semidefinite.

is a diagonal matrix and the th diagonal element, , must be held in

or

must hold or , the lower or upper Cholesky decomposition of , with or held in , depending on the value of . No check is made that or is a valid variance-covariance matrix. The diagonal elements of the supplied or must be greater than zero

Returns
pdffloat, ndarray, shape

or depending on the value of .

rankint

, rank of .

Raises
NagValueError
(errno )

On entry, .

Constraint: or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , , , or .

(errno )

On entry, is not positive semidefinite.

(errno )

On entry, at least one diagonal element of is less than or equal to .

(errno )

On entry, is not positive definite and eigenvalue decomposition failed.

(errno )

On entry, .

Constraint: if , .

Notes

The probability density function, of an -dimensional multivariate Normal distribution with mean vector and variance-covariance matrix , is given by

If the variance-covariance matrix, , is not of full rank then the probability density function, is calculated as

where is the pseudo-determinant, a generalized inverse of and its rank.

pdf_multi_normal_vector evaluates the PDF at points with a single call.