Function Reference: bvncdf

statistics: p = bvncdf (x, mu, sigma)
statistics: p = bvncdf (x, [], sigma)

Bivariate normal cumulative distribution function (CDF).

p = bvncdf (x, mu, sigma) will compute the bivariate normal cumulative distribution function of x given a mean mu, which must be a scalar, and a 2x2 sigma covariance matrix, which must be positive definite.

See also: mvncdf

Source Code: bvncdf

Example: 1

 

 mu = [1, -1];
 sigma = [0.9, 0.4; 0.4, 0.3];
 [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)');
 x = [X1(:), X2(:)];
 p = bvncdf (x, mu, sigma);
 Z = reshape (p, 25, 25);
 surf (X1, X2, Z);
 title ("Bivariate Normal Distribution");
 ylabel "X1"
 xlabel "X2"

                    
plotted figure