Integrating a standard ellipse using mvnlps
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (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.
Refer to the following link : https://www.mathworks.com/matlabcentral/fileexchange/29639-protection-level-toolbox
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!