Skip to content

Compute confidence ellipses – II – equivalence of Schelp’s basic construction method for confidence ellipse with other approaches

In the 1st post of this series, I have motivated a simple method for constructing confidence ellipses for assumedly Bivariate Normal Distributions [BVD] or at least approximate BVDs. A reader has asked me, whether one can prove more rigidly that the proposed method of C. Schelp is equivalent to other BVD-based methods. Well, in this post we show that the quadratic form for Schelp’s confidence ellipse is equivalent to the one derived from the inverse covariance matrix. You need to be familiar with Schelp’s method to understand this post. See the previous post of this series and links in the link section for more details.

Previous post

Quadratic form of a confidence ellipse given by the BVD’s covariance matrix

From previous posts we know already that the quadratic form of a confidence ellipse EC

\[ \pmb{\operatorname{A}}_q \:=\: \begin{pmatrix} \alpha & \beta / 2 \\ \beta / 2 & \gamma \end{pmatrix} \,\,, \tag{1} \]
\[ \pmb{v}_E^T \circ \pmb{\operatorname{A}}_q \circ \pmb{v}_E \:=\: 1 \,, \tag{2} \]
\[ \alpha*x^2 \,+\, \beta * x \,y \,+\, \gamma * y^2 \,=\, 1 \tag{3} \]

is given by the coefficients

\[ \begin{align} \alpha \, &= \, {1 \over d_m^2 \, \sigma_x^ 2 \, \left( 1 \,-\, \rho^ 2 \right) } \,, \\[10pt] \beta \, & = \, { -\, 2\, \rho \over (d_m \, \sigma_x) \, (d_m \, \sigma_y) \, \left( 1 \,-\, \rho^ 2 \right) } \,, \\[10pt] \gamma \, &= \, {1 \over d_m^2 \, \sigma_y^ 2 \, \left( 1 \,-\, \rho^ 2 \right) } \,. \tag{4} \end{align} \]

(x, y)T is an arbitrary vector pointing to the border of the ellipse EC. dm is a factor for a confidence level given in [5] and σx, σy are the standard deviations of the BVD’s marginal distributions. ρ is the Pearson correlation coefficient.

Reverse derivation of the quadratic form from Schelp’s construction method

We reverse the construction method of C. Schelp to derive a quadratic form for the confidence ellipse EC.

Schelp constructs EC from a basic axis-parallel ellipse which we call ES. ES has the following half-axes hS,x and hS,y in x– and y-direction, respectively.

\[ \begin{align} E_S \,: \quad h_{S,x} \,&=\, \sqrt{ \, 1 \, +\, \rho^{\phantom{1}} \, } \,, \tag{5} \\[10pt] h_{S,y} \,& =\, \sqrt{ \, 1 \, – \, \rho^{\phantom{1}} \, } \,.\tag{6} \end{align} \]

We may have derived the Pearson correlation coefficient ρ numerically from experimental data. ES is then rotated by π/4. Afterward, the x,y-coordinates are stretched by dmx and dmy. This eventually gives us the confidence ellipse EC with vectors (x, y)T .

To get a formula for this ellipse we just reverse all named operations on the vectors. I.e.:

\[ \begin{pmatrix} x_S \\ y_S \end{pmatrix} \,=\, \begin{pmatrix} {1 \over \sqrt{2}} & {1 \over \sqrt{2}} \\ -\, {1 \over \sqrt{2}} & {1 \over \sqrt{2}} \end{pmatrix} \bullet \begin{pmatrix} {1 \over d_m\, \sigma_x} & 0 \\ 0 & {1 \over d_m\, \sigma_y} \end{pmatrix} \bullet \begin{pmatrix} x \\ y \end{pmatrix} \,, \tag{7} \]

with (xS, yS)T representing vectors pointing to the border of the ellipse ES. The left matrix on the equation’s right side is the inverse rotation matrix for an angle π/4. The second matrix inverts the stretching of the coordinates. The components of vector (xS, yS)T fulfill the usual condition for an axis-parallel ellipse:

\[ {x_s^2 \over h_{S,x}^2 } \,+\, {y_s^2 \over h_{S,y}^2 } \,=\, 1 \,. \tag{8} \]

Thus we have:

\[ {1\over (1 \,+\, \rho)} \, {1 \over 2} \, \left[ \, {1\over d_m\, \sigma_x} \, x^2 \,+\, {1\over d_m\, \sigma_y} \, y^2 \, \right]^2 \,+\, {1\over (1 \,-\, \rho)} \, {1 \over 2} \, \left[ \, {1\over d_m\, \sigma_y} \, y^2 \,-\, {1\over d_m\, \sigma_x} \, x^2 \, \right]^2 \,= \, 1 \,. \tag{9} \]

This in turn gives us

\[ \begin{align} {1 \over 1 \,-\, \rho^2} \, \left[ \, {1\over d_m\, \sigma_x} \, x^2 \, -\, 2\, \rho \, {1\over d_m^2 \, \sigma_x\, \sigma_y }\, x\, y \,+\, {1\over d_m\, \sigma_y} \, y^ \, \right] \,&=\, 1 \,, \tag{10} \\[10pt] \Longleftrightarrow \alpha_C \ x^2 \, +\, \beta_C \,x \, y \,+\, \gamma_C\, y^2 \,& =\, 1 \end{align} \]

The left side of eq. (10) is the quadratic form for the target ellipse EC . Obviously, we have

\[ \alpha_C \,= \, \alpha\,, \quad \beta_C \,= \, \beta ,, \quad \gamma_C \,=\, \gamma\,. \tag{11} \]

This shows that the quadratic form for the ellipse constructed by Schelp’s proposed method indeed is identical to the one derived from the inverse covariance matrix of the underlying (assumed) BVD.

Conclusion

In this post I have shown that the recipe of C. Schelp for constructing confidence ellipses really provides the same ellipses as the ones derived from the covariance matrix of a Bivariate Normal Distribution. Thus, the recipe given in the 1st post of this series is trustworthy and can make life much easier when we need to evaluate data for which we assume some underlying BVD. As it often is the case for data used or produced in Machine Learning experiments. For example to check whether the real data distribution is similar to a BVD, we can determine a Pearson correlation coefficient numerically, construct confidence ellipses via the given recipe and compare these theoretically motivated ellipses with numerically derived contours of the real distribution.

In the next post of this series, I will list up the four methods to construct and evaluate confidence ellipses which we have gathered throughout all our considerations about BVDs in this blog section.

Links and literature

[1] Carsten Schelp, “An Alternative Way to Plot the Covariance Ellipse”,
https://carstenschelp.github.io/2018/09/14/Plot_Confidence_Ellipse_001.html

[2] R. Mönchmeyer, 2025, “Ellipses via matrix elements – I – basic derivations and formulas”,
https://machine-learning.anracom.com/2025/07/17/ellipses-via-matrix-elements-i-basic-derivations-and-formulas

[3] R. Mönchmeyer, 2025, “Bivariate normal distribution – derivation by linear transformation of a random vector of two independent Gaussians”,
https://machine-learning.anracom.com/2025/06/24/bivariate-normal-distribution-derivation-by-linear-transformation-of-random-vector-of-two-independent-gaussians

[4] R. Mönchmeyer, 2025, “Bivariate normal distribution – explicit reconstruction of a BVD random vector via Cholesky decomposition of the covariance matrix”,
https://machine-learning.anracom.com/2025/06/27/bivariate-normal-distribution-explicit-reconstruction-of-a-bvd-random-vector-via-cholesky-decomposition-of-the-covariance-matrix

[5] R. Mönchmeyer, 2025, “Bivariate Normal Distribution – integrated probability up to a given Mahalanobis distance, the Chi-squared distribution and confidence ellipses”,
https://machine-learning.anracom.com/2025/07/30/bivariate-normal-distribution-integrated-probability-up-to-a-given-mahalanobis-distance-the-chi-squared-distribution-and-confidence-ellipses