cdfBvn#

Purpose#

Computes the cumulative distribution function of the standardized bivariate Normal density (lower tail).

Format#

p = cdfBvn(h, k, r)#
Parameters:
  • h (NxK matrix) – the upper limits of integration for variable 1.

  • k (LxM matrix) – ExE conformable with h, the upper limits of integration for variable 2.

  • r (PxQ matrix) – ExE conformable with h and k, the correlation coefficients between the two variables.

Returns:

p (matrix), max(N,L,P) by max(K,M,Q) matrix) – the result of the double integral from \(-∞\) to h and \(-∞\) to k of the standardized bivariate Normal density \(f(x, y, r)\).

Examples#

// Set seed for repeatable random numbers
rndseed 777;

// Upper integration bounds of variable 1
x = rndn(10, 1);

// Upper integration bounds of variable 2
y = rndn(10, 1);

// Correlation parameter
rho = rndu(10, 1);

// Call cdfBvn
p = cdfBvn(x, y, rho);

After above code,

p =   0.1508   x = 0.5242  y = -0.8802
      0.4379       1.3741      -0.0757
      0.0037      -2.6114      -1.2862
      0.6522       0.6770       0.4337
      0.1170      -0.3000      -0.6165
      0.4613       1.8822      -0.0931
      0.4173       1.1114      -0.1526
      0.0083      -1.2123      -1.9651
      0.0955       0.2336      -1.2165
      0.1166       1.9085      -1.1923

Remarks#

The function integrated is:

\[f(x,y,r) =\frac{e^{−0.5w}}{2\pi\sqrt{−r^2}}\]

with

\[w⁢ = \frac{x^2 − 2rxy + y^2}{1−r^2}\]

Thus, x and y have 0 means, unit variances, and \(correlation = r\).

Allowable ranges for the arguments are:

\[\begin{split}-∞ \leq h \leq +∞ \\ -∞ \leq k \leq +∞ \\ -1 \lt r \lt 1\end{split}\]

A -1 is returned for those elements with invalid inputs.

To find the integral under a general bivariate density, with x and y having nonzero means and any positive standard deviations, use the transformation equations:

\[\begin{split}h = (ht - ux)/ sx\\ k = (kt - uy)\\\end{split}\]

where ux and uy are the (vectors of) means of x and y, sx and sy are the (vectors of) standard deviations of x and y, and ht and kt are the (vectors of) upper integration limits for the untransformed variables, respectively.

Technical Notes#

The absolute error for cdfBvn() is approximately \(±5.0e-9\) for the entire range of arguments.

References#

  1. Daley, D.J. ‘’Computation of Bi- and Tri-variate Normal Integral.’’ Appl. Statist. Vol. 23, No. 3, 1974, 435-38.

  2. Owen, D.B. ‘’A Table of Normal Integrals.’’ Commun. Statist.-Simula. Computa., B9(4). 1980, 389-419.

See also

cdfN(), cdfTvn()