This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Acquiring percentile ellipses in Bivariate Gaussian Distribution


> From: Simon Ching <simon_ching@yahoo.com>
> Hello,
> 
> Suppose I have the mean_x, mean_y, variance_x, variance_y and
> covariance of a certain sample, then I can easily determine the pdf
> of the fitted bivariate gaussian distribution using the
> gsl_ran_bivariate_gaussian_pdf () function.
> 
> However I am interested in determining the percentile ellipses of
> the bivariate gaussian distribution, say an ellipse which enclosed
> 70% of the total mass of the pdf.  Can GSL help me on that, and how?

This doesn't particularly sound like a gsl question. However. My
suggestion would be to first focus on the case with independence
(i.e. the isoprobability curves are circles). Locate the circle that
has 70% mass. Specifically, rig up some simple bisection or something
which identifies the radius r of a circle s.t. the mass inside the
circle is 0.7.

Once you know r under the independent case, transform that to become
the ellipse under your correlation. (This is the usual game of
cholesky decomposition of the covariance matrix).

I'm sure there are better ways, but this one sounds feasible. I'd be
happy to be told of sweeter ways, if others on the list have ideas. :-)
Hope this helps,

-- 
Ajay Shah                                                   Consultant
ajayshah@mayin.org                      Department of Economic Affairs
http://www.mayin.org/~ajayshah          Ministry of Finance, New Delhi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]