cdfTvn#
Purpose#
Computes the cumulative distribution function of the standardized trivariate Normal density (lower tail).
Format#
- p = cdfTvn(x1, x2, x3, rho12, rho23, rho13)#
- Parameters:
x1 (Nx1 vector) – upper limits of integration for variable 1
x2 (Nx1 vector) – upper limits of integration for variable 2
x3 (Nx1 vector) – upper limits of integration for variable 3
rho12 (scalar or Nx1 vector) – correlation coefficients between the two variables x1 and x2
rho23 (scalar or Nx1 vector) – correlation coefficients between the two variables x2 and x3
rho13 (scalar or Nx1 vector) – correlation coefficients between the two variables x1 and x3
- Returns:
p (Nx1 vector) – result of the triple integral from \(-\infty\:\ to\:\ x_1\), \(-\infty\:\ to\:\ x_2\), and \(-\infty\:\ to\:\ x_3\) of the standardized trivariate Normal density.
Examples#
// Variables
x1 = 0.6;
x2 = 0.23;
x3 = 0.46;
//Correlations
rho12 = 0.2;
rho23 = 0.65;
rho13 = 0.78;
/*
** Compute the CDF
*/
p = cdfTvn(x1, x2, x3, rho12, rho23, rho13);
print "p =" p;
After the above code, X will equal:
p = 0.4373
Remarks#
Allowable ranges for the arguments are:
In addition, rho12, rho23 and rho13 must come from a legitimate positive definite matrix. A -1 is returned for those rows with invalid inputs.
A separate integral is computed for each row of the inputs.
To find the integral under a general trivariate density, with x1, x2, and x3 having nonzero means and any positive standard deviations, transform by subtracting the mean and dividing by the standard deviation. For example:
The absolute error for cdfTvn()
is approximately ±2.5e-8 for the entire
range of arguments.
References#
Daley, D.J. ‘’Computation of Bi- and Tri-variate Normal Integral.’’ Appl. Statist. Vol. 23, No. 3, 1974, 435-38.
Steck, G.P. ‘’A Table for Computing Trivariate Normal Probabilities.’’ Ann. Math. Statist. Vol. 29, 780-800.