The function may be called by the names: g01hbc, nag_stat_prob_multi_normal or nag_multi_normal.
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 g01hac and numerical integration is then used over the remaining dimensions. In the case of ,
is used and for
To evaluate the probability for a direct call to g01eac is made and for calls to g01hac are made.
Kendall M G and Stuart A (1969) The Advanced Theory of Statistics (Volume 1) (3rd Edition) Griffin
1: – Nag_TailProbabilityInput
On entry: indicates which probability is to be returned.
On entry, the value in b is less than or equal to the corresponding value in a.
Full accuracy not achieved, relative accuracy .
A larger value of tol can be tried or the length of the workspace increased. The returned value is an approximation to the required result.
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
On entry, .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
Accuracy requested by tol is too strict: .
Round-off error has prevented the requested accuracy from being achieved; a larger value of tol can be tried. The returned value will be an approximation to the required result.
The accuracy should be as specified by tol. When on exit NE_ACC the approximate accuracy achieved is given in the error message. For the upper and lower tail probabilities the infinite limits are approximated by cut-off points for the dimensions over which the numerical integration takes place; these cut-off points are given by , where is the inverse univariate Normal distribution function.
8Parallelism and Performance
g01hbc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
g01hbc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
The time taken is related to the number of dimensions, the range over which the integration takes place (, for ) and the value of as well as the accuracy required. As the numerical integration does not take place over the last two dimensions speed may be improved by arranging so that the largest ranges of integration are for and .
This example reads in the mean and covariance matrix for a multivariate Normal distribution and computes and prints the associated central probability.