Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently using different procedures to estimate the probability that a $D$-dimensional Gaussian random variable with mean $\mu$ and covariance $\Sigma$ lies within a sphere of radius $R$ that centered about the origin. That is, I am estimating $P(|| X ||_2 < R)$ where $X \sim N(\mu, \Sigma)$ and $X \in \mathbb{R}^D$.

I am wondering whether there is a way to obtain the exact value of this probability analytically (i.e. without using numerical integration or Monte Carlo)? I currently have two basic approaches to follow:

Approach 1

Find a way to analytically evaluate the integral:

$\int_{x \in S} (2\pi)^{-\frac{D}{2}}|\Sigma|^{-\frac{1}{2}} \exp(-\frac{1}{2} (x-\mu)^T \Sigma^{-1} (x-\mu) dx $

over the spherical region:

$S = \{||x|| < R \} = \{x^Tx < R^2\}$

Approach 2

Exploit the fact that given $X \sim N(\mu,\Sigma)$, the random variable

$(x-\mu)^T \Sigma^{-1} (x-\mu) \sim \chi^2(D) $

This implies that

$P( (x-\mu)^T \Sigma^{-1} (x-\mu) < R^2 ) = P(\chi^2(D) < R^2)$

which is very simple to calculate... though what I will actually need to evaluate is:

$P( x^T x < R^2) $

share|cite|improve this question
It seems from the question that the sphere is center at the origin rather than the mean of the Gaussian distribution. Is that what you intended? – Michael Chernick May 16 '12 at 20:23
If you want to know whether or not the numerical integration for the intgral above gives you what you want, the answer is yes for a sphere centered at the origin. For the Monte carlo part I assume you know that you generate an x from N(μ,Σ) calculate its distribution from the origin and if that distance is less than R score 1 for the random variable W and otherwise 0. Repeat K times and use the sum of Wi/K has the estimate of the integral. – Michael Chernick May 16 '12 at 20:30
Yes, the sphere is at the origin. I included $\mu$ to keep the formulation general, but we can assume that $\mu = 0$. What I'm interested in is finding an exact answer without using a numerical integration procedure. – Elements May 16 '12 at 20:42
up vote 1 down vote accepted

There is not a closed form solution. So there is no better way to calculate it than numerical integration. The Monte Carlo method as I proposed it will approximate the integral and the approximation will be close to exact if you generate lots of samples like 100,000 or 1 million.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.