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 parameter mu and a scale parameter sigma.

  • x must be an N×2 matrix with each variable as a column vector.
  • mu can be either a scalar (common mean) or a two-element row vector (each element corresponds to a variable). If empty, a zero mean is assumed.
  • sigma can be a scalar (common variance) or a 2×2 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