MATLAB Answers

Integrating a standard ellipse using mvnlps

6 views (last 30 days)
Kiran Ramsaroop
Kiran Ramsaroop on 10 Oct 2019
Answered: Prabhan Purwar on 17 Oct 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!

  0 Comments

Sign in to comment.

Answers (1)

Prabhan Purwar
Prabhan Purwar on 17 Oct 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.

  0 Comments

Sign in to comment.

Sign in to answer this question.