# Integrating a standard ellipse using mvnlps

3 ビュー (過去 30 日間)
Kiran Ramsaroop 2019 年 10 月 10 日

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?

### 回答 (1 件)

Prabhan Purwar 2019 年 10 月 17 日
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.