This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Acquiring percentile ellipses in Bivariate Gaussian Distribution
- From: Ajay Shah <ajayshah at mayin dot org>
- To: gsl-discuss at sources dot redhat dot com
- Date: Wed, 13 Aug 2003 07:02:32 +0530
- Subject: Re: Acquiring percentile ellipses in Bivariate Gaussian Distribution
- Organisation: Department of Economic Affairs, Ministry of Finance, New Delhi
- References: <1060701655.25533.ezmlm@sources.redhat.com>
> 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