[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multivariate pdf of a normal distribution
From: |
Paul Kienzle |
Subject: |
Re: Multivariate pdf of a normal distribution |
Date: |
Mon, 7 Nov 2005 21:48:01 -0500 |
On Nov 7, 2005, at 8:51 AM, Mike Miller wrote:
On Mon, 7 Nov 2005, Michael Creel wrote:
Paul Kienzle wrote:
(snip)
Note: Google found a cdf here:
http://alex.strashny.org/a/Multivariate-normal-cumulative-
distribution-function-(cdf)-in-MATLAB.html
On Monday morning, this was a broken link. In general, evaluating the
mvn cdf for a p-vector will require monte carlo integration or
similar techniques when p is at all large.
I think the problem might be that there is a space in that URL when
there shouldn't be a space. Try this:
http://alex.strashny.org/a/Multivariate-normal-cumulative-
distribution-function-(cdf)-in-MATLAB.html
That page says the following:
In statistics, the multivariate normal (mvn) is a popular
distribution.
Unfortunately, its cumulative distribution function (cdf) does not
have
a closed form. There are, however, a number of algorithms that
numerically estimate the value of the cdf. Here is an implementation
of
one such algorithm in MATLAB [URL below]. For the algorithm itself,
see
Genz, A. (1992) Numerical Computation of Multivariate Normal
Probabilities, J. Comp. Graph. Stat.
The linked URL is this one:
http://alex.strashny.org/b/mvncdf.m
It is under the GPL. There is also a link to the Genz paper in
postscript format:
http://alex.strashny.org/local/Genz-1992-multivariate-normal-
probabilities.ps
The manual for NIST dataplot has some examples:
http://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/
mvncdf.htm
and some references:
"Comparison of Methods for the Computation ofMultivariate Normal
Probabilities", Alan Genz, Computing Science and Statistics, 25, 1993,
pp. 400-405.
"Numerical Computation of Multivariate Normal Probabilities", Alan
Genz, Journal of Computational and Graphical Statistics, 1, 1992, pp.
141-149.
Plugging the parameters and limits into the mvncdf code above I did not
get the same values. I didn't have a chance to figure out where I went
wrong.
Here's the test I used if anybody wants to correct it:
%!test
%! sigma = [1.0 -0.707107 0.0 0.0 0.0;
%! -0.707107 1.0 0.5 0.5 0.5;
%! 0.0 0.5 1.0 0.5 0.5;
%! 0.0 0.5 0.5 1.0 0.5;
%! 0.0 0.5 0.5 0.5 1.0 ];
%! lo = [0.0 0.0 1.7817 1.4755 -inf];
%! hi = [inf 1.5198 inf inf 1.5949];
%! accuracy = 0.00005;
%! Alo = mvncdf(lo,0,sigma,accuracy);
%! Ahi = mvncdf(hi,0,sigma,accuracy);
%! assert(Ahi-Alo, 0.2865, 0.0005);
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Re: Multivariate pdf of a normal distribution, (continued)
- Re: Multivariate pdf of a normal distribution, Mike Miller, 2005/11/05
- Re: Multivariate pdf of a normal distribution, Paul Kienzle, 2005/11/05
- Re: Multivariate pdf of a normal distribution, Mike Miller, 2005/11/05
- Re: Multivariate pdf of a normal distribution, Prasenjit Kapat, 2005/11/05
- Re: Multivariate pdf of a normal distribution, Mike Miller, 2005/11/05
- Re: Multivariate pdf of a normal distribution, Prasenjit Kapat, 2005/11/05
- Re: Multivariate pdf of a normal distribution, Paul Kienzle, 2005/11/05
- Re: Multivariate pdf of a normal distribution, Mike Miller, 2005/11/06
Re: Multivariate pdf of a normal distribution, Michael Creel, 2005/11/07
Re: Multivariate pdf of a normal distribution, Gorazd Brumen, 2005/11/06