Confidence Ellipsoids for Bivariate Normals

Consider random variables [X_{1} X_{2}]^{T} ∼ N([μ_{1} μ_{2}]^{T} , Σ) where Σ = [ \begin{matrix}σ_{1}^{2} & σ_{12} \\ σ_{12} & σ_{2}^{2} \end{matrix} ] .

f(X) = (2π|Σ|)^{− \frac{1}{2}} exp (−\frac{1}{2}[X_{1} − μ_{1} X_{2} − μ_{2}] Σ^{−1} [ \begin{matrix}X_{1} − μ_{1} \\ X_{2} − μ_{2} \end{matrix} ])
Σ^{−1} = [ \begin{matrix}σ_{2}^{2}/|Σ| & −σ_{12}/|Σ| \\ −σ_{12}/|Σ| & σ_{1}^{2}/|Σ| \end{matrix} ]
|Σ| = σ_{1}^{2}σ^{2} − σ_{12}^{2}
f(X) = (2π|Σ|)^{− \frac{1}{2}} exp (\frac{−1}{2|Σ|} [ σ_{2}^{2}(X_{1}−μ_{1}) − σ_{12}(X_{2}−μ_{2}), σ_{1}^{2}(X_{2}−μ_{2}) − σ_{12}(X_{1}−μ_{1}) ] [ \begin{matrix}X_{1}−μ_{1} \\ X_{2}−μ_{2} \end{matrix} ])
= (2π|Σ|)^{− \frac{1}{2}} exp (\frac{−1}{2|Σ|} [σ_{2}^{2}(X_{1}−μ_{1})^{2} + σ_{1}^{2}(X_{2}−μ_{2})^{2} − 2σ_{12}(X_{1}−μ_{1})(X_{2}−μ_{2})])

For a confidence ellipsoid defined by k, X_{2} coordinates at X_{1} = x_{1} are solutions of

k = σ_{1}^{2}X_{2}^{2} + (2σ_{12}μ_{1} − 2σ_{1}^{2}μ_{2} − 2σ_{12}x_{1})X_{2} + [σ_{2}^{2}x_{1}^{2} − 2σ_{2}^{2}μ_{1}x_{1} + 2σ_{12}μ_{2}x_{1}]

X_{2} coordinates for “tips” of the ellipsoid for constant k are

X_{2} = \frac{−(2σ_{12}μ_{1} − 2σ_{1}^{2}μ_{2} − 2σ_{12}x̂_{1})}{2σ_{1}^{2}} = μ_{2} + \frac{σ_{12}}{σ_{1}^{2}} (x̂_{1} − μ_{1})

where x̂_{1} is the solution to:

0 = (2σ_{12}μ_{1} − 2σ_{1}^{2}μ_{2} − 2σ_{12}x_{1})^{2} − 4σ_{1}^{2} [σ_{2}^{2}x_{1}^{2} − 2σ_{2}^{2}μ_{1}x_{1} + 2σ_{12}μ_{2}x_{1} − k]
0 = (4σ_{12}^{2} − 4σ_{1}^{2}σ_{2}^{2})x_{1}^{2} + (8σ_{1}^{2}σ_{12}μ_{2} − 8σ_{12}^{2}μ_{1} + 8σ_{1}^{2}σ_{2}^{2}μ_{1} − 8σ_{1}^{2}σ_{12}μ_{2})x_{1}
+ (4σ_{12}^{2}μ_{1}^{2} + 4σ_{1}^{4}μ_{2}^{2} − 8σ_{12}σ_{1}^{2}μ_{1}μ_{2} + 4σ_{1}^{2}k)

So for a given k,

x̂_{1} = \frac{−(8σ_{1}^{2}σ_{12}μ_{2} − 8σ_{12}^{2}μ_{1} + 8σ_{1}^{2}σ_{2}^{2}μ_{1} − 8σ_{1}^{2}σ_{12}μ_{2}) ± \sqrt{q}}{8σ_{12}^{2} − 8σ_{1}^{2}σ_{2}^{2}}

where q = (8σ_{1}^{2}σ_{12}μ_{2} − 8σ_{12}^{2}μ_{1} + 8σ_{1}^{2}σ_{2}^{2}μ_{1} − 8σ_{1}^{2}σ_{12}μ_{2})^{2} − 4(4σ_{12}^{2} − 4σ_{1}^{2}σ_{2}^{2})(4σ_{12}^{2}μ_{1}^{2} + 4σ_{1}^{4}μ_{2}^{2} − 8σ_{12}σ_{1}^{2}μ_{1}μ_{2} + 4σ_{1}^{2}k)

For any given k, the area inside the ellipsoid can be calculated by constructing a grid between the two values of x̂_{1} and then summing the density over a grid over the range of X_{2}.