1
$\begingroup$

For a 2D Gaussian distribution with
$ \mu = \begin{pmatrix} \mu_x \\ \mu_y \end{pmatrix}, \quad \Sigma = \begin{pmatrix} \sigma_x^2 & \rho \sigma_x \sigma_y \\ \rho \sigma_x \sigma_y & \sigma_y^2 \end{pmatrix}, $ its probability density function is $ f(x,y) = \frac{1}{2 \pi \sigma_x \sigma_y \sqrt{1-\rho^2}} \exp\left( -\frac{1}{2(1-\rho^2)}\left[ \frac{(x-\mu_x)^2}{\sigma_x^2} + \frac{(y-\mu_y)^2}{\sigma_y^2} - \frac{2\rho(x-\mu_x)(y-\mu_y)}{\sigma_x \sigma_y} \right] \right), $

I was wondering if there is also a similarly clean formula for 3D Gaussian distribution density? What is it?

Thanks and regards!


EDIT:

What I ask is after taking the inverse of the covariance matrix, if the density has a clean form just as in 2D case?

1 Answers 1

4

There is a standard, general formula for the density of the joint normal (or multivariate normal) distrubution of dimension $n$, provided that the ($n \times n$) covariance matrix $\Sigma$ is non-singular (see, e.g., this or this). In particular, you can apply for $n=3$. When the covariance matrix is singular, the distribution is expressed in terms of the characteristic function.

  • 1
    @Tim: When something like $A^{-1}b$ appears in a formula, in computational terms you should think of it as "solve $Ax = b$ for $x$" instead. As J.M. said, using a Cholesky decomposition to compute this is much better: having decomposed $A$ as $LL^T$, you just solve $Ly = b$ and then $L^Tx = y$. Solving equations with triangular matrices like $L$ and $L^T$ is [very easy](http://en.wikipedia.org/wiki/Lower_triangular_matrix#Forward_and_back_substitution), and numerically well-behaved. I would also suggest taking a look at a good textbook on numerical linear algebra.2010-11-22