9
$\begingroup$

I would like to compute tail probabilities of the standardized multivariate normal distribution for different dimensions. For example, in the case of bivariate normal I need to compute the gray area on the figure pasted below (In this particular case, the area is defined by $\mathbf{x} > 2$.)

figure-1

I found somewhere (but unfortunately, I lost the reference) that the probability that the data point $\mathbf{x}$ is outside the spherical contour with radius $\alpha$ should be calculated as:

$$ \begin{split} \Pr \left(\frac{f(\mathbf{x})}{f(\mathbf{0})} \geq \alpha\right) &= P(\mathbf{x}^{T} \mathbf{x} \leq -2 \ln (\alpha)) \\ &= \int_{0}^{-2 \ln(\alpha)} f_{\chi_{d}^{2}(\mathbf{x}^{T} \mathbf{x})} \\ &= F_{\chi_{d}^{2}} (-2 \ln (\alpha)) \end{split} $$ where $F$ is cumulative distribution function.

I find myself lost in this equation. I kindly ask for computational example how to compute desired probability (in whatever programming language).

SOLUTION

I found the solution myself:

pchisq(q = alpha^2, df = d)

alpha stands for radius and d stands for dimension.

$\endgroup$
5
  • 2
    $\begingroup$ The mvtnorm package in R can do this. Check this document for many examples. I think you want the pmvnorm function. $\endgroup$ Jun 28, 2014 at 15:27
  • 1
    $\begingroup$ I will check the mvtnorm function, but I would also like to understand how to compute it manually. $\endgroup$
    – Andrej
    Jun 28, 2014 at 15:35
  • 1
    $\begingroup$ Andrej, are you interested only in the case where the components are iid standard normal (as your figure depicts) or are you interested in the more general case with an arbitrary covariance matrix $\Sigma$? $\endgroup$
    – cardinal
    Jun 28, 2014 at 19:25
  • $\begingroup$ Only in iid standardized normal case. $\endgroup$
    – Andrej
    Jun 28, 2014 at 19:32
  • 1
    $\begingroup$ The probability you quote concerns the event that the standard multinormal density at a standard multinormally distributed point $\mathbf{x}$, relative to the density at the origin $\mathbf{0}$, is smaller than $\alpha$. Thus, $\alpha$ is necessarily an non-positive number. If you define $\alpha$ as the radius in your graph, however, then your R code is indeed correct. $\endgroup$ Aug 9, 2017 at 13:30

1 Answer 1

1
$\begingroup$

Answered in comments, copied here :

The mvtnorm package in R can do this. Check https://cran.r-project.org/web/packages/mvtnorm/vignettes/MVT_Rnews.pdf for many examples.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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