Moving from 1-D to 2-D Confidence Intervals

The blog title 'Moving from 1-D to 2-D Confidence Intervals' set on a background of 2 people drawing on a blackboard

Confidence Ellipse

Pearson correlation is frequently used to measure the strength and direction of the linear association between two numeric variables, say X1 and X2. However, often it is also of interest to describe the uncertainty in the estimate of the bivariate mean (X1, X2). But how do we form a “confidence interval” for a bivariate mean given that we are in two-dimensional space? The answer is surprisingly simple: by calculating a confidence ellipse and superimposing it onto the scatter plot of X1 and X2.

An example of a confidence ellipse around an estimated bivariate mean is shown in the scatter plot below. In this example, the two variables X1 and X2 have a moderate, positive correlation of 0.74, and their estimated bivariate mean is at the point (3.43, 5.01).

Scatter plot titled '95% Confidence Ellipse' showing data points plotted as X marks with X₁ on the horizontal axis (2.5 to 4.5) and X₂ on the vertical axis (4.0 to 6.0). A red elliptical confidence region is drawn around a blue dot representing the bivariate mean, with 'bivariate mean' labeled in blue text.

Now, whereas as an ordinary (i.e., one-dimensional) confidence interval for a mean provides a range of plausible values within which we expect (at a certain level of confidence) the true mean to fall, a confidence ellipse provides a region in two-dimensional space within which we expect the true bivariate mean to be. And as for an ordinary confidence interval, there is a probability level associated with the confidence ellipse. At the probability level p, assuming a bivariate Normal distribution, it is expected that (100×p)% of confidence ellipses will contain the true bivariate mean.

The shape of such an ellipse is determined by the major and minor principal axes. As the correlation between X1 and X2 increases, the ellipse will become narrower and more elongated along the major principal axis. Conversely, as the correlation between X1 and X2 decreases, the ellipse will become more circular.

In the figure below, 95% confidence ellipses for strongly (0.96) and weakly (-0.12) correlated bivariate data are given.

Scatter plot titled 'Strongly Correlated' showing data points as X marks with X₁ on horizontal axis (0 to 6) and X₂ on vertical axis (0 to 6). Data shows strong positive correlation along a diagonal pattern. A narrow red ellipse is drawn in the center. Blue diagonal lines cross the plot with 'Major axis' and 'Minor axis' labeled in blue at the bottom corners.
Scatter plot titled 'Weakly Correlated' showing data points as X marks with X₁ on horizontal axis (0 to 6) and X₂ on vertical axis (0 to 6). Data shows weak correlation with more scattered distribution. A red circle is drawn in the center of the data cluster. Blue diagonal lines cross the plot with 'Minor axis' and 'Major axis' labeled in blue at the bottom corners.

Note: the longest diameter of the ellipse runs along the major principal axis, whilst the shortest diameter runs along the minor principal axis.

Readers interested in learning exactly how to calculate confidence ellipses are directed to Sokal, R.R., & Rohlf, J.F. (1995. Chapter 15: Correlation. In Biometry: The Principles and Practice of Statistics in Biological Research, Third edition, 555-608. New York: W.H. Freeman & Company).

Prediction Ellipse

In addition to describing the uncertainty in the estimate of the bivariate mean, predicting the region in the (X1, X2) scatter plot where a new observation is likely to fall is also often of interest. This region is provided by a prediction ellipse. Prediction ellipses are created such that, under the assumption of a bivariate Normal distribution, at a probability level of p it is expected that (100×p)% of prediction ellipses will contain future bivariate observations.

Shown in the plot below are the 50%, 75% and 95% prediction ellipses for the weakly correlated bivariate dataset used above. 

Scatter plot titled 'Weakly Correlated' showing X marks plotted with X₁ on horizontal axis (-1 to 7) and X₂ on vertical axis (-1 to 7). Three concentric blue ellipses of increasing size are overlaid on the data, representing prediction ellipses at 50%, 75%, and 95% confidence levels. A legend shows 'Prediction ellipses (50%, 75%, 95%)' in purple and 'Principal axes' as dotted lines. Red text labels 'Minor axis' and 'Major axis' at bottom corners, with a red arrow pointing to the ellipses labeled '50% to 95%'.

As for confidence ellipses, the stronger the correlation the narrower and more elongated the prediction ellipses are in the direction of the major axis, as seen below:

Scatter plot titled 'Strongly Correlated' showing X marks plotted with X₁ on horizontal axis (-1 to 7) and X₂ on vertical axis (-1 to 7). Three concentric blue ellipses in a narrow, diagonal orientation represent prediction ellipses at 50%, 75%, and 95% confidence levels for strongly correlated data. A legend shows 'Prediction ellipses (50%, 75%, 95%)' in purple and 'Principal axes' as dotted lines. Red text labels 'Major axis' and 'Minor axis' at bottom corners.

Notice that if we fix X1 (or X2), the prediction intervals for X2 (or X1) are wider for weakly correlated data than for strongly correlated data. For example, when X1=5, the 95% prediction interval for X2 spans approximately 1.3 to 4.2 for the weakly correlated data above (i.e., a width of ~2.9), whereas it spans approximately 4.1 to 5.8 for the strongly correlated data above (i.e., a width of ~1.7). Known as conditional prediction, unsurprisingly the information on X1 (or X2) becomes more relevant and informative to the prediction of X2 (or X1) as the correlation between X1 and X2 increases.

Equal-frequency Ellipse

Another type of ellipse for bivariate data is the equal-frequency ellipse. This form is useful for comparing the relationship, and variability around this relationship, for different groups in a bivariate dataset. Once again, assuming a bivariate Normal distribution, at a probability level of p, it is expected that (100×p)% of the observed data will be enclosed within the equal-frequency ellipse. 

Note: For reasonably sized datasets, the prediction and equal-frequency ellipses will be very similar.

In the example below, 95% equal-frequency ellipses have been used to compare the relationship between sepal length and sepal width for three iris species: Setosa, Versicolor and Virginica. From the plot produced, we can see that the relationship, and the variability around this relationship, is rather different for Setosa compared to the other two species.

Scatter plot titled 'Fisher's iris data' showing sepal measurements with Sepal Width on horizontal axis (1 to 5) and Sepal Length on vertical axis (4 to 8). Three iris species are plotted with different colored X marks: black for Setosa, red for Versicolor, and green for Virginica. Three overlapping 95% equal-frequency ellipses in gray, pink, and green correspond to each species cluster. A legend identifies the species markers and ellipse meaning.

SUMMARY

Assuming a bivariate Normal distribution, and for example at a probability level of 0.95, it is expected that:

  • 95 percent of confidence ellipses will contain the true bivariate mean.
  • 95 percent of prediction ellipses will contain a future bivariate observation.
  • 95 percent of the observed data will be enclosed within the equal-frequency ellipse.

The more strongly correlated the two variables are, the narrower the ellipse will be. If the two variables are uncorrelated, the ellipse will be circular.

To find out how to draw 2-D scatter plots with confidence, prediction and/or equal-frequency ellipses superimposed in Genstat, check out the tutorial video: Confidence region plots.

For more info or guidance, get in touch with our team today:

Picture of Dr. Vanessa Cave
Dr. Vanessa Cave
Dr. Vanessa Cave is an applied statistician interested in the application of statistics to the biosciences, in particular agriculture and ecology, and is a developer of the Genstat statistical software package. She has over 15 years of experience collaborating with scientists, using statistics to solve real-world problems. Vanessa provides expertise on experiment and survey design, data collection and management, statistical analysis, and the interpretation of statistical findings. Her interests include statistical consultancy, mixed models, multivariate methods, statistical ecology, statistical graphics and data visualisation, and the statistical challenges related to digital agriculture. Vanessa is a past President of both the Australasian Region of the International Biometric Society and the New Zealand Statistical Association, on the Editorial Board of The New Zealand Veterinary Journal and an honorary academic at the University of Auckland. She has a PhD in statistics from the University of St Andrew.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Related articles

How much of the variation in your field trial comes from the treatments, and how much comes from...
What should you do when count data are more variable than your model expects? Vanessa Cave and David...
Precision breeding can deliver scientifically impressive traits, but practical value depends on more than technical success. Owen McIntosh...