Lably
Skip to content

Multivariate normal distribution

Generalization of the one-dimensional normal distribution to higher dimensions

  • 16 min read
  • 4 chapters
Illustration of a multivariate gaussian distribution and its marginals. Matlab code provided below.
Bscan · CC0

Related on Lably

Through Statistics, Normal distribution and Dimension

Definitions

Notation and parametrization

The multivariate normal distribution of a k-dimensional random vector X=(X1,…,Xk)T can be written in the following notation:

X∼N(μ,Σ),

or to make it explicitly known that X is k-dimensional,

X∼Nk(μ,Σ),

with k-dimensional mean vector

μ=E⁡[X]=(E⁡[X1],E⁡[X2],…,E⁡[Xk])T,

and k×k covariance matrix

Σi,j=E⁡[(Xi−μi)(Xj−μj)]=Cov⁡[Xi,Xj]

such that 1≤i≤k and 1≤j≤k. The inverse of the covariance matrix is called the precision matrix, denoted by Q=Σ−1.

Standard normal random vector

A real random vector X=(X1,…,Xk)T is called a standard normal random vector if all of its components Xi are independent and each is a zero-mean unit-variance normally distributed random variable, i.e. if Xi∼N(0,1) for all i=1…k.

Centered normal random vector

A real random vector X=(X1,…,Xk)T is called a centered normal random vector if there exists a k×ℓ matrix A such that AZ has the same distribution as X where Z is a standard normal random vector with ℓ components.

Normal random vector

A real random vector X=(X1,…,Xk)T is called a normal random vector if there exists a random ℓ-vector Z, which is a standard normal random vector, a k-vector μ, and a k×ℓ matrix A, such that X=AZ+μ.

Formally:

X∼Nk(μ,Σ)⟺there exist μ∈Rk,A∈Rk×ℓ such that X=AZ+μ and ∀n=1,…,ℓ:Zn∼N(0,1),i.i.d.

Here the covariance matrix is Σ=AAT.

In the degenerate case where the covariance matrix is singular, the corresponding distribution has no density; see the section below for details. This case arises frequently in statistics; for example, in the distribution of the vector of residuals in the ordinary least squares regression. The Xi are in general not independent; they can be seen as the result of applying the matrix A to a collection of independent Gaussian variables Z.

Equivalent definitions

The following definitions are equivalent to the definition given above. A random vector X=(X1,…,Xk)T has a multivariate normal distribution if it satisfies one of the following equivalent conditions.

  • Every linear combination Y=a1X1+⋯+akXk of its components is normally distributed. That is, for any constant vector a∈Rk, the random variable Y=aTX has a univariate normal distribution, where a univariate normal distribution with zero variance is a point mass on its mean.
  • There is a k-vector μ and a symmetric, positive semidefinite k×k matrix Σ, such that the characteristic function of X is φX(u)=exp⁡(iuTμ−12uTΣu).

The spherical normal distribution can be characterised as the unique distribution where components are independent in any orthogonal coordinate system.

Density function

Non-degenerate case

The multivariate normal distribution is said to be "non-degenerate" when the symmetric covariance matrix Σ is positive definite. In this case the distribution has density

fX(x1,…,xk)=exp⁡(−12(x−μ)TΣ−1(x−μ))(2π)k|Σ|

where x is a real k-dimensional column vector and |Σ|≡detΣ is the determinant of Σ, also known as the generalized variance. The subexpression (2π)k|Σ| can be re-written as |2πΣ|, which is especially useful in the degenerate case; see below. The equation above reduces to that of the univariate normal distribution if Σ is a 1×1 matrix (i.e., a single real number).

The circularly symmetric version of the complex normal distribution has a slightly different form.

Each iso-density locus — the locus of points in k-dimensional space each of which gives the same particular value of the density — is an ellipse or its higher-dimensional generalization; hence the multivariate normal is a special case of the elliptical distributions.

The quantity (x−μ)TΣ−1(x−μ) is known as the Mahalanobis distance, which represents the distance of the test point x from the mean μ. The squared Mahalanobis distance (x−μ)TΣ−1(x−μ) is decomposed into a sum of k terms, each term being a product of three meaningful components. Note that in the case when k=1, the distribution reduces to a univariate normal distribution and the Mahalanobis distance reduces to the absolute value of the standard score. See also Interval below.

Bivariate case

In the 2-dimensional nonsingular case (k=rank⁡(Σ)=2), the probability density function of a vector [XY]′ is: f(x,y)=12πσXσY1−ρ2exp⁡(−12[1−ρ2][(x−μXσX)2−2ρ(x−μXσX)(y−μYσY)+(y−μYσY)2]) where ρ is the correlation between X and Y and where σX>0 and σY>0. In this case,

μ=(μXμY),Σ=(σX2ρσXσYρσXσYσY2).

In the bivariate case, the first equivalent condition for multivariate reconstruction of normality can be made less restrictive as it is sufficient to verify that a countably infinite set of distinct linear combinations of X and Y are normal in order to conclude that the vector of [XY]′ is bivariate normal.

The bivariate iso-density loci plotted in the x,y-plane are ellipses, whose principal axes are defined by the eigenvectors of the covariance matrix Σ (the major and minor semidiameters of the ellipse equal the square-root of the ordered eigenvalues).

As the absolute value of the correlation parameter ρ increases, these loci are squeezed toward the following line :

y(x)=sgn⁡(ρ)σYσX(x−μX)+μY.

This is because this expression, with sgn⁡(ρ) (where sgn is the sign function) replaced by ρ, is the best linear unbiased prediction of Y given a value of X.

Degenerate case

If the covariance matrix Σ is not full rank, then the multivariate normal distribution is degenerate and does not have a density. More precisely, it does not have a density with respect to k-dimensional Lebesgue measure (which is the usual measure assumed in calculus-level probability courses). Only random vectors whose distributions are absolutely continuous with respect to a measure are said to have densities (with respect to that measure). To talk about densities but avoid dealing with measure-theoretic complications it can be simpler to restrict attention to a subset of rank⁡(Σ) of the coordinates of x such that the covariance matrix for this subset is positive definite; then the other coordinates may be thought of as an affine function of these selected coordinates.

To talk about densities meaningfully in singular cases, then, we must select a different base measure. Using the disintegration theorem we can define a restriction of Lebesgue measure to the rank⁡(Σ)-dimensional affine subspace of Rk where the Gaussian distribution is supported, i.e. {μ+Σ1/2v:v∈Rk}. With respect to this measure the distribution has the density of the following motif:

f(x)=exp⁡(−12(x−μ)TΣ+(x−μ))det∗(2πΣ)

where Σ+ is the generalized inverse and det∗ is the pseudo-determinant.

Cumulative distribution function

The notion of cumulative distribution function (cdf) in dimension 1 can be extended in two ways to the multidimensional case, based on rectangular and ellipsoidal regions.

The first way is to define the cdf F(x) of a random vector X as the probability that all components of X are less than or equal to the corresponding values in the vector x:

F(x)=P(X≤x),where X∼N(μ,Σ).

Though there is no closed form for F(x), there are a number of algorithms that estimate it numerically.

Another way is to define the cdf F(r) as the probability that a sample lies inside the ellipsoid determined by its Mahalanobis distance r from the Gaussian, a direct generalization of the standard deviation. In order to compute the values of this function, closed analytic formula exist, as follows.

Interval

The interval for the multivariate normal distribution yields a region consisting of those vectors x satisfying

(x−μ)TΣ−1(x−μ)≤χk2(p).

Here x is a k-dimensional vector, μ is the known k-dimensional mean vector, Σ is the known covariance matrix and χk2(p) is the quantile function for probability p of the chi-squared distribution with k degrees of freedom. When k=2, the expression defines the interior of an ellipse and the chi-squared distribution simplifies to an exponential distribution with mean equal to two (rate equal to half).

Complementary cumulative distribution function (tail distribution)

The complementary cumulative distribution function (ccdf) or the tail distribution is defined as F¯(x)=1−P(X≤x). When X∼N(μ,Σ), then the ccdf can be written as a probability the maximum of dependent Gaussian variables:

F¯(x)=P(⋃i{Xi≥xi})=P(maxiYi≥0),where Y∼N(μ−x,Σ).

While no simple closed formula exists for computing the ccdf, the maximum of dependent Gaussian variables can be estimated accurately via the Monte Carlo method.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Statistics and probability