← Math simulations  ·  EE263, Stanford

The 2D Gaussian: covariance, ellipsoids, and what 90% means

A Gaussian is completely described by its mean and covariance. The level sets of its density are the ellipses xΣ−1x = c, whose axes are the eigenvectors of Σ and whose semi-axes are √(i). Because that quadratic form is χ2 distributed, a specific c makes the ellipse a confidence region: in two dimensions c = −2 log(1 − p), so 90% always sits at c = 4.61. Draw samples and count them to check that the promise is kept.

Covariance

Σ =
2.560.79 0.790.81
eigenvalues of Σ
semi-axes of the 90% ellipse
ellipseshould holdactually holds
50%50.0%
90%90.0%
99%99.0%

Samples

Presets

Show

first principal axis   second
50%   90%   99%

Drag the black probe point: what matters is not how far it is in the ordinary sense, but how far in the geometry Σ defines.