Why is there no equation for the perimeter of an ellipse‽
Why is there no equation for the perimeter of an ellipse‽

2×2 covariance matrix can be represented by an ellipse. This method helps visualize multivariate normal distributions and correlation matrices. Parametric equations and formulas for radii + rotation are provided for covariance matrix shown below. This is followed by examples and explanations.

θ is the angle in radians from positive x-axis to the ellipse’s major axis in the counterclockwise direction. sqrt(λ1) is the radius of the major axis (the longer radius) and sqrt(λ2) is the radius of the minor axis (shorter radius). atan2()’s first parameter is y and second is x.

When drawing confidence ellipse of a bivariate normal distribution,
the ellipse is translated such that its center is at the mean of the distribution:

where μx and μy are the means.
Note that covariance matrix by itself does not contain information about the mean.

Ellipse is rotated 45 degrees if correlation (off-diagonal) is positive regardless of its magnitude. Similarly -45 degrees if correlation is negative.

Zeros in off-diagonals means zero correlation. Ellipse axes are parallel to coordinate axes (no rotation).

Correlation matrix has 1 in diagonals and values betwen -1 and 1 inclusive in off-diagonals. Ellipse size remains the same (always touches square of side 2 units). Whether the correlation is positive or negative can be observed by the orientation of the ellipse. The amount of correlation can be interpreted by how thin the ellipse is.

Below is a list of parametric equations starting from that of a general ellipse and modifying it step by step into a prediction ellipse, showing how different parts contribute at each step.

=CHISQ.DIST(5.991,2,FALSE)
pchisq(5.991, 2)
=CHISQ.INV(0.95,2)

You are watching: How to Draw Ellipse of Covariance Matrix. Info created by Bút Chì Xanh selection and synthesis along with other related topics.