Subscribe Bookmark RSS Feed

Confidence ellipse calculation

davidk

Community Trekker

Joined:

Jan 29, 2013

Hi Folks,

Could someone suggest how is the confidence ellipse in a bivariate chart calculated by JMP? For example - 95% confidence ellipse

Thanks,

David

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi DavidK,

The calculation for the confidence ellipse (density ellipse) is based on an assumption that your sample is drawn from a bivariate normal distribution, and the bounds are calculated based on quantiles of that distribution. Here are some more details on the ellipse:  Density Ellipse

Are you looking for the actual calculation of this ellipse; that is, how to find the lengths of the major and minor axes, and the slope parameter? The slope is based on the orthogonal fit of X and Y in scaled space; rather than minimizing the errors with respect to Y, deviations are minimized with respect to X and Y both -- think principle component analysis. The major and minor axis lengths are then, in essence, lookups of the quantiles of the bivariate normal distribution (with ⍴ estimated from the sample r) scaled by the standard deviations of each variable. The center is the bivariate mean.

I hope this helps!

julian

8 REPLIES
Solution

Hi DavidK,

The calculation for the confidence ellipse (density ellipse) is based on an assumption that your sample is drawn from a bivariate normal distribution, and the bounds are calculated based on quantiles of that distribution. Here are some more details on the ellipse:  Density Ellipse

Are you looking for the actual calculation of this ellipse; that is, how to find the lengths of the major and minor axes, and the slope parameter? The slope is based on the orthogonal fit of X and Y in scaled space; rather than minimizing the errors with respect to Y, deviations are minimized with respect to X and Y both -- think principle component analysis. The major and minor axis lengths are then, in essence, lookups of the quantiles of the bivariate normal distribution (with ⍴ estimated from the sample r) scaled by the standard deviations of each variable. The center is the bivariate mean.

I hope this helps!

julian

davidk

Community Trekker

Joined:

Jan 29, 2013

@Julian Parris - thanks a lot for the detailed response.

I am not a statistician by training (far from it), but do use the density ellipses quite a lot. What i am looking for are the formulas to calculate the parameters you described. Do you have these or could you provide me a reference where i can look them up?

Thanks,

David

julian

Staff

Joined:

Jun 25, 2014

Hi DavidK,

I think I can help you with part of this, but the other part is a little beyond my knowledge (I'm also not a statistician by training, but I know some other people who frequent this forum certainly are!). To get the orthogonal fit in Fit Y by X, under the Red Triangle menu select "Fit Orthogonal" then "Unequal Variances (Princ Comp). This will give you the major axis of the ellipse, and will include the formula for the line. The calculations for major and minor axis widths seem to be the tricky part. As I understand it, these are based in the space of the first two principle components -- as if you rotated your plot to make the major axis of the ellipse have a slope of 0. The major and minor axis widths will be in part based on the desired coverage (this would be basically a look-up in a distribution table), and the other part would be the scaling (like the components of a regular confidence interval). My first thought would be to use the eigenvalues (the variances of each variable in principle component space) as the scaling, but from playing around with this it's clear that it's not so simple.

Sorry I can't be of direct help on this one! If I come across the full answer I will be sure to post (and I have a hard time letting these things go).

julian

davidk

Community Trekker

Joined:

Jan 29, 2013

Appreciate the response

ms

Super User

Joined:

Jun 23, 2011

This is a good introduction available online.

There is a JMP function to draw bivariate normal density contours directly. The below code draws an 0.95 contour for two variables with means 50 & 40, stddev 10 & 15 and correlation coefficient of 0.8. Hence, for drawing the formulas are not needed, only the moments.

New Window( "Example",

  Graph Box(

  Fill Color( "blue" );

  Normal Contour( 0.95, [50 40], [10 15], [0.8]);

  )

);


davidk

Community Trekker

Joined:

Jan 29, 2013

Thanks!

Craige_Hales

Staff

Joined:

Mar 21, 2013

Ellipsemight answer some questions if you really need to do it the hard way.  I'm not an expert on eigen values either, but I did stumble through it.  With help.

Craige
davidk

Community Trekker

Joined:

Jan 29, 2013

Thanks!