I'm doing some visualizations and I'm trying to make outline of an ellipse inside which there is a 50% probability of finding the result given measurement following bivariate normal.

More formally:

Find $q$ s.t. region $U = \{x : f(x) > q\}$ has $\mathbb{P}(U)=0.5$ where $f$ is pdf of bivariate gaussian with some correlation.

Is there a well known formula for $q$? Does this (and similar cutoff values for other distributions) have some established name?


2 Answers 2


I will provide a solution for arbitrary dimension $n$ and probability $p$ such as $\mathbb{P}(\{x:f(x)>q\})=p$, which gives a simple result for $n=2$. Notation: $x^2 =||x||_2^2,\ |A| = \det A$

  1. Cholesky decomposition of covariance matrix $$\Sigma = A^TA$$ Note that $|\Sigma| = |A|^2$.

  2. Substitution $$x = F(y) = \mu + Ay$$

  3. Solving for $f(x) \geq q$ $$f(x) = \alpha e^{-\frac12(x-\mu)^T\Sigma^{-1}(x-\mu)} = \alpha e^{-\frac12y^2}, \ \alpha = (2\pi)^{-n/2}|\Sigma|^{-1/2}$$ $$y^2 \leq -2\ln(q/\alpha) =: R^2_q$$

  4. Calculating $\int_{\{f(x)\geq q\}}f(x)dx$ \begin{align} p&=\int_{\{f(x)\geq q\}}f(x)dx =\int_{\{y^2\leq R^2_q\}}\alpha e^{-\frac12y^2} |A|dy =\alpha|A|\int_0^{R_q}\left(\int_{S^{n-1}} e^{-\frac12(rs)^2}ds\right)r^{n-1}dr \\ &=\alpha|A|\mu(S^{n-1})\int_0^{R_q}r^{n-1}e^{-\frac12r^2}dr =(2\pi)^{-n/2}\mu(S^{n-1})\int_0^{R_q}r^{n-1}e^{-\frac12r^2}dr \end{align} $\mu(S^{n-1})$ being surface measure of unit sphere in $\mathbb{R}^n$.

  5. Having solved for $R_q$ desired cutoff ellipsis is $F(R_qS^{n-1})$ and $q = \alpha e^{-\frac12R_q^2}$

For $n=2$ it is as follows: $$p = \frac{2\pi}{2\pi}\int_0^{R_q}re^{-\frac12r^2}dr = [-e^{-\frac12r^2}]_{r=0}^{R_q} = 1 - e^{-R_q^2/2}$$ $$R_q = \sqrt{-2\ln(1 - p)}$$



This is not the full answer.

Are you looking for visualization like on the plot below? One can see on the plot is a 50%-confidence area for a bivariate Normal Copula.

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .