Integrating a standard ellipse using mvnlps

1 visualizzazione (ultimi 30 giorni)
Kiran Ramsaroop
Kiran Ramsaroop il 10 Ott 2019
Risposto: Prabhan Purwar il 17 Ott 2019
Hi all
I am trying to use Alan Genz's mvnlps code as posted here
The aim is to use it to integrate the area of under an ellipse given a bivariate distribution.
I have a bivariate normal distribution with standard deviation [, ] and have an ellipse with major radius = a and minor radius = b
To me, this should be quite a straightforward problem - I simply want to compute a bounded integral of my normal bivariate distribution, which has no skew, without having to resort to numerical integration.
I have:
And as such, I would expect that integrating over that surface, with those bounds would give me around 0.6827 (i.e. 1-sigma worth of stuff under my curve). However, I find the following:
e = [1/(135^2),0; 0,1/(3^2)];
mvnval = mvnlps( [0,0]', diag([135, 3]).^2, [0,0]', e, 1, 0.0001)
mvnval =
0.3935
When to me, that should be around 1-sigma. Am I doing something wrong with my definition of e, my "radius" (I am unsure what that actually means in the context of an ellipse), or indeed something that I haven't even thought of?
Thanks in advance!

Risposte (1)

Prabhan Purwar
Prabhan Purwar il 17 Ott 2019
Hi,
Mvnlps() is one of the several submissions in MATLAB File Exchange on MATLAB Central which is a forum for our product users to interact, exchange information and knowledge, without MathWorks' involvement. Feel free to contact the author of this submission directly for specific questions about the implementation.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by