Page 59 - Computational Statistics Handbook with MATLAB
P. 59
Chapter 2: Probability Concepts 45
subplot(1,2,2) % look down on the surface
pcolor(x,y,z),axis square
title('BIVARIATE STANDARD NORMAL')
% Now do the same thing for a covariance matrix
% with non-zero off-diagonal elements.
cov_mat = [1 0.7 ; 0.7 1];
Z = csevalnorm(X,mu,cov_mat);
z = reshape(Z,size(x));
subplot(1,2,1)
surf(x,y,z),axis square, axis tight
title('BIVARIATE NORMAL')
subplot(1,2,2)
pcolor(x,y,z),axis square
title('BIVARIATE NORMAL')
,
The probability that a point x = ( x 1 x 2 ) T will assume a value in a region
R can be found by integrating the bivariate probability density function over
plane inter-
the region. Any plane that cuts the surface parallel to the x 1 -x 2
sects in an elliptic (or circular) curve, yielding a curve of constant density.
plane cuts the surface in a normal
Any plane perpendicular to the x 1 -x 2
curve. This property indicates that in each dimension, the multivariate nor-
mal is a univariate normal distribution. This is discussed further in
Chapter 5.
2.6 MATLAB Code
The MATLAB Statistics Toolbox has many functions for the more common
distributions. It has functions for finding the value of the probability density
(mass) function and the value of the cumulative distribution function. The
reader is cautioned to remember that the definitions of the distributions
(exponential, gamma, and Weibull) differ from what we describe in the text.
For example, the exponential and the gamma distributions are parameter-
ized differently in the MATLAB Statistics Toolbox. For a complete list of what
is available in the toolbox for calculating probability density (mass) functions
or cumulative distribution functions, see Appendix E.
The Computational Statistics Toolbox contains functions for several of the
distributions, as defined in this chapter. In general, those functions that end
in p correspond to the probability density (mass) function, and those ending
with a c calculate the cumulative distribution function. Table 2.1 provides a
summary of the functions.
We note that a different function for evaluating the multivariate normal
probability density function is available for download at
© 2002 by Chapman & Hall/CRC