Multivariate normal distribution explained

In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (univariate) normal distribution to higher dimensions. One definition is that a random vector is said to be k-variate normally distributed if every linear combination of its k components has a univariate normal distribution. Its importance derives mainly from the multivariate central limit theorem. The multivariate normal distribution is often used to describe, at least approximately, any set of (possibly) correlated real-valued random variables, each of which clusters around a mean value.

Definitions

Notation and parametrization

The multivariate normal distribution of a k-dimensional random vector

X=(X1,\ldots,X

T
k)
can be written in the following notation:

X\siml{N}(\boldsymbol\mu,\boldsymbol\Sigma),

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

X\siml{N}k(\boldsymbol\mu,\boldsymbol\Sigma),

with k-dimensional mean vector

\boldsymbol\mu=\operatorname{E}[X]=(\operatorname{E}[X1],\operatorname{E}[X2],\ldots,\operatorname{E}[Xk])T,

and

k x k

covariance matrix

\Sigmai,j=\operatorname{E}[(Xi-\mui)(Xj-\muj)]=\operatorname{Cov}[Xi,Xj]

such that

1\lei\lek

and

1\lej\lek

. The inverse of the covariance matrix is called the precision matrix, denoted by

\boldsymbol{Q}=\boldsymbol\Sigma-1

.

Standard normal random vector

X=(X1,\ldots,X

T
k)
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\siml{N}(0,1)

for all

i=1\ldotsk

.[1]

Centered normal random vector

A real random vector

X=(X1,\ldots,X

T
k)
is called a centered normal random vector if there exists a deterministic

k x \ell

matrix

\boldsymbol{A}

such that

\boldsymbol{A}Z

has the same distribution as

X

where

Z

is a standard normal random vector with

\ell

components.[1]

Normal random vector

A real random vector

X=(X1,\ldots,X

T
k)
is called a normal random vector if there exists a random

\ell

-vector

Z

, which is a standard normal random vector, a

k

-vector

\mu

, and a

k x \ell

matrix

\boldsymbol{A}

, such that

X=\boldsymbol{A}Z+\mu

.[2] [1]

Formally:

Here the covariance matrix is

\boldsymbol\Sigma=\boldsymbol{A}\boldsymbol{A}T

.

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

\boldsymbol{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,\ldots,

T
X
k)
has a multivariate normal distribution if it satisfies one of the following equivalent conditions.

Y=a1X1++akXk

of its components is normally distributed. That is, for any constant vector

a\inRk

, 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.

\mu

and a symmetric, positive semidefinite

k x k

matrix

\boldsymbol\Sigma

, such that the characteristic function of

X

is \varphi_\mathbf(\mathbf) = \exp\Big(i\mathbf^\mathrm\boldsymbol\mu - \tfrac \mathbf^\mathrm\boldsymbol\Sigma \mathbf \Big).

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

Density function

Non-degenerate case

\boldsymbol\Sigma

is positive definite. In this case the distribution has density[5]

where

{x}

is a real k-dimensional column vector and

|\boldsymbol\Sigma|\equiv\det\boldsymbol\Sigma

is the determinant of

\boldsymbol\Sigma

, also known as the generalized variance. The equation above reduces to that of the univariate normal distribution if

\boldsymbol\Sigma

is a

1 x 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

\sqrt{({x}-{\boldsymbol\mu})T{\boldsymbol\Sigma}-1({x}-{\boldsymbol\mu})}

is known as the Mahalanobis distance, which represents the distance of the test point

{x}

from the mean

{\boldsymbol\mu}

. The squared Mahalanobis distance

({x}-{\boldsymbol\mu})T{\boldsymbol\Sigma}-1({x}-{\boldsymbol\mu})

is decomposed into a sum of k terms, each term being a product of three meaningful components.[6] 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=\operatorname{rank}\left(\Sigma\right)=2

), the probability density function of a vector

[XY]\prime

is:f(x,y) = \frac \exp \left(-\frac\left[\left(\frac{x-\mu_X}{\sigma_X}\right)^2 - 2\rho\left(\frac{x - \mu_X}{\sigma_X}\right)\left(\frac{y - \mu_Y}{\sigma_Y}\right) + \left(\frac{y - \mu_Y}{\sigma_Y}\right)^2 \right] \right)where

\rho

is the correlation between

X

and

Y

andwhere

\sigmaX>0

and

\sigmaY>0

. In this case,

\boldsymbol\mu=\begin{pmatrix}\muX\\muY\end{pmatrix}, \boldsymbol\Sigma=\begin{pmatrix}

2
\sigma
X

&\rho\sigmaX\sigmaY\\ \rho\sigmaX\sigmaY&

2
\sigma
Y

\end{pmatrix}.

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]\prime

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

\boldsymbol\Sigma

(the major and minor semidiameters of the ellipse equal the square-root of the ordered eigenvalues).

As the absolute value of the correlation parameter

\rho

increases, these loci are squeezed toward the following line :

y(x)=sgn(\rho)

\sigmaY
\sigmaX

(x-\muX)+\muY.

This is because this expression, with

sgn(\rho)

(where sgn is the Sign function) replaced by

\rho

, is the best linear unbiased prediction of

Y

given a value of

X

.

Degenerate case

If the covariance matrix

\boldsymbol\Sigma

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

\operatorname{rank}(\boldsymbol\Sigma)

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.[7]

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

\operatorname{rank}(\boldsymbol\Sigma)

-dimensional affine subspace of

Rk

where the Gaussian distribution is supported, i.e.

\left\{\boldsymbol\mu+\boldsymbol{\Sigma1/2

}\mathbf : \mathbf \in \mathbb^k\right\}. With respect to this measure the distribution has the density of the following motif:

f(x)=

\exp\left(
-1
2
\left(x-\boldsymbol\mu\right)T\boldsymbol\Sigma+\left(x-\boldsymbol\mu\right)\right)
\sqrt{\det\nolimits

*(2\pi\boldsymbol\Sigma)}

where

\boldsymbol\Sigma+

is the generalized inverse and

\det\nolimits*

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

:[8]

F(x)=P(X\leqx),whereX\siml{N}(\boldsymbol\mu,\boldsymbol\Sigma).

Though there is no closed form for

F(x)

, there are a number of algorithms that estimate it numerically.[8] [9]

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.[10] In order to compute the values of this function, closed analytic formulae exist,[10] as follows.

Interval

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

({x}-{\boldsymbol\mu})T{\boldsymbol\Sigma}-1({x}-{\boldsymbol\mu})\leq

2
\chi
k(p).

Here

{x}

is a

k

-dimensional vector,

{\boldsymbol\mu}

is the known

k

-dimensional mean vector,

\boldsymbol\Sigma

is the known covariance matrix and
2
\chi
k(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

\overlineF(x)=1-P\left(X\leqx\right)

. When

X\siml{N}(\boldsymbol\mu,\boldsymbol\Sigma)

, thenthe ccdf can be written as a probability the maximum of dependent Gaussian variables:[11]

\overlineF(x)=P\left(cupi\{Xi\geqxi\}\right)=P\left(maxiYi\geq0\right),whereY\siml{N}\left(\boldsymbol\mu-x,\boldsymbol\Sigma\right).

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.[11] [12]

Properties

Probability in different domains

The probability content of the multivariate normal in a quadratic domain defined by

q(\boldsymbol{x})=\boldsymbol{x}'

Q2

\boldsymbol{x}+\boldsymbol{q1}'\boldsymbol{x}+q0>0

(where
Q2
is a matrix,

\boldsymbol{q1}

is a vector, and

q0

is a scalar), which is relevant for Bayesian classification/decision theory using Gaussian discriminant analysis, is given by the generalized chi-squared distribution.[13] The probability content within any general domain defined by

f(\boldsymbol{x})>0

(where

f(\boldsymbol{x})

is a general function) can be computed using the numerical method of ray-tracing (Matlab code).

Higher moments

See main article: Isserlis' theorem. The kth-order moments of x are given by

\mu1,\ldots,N(x) l\stackrel{def

} \mu _(\mathbf) \mathrel\stackrel \operatorname E\left[\prod_{j=1}^N X_j^{r_j} \right]

where

The kth-order central moments are as follows

where the sum is taken over all allocations of the set

\left\{1,\ldots,\right\}

into λ (unordered) pairs. That is, for a kth central moment, one sums the products of covariances (the expected value μ is taken to be 0 in the interests of parsimony):

\begin{align} &\operatornameE[X1X2X3X4X5X6]\\[8pt] ={}&\operatornameE[X1X2]\operatornameE[X3X4]\operatornameE[X5X6]+\operatornameE[X1X2]\operatornameE[X3X5]\operatornameE[X4X6]+\operatornameE[X1X2]\operatornameE[X3X6]\operatornameE[X4X5]\\[4pt] &{}+\operatornameE[X1X3]\operatornameE[X2X4]\operatornameE[X5X6]+\operatornameE[X1X3]\operatornameE[X2X5]\operatornameE[X4X6]+\operatornameE[X1X3]\operatornameE[X2X6]\operatornameE[X4X5]\\[4pt] &{}+\operatornameE[X1X4]\operatornameE[X2X3]\operatornameE[X5X6]+\operatornameE[X1X4]\operatornameE[X2X5]\operatornameE[X3X6]+\operatornameE[X1X4]\operatornameE[X2X6]\operatornameE[X3X5]\\[4pt] &{}+\operatornameE[X1X5]\operatornameE[X2X3]\operatornameE[X4X6]+\operatornameE[X1X5]\operatornameE[X2X4]\operatornameE[X3X6]+\operatornameE[X1X5]\operatornameE[X2X6]\operatornameE[X3X4]\\[4pt] &{}+\operatornameE[X1X6]\operatornameE[X2X3]\operatornameE[X4X5]+\operatornameE[X1X6]\operatornameE[X2X4]\operatornameE[X3X5]+\operatornameE[X1X6]\operatornameE[X2X5]\operatornameE[X3X4]. \end{align}

This yields

\tfrac{(-1)!}{2λ(λ-1)!}

terms in the sum (15 in the above case), each being the product of λ (in this case 3) covariances. For fourth order moments (four variables) there are three terms. For sixth-order moments there are terms, and for eighth-order moments there are terms.

The covariances are then determined by replacing the terms of the list

[1,\ldots,]

by the corresponding terms of the list consisting of r1 ones, then r2 twos, etc.. To illustrate this, examine the following 4th-order central moment case:

\begin{align} \operatornameE\left[

4
X
i

\right]&=

2
3\sigma
ii

\\[4pt] \operatornameE\left[

3
X
i

Xj\right]&=3\sigmaii\sigmaij\\[4pt] \operatornameE\left[

2
X
i
2
X
j

\right]&=\sigmaii\sigmajj+2\sigma

2
ij

\\[4pt] \operatornameE\left[

2
X
i

XjXk\right]&=\sigmaii\sigmajk+2\sigmaij\sigmaik\\[4pt] \operatornameE\left[XiXjXkXn\right]&=\sigmaij\sigmakn+\sigmaik\sigmajn+\sigmain\sigmajk. \end{align}

where

\sigmaij

is the covariance of Xi and Xj. With the above method one first finds the general case for a kth moment with k different X variables,

E\left[XiXjXkXn\right]

, and then one simplifies this accordingly. For example, for

\operatornameE[

2
X
i

XkXn]

, one lets and one uses the fact that

\sigmaii=

2
\sigma
i
.

Functions of a normal vector

A quadratic form of a normal vector

\boldsymbol{x}

,

q(\boldsymbol{x})=\boldsymbol{x}'

Q2

\boldsymbol{x}+\boldsymbol{q1}'\boldsymbol{x}+q0

(where
Q2
is a matrix,

\boldsymbol{q1}

is a vector, and

q0

is a scalar), is a generalized chi-squared variable. The direction of a normal vector follows a projected normal distribution.

If

f(\boldsymbol{x})

is a general scalar-valued function of a normal vector, its probability density function, cumulative distribution function, and inverse cumulative distribution function can be computed with the numerical method of ray-tracing (Matlab code).

Likelihood function

If the mean and covariance matrix are known, the log likelihood of an observed vector

\boldsymbol{x}

is simply the log of the probability density function:

lnL(\boldsymbol{x})=-

1
2

\left[ln(|\boldsymbol\Sigma|)+(\boldsymbol{x}-\boldsymbol\mu)'\boldsymbol\Sigma-1(\boldsymbol{x}-\boldsymbol\mu)+kln(2\pi)\right]

,

The circularly symmetric version of the noncentral complex case, where

\boldsymbol{z}

is a vector of complex numbers, would be

lnL(\boldsymbol{z})=-ln(|\boldsymbol\Sigma|)-(\boldsymbol{z}-\boldsymbol\mu)\dagger\boldsymbol\Sigma-1(\boldsymbol{z}-\boldsymbol\mu)-kln(\pi)

i.e. with the conjugate transpose (indicated by

\dagger

) replacing the normal transpose (indicated by

'

). This is slightly different than in the real case, because the circularly symmetric version of the complex normal distribution has a slightly different form for the normalization constant.

A similar notation is used for multiple linear regression.[14]

Since the log likelihood of a normal vector is a quadratic form of the normal vector, it is distributed as a generalized chi-squared variable.

Differential entropy

The differential entropy of the multivariate normal distribution is[15]

\begin{align} h\left(f\right)&=

infty
-\int
-infty
infty
\int
-infty
infty
\int
-infty

f(x)lnf(x)dx\\ &=

12
ln{}

\left|2\pie\boldsymbol\Sigma\right|=

k
2

+

k
2

ln{}2\pi+

1
2

ln{}\left|\boldsymbol\Sigma\right|\\ \end{align}

,

where the bars denote the matrix determinant, is the dimensionality of the vector space, and the result has units of nats.

Kullback–Leibler divergence

The Kullback–Leibler divergence from

l{N}1(\boldsymbol\mu1,\boldsymbol\Sigma1)

to

l{N}0(\boldsymbol\mu0,\boldsymbol\Sigma0)

, for non-singular matrices Σ1 and Σ0, is:[16]

DKL(l{N}0\parallell{N}1)={1\over2}\left\{\operatorname{tr}\left(

-1
\boldsymbol\Sigma
1

\boldsymbol\Sigma0\right)+\left(\boldsymbol\mu1-

\rmT
\boldsymbol\mu
0\right)
-1
\boldsymbol\Sigma
1

(\boldsymbol\mu1-\boldsymbol\mu0)-k+ln{|\boldsymbol\Sigma1|\over|\boldsymbol\Sigma0|}\right\},

where

||

denotes the matrix determinant,

tr()

is the trace,

ln()

is the natural logarithm and

k

is the dimension of the vector space.

The logarithm must be taken to base e since the two terms following the logarithm are themselves base-e logarithms of expressions that are either factors of the density function or otherwise arise naturally. The equation therefore gives a result measured in nats. Dividing the entire expression above by loge 2 yields the divergence in bits.

When

\boldsymbol\mu1=\boldsymbol\mu0

,

DKL(l{N}0\parallell{N}1)={1\over2}\left\{\operatorname{tr}\left(

-1
\boldsymbol\Sigma
1

\boldsymbol\Sigma0\right)-k+ln{|\boldsymbol\Sigma1|\over|\boldsymbol\Sigma0|}\right\}.

Mutual information

The mutual information of a distribution is a special case of the Kullback–Leibler divergence in which

P

is the full multivariate distribution and

Q

is the product of the 1-dimensional marginal distributions. In the notation of the Kullback–Leibler divergence section of this article,

\boldsymbol\Sigma1

is a diagonal matrix with the diagonal entries of

\boldsymbol\Sigma0

, and

\boldsymbol\mu1=\boldsymbol\mu0

. The resulting formula for mutual information is:

I(\boldsymbol{X})=-{1\over2}ln|\boldsymbol\rho0|,

where

\boldsymbol\rho0

is the correlation matrix constructed from

\boldsymbol\Sigma0

.[17]

In the bivariate case the expression for the mutual information is:

I(x;y)=-{1\over2}ln(1-\rho2).

Joint normality

Normally distributed and independent

If

X

and

Y

are normally distributed and independent, this implies they are "jointly normally distributed", i.e., the pair

(X,Y)

must have multivariate normal distribution. However, a pair of jointly normally distributed variables need not be independent (would only be so if uncorrelated,

\rho=0

).

Two normally distributed random variables need not be jointly bivariate normal

See also: normally distributed and uncorrelated does not imply independent. The fact that two random variables

X

and

Y

both have a normal distribution does not imply that the pair

(X,Y)

has a joint normal distribution. A simple example is one in which X has a normal distribution with expected value 0 and variance 1, and

Y=X

if

|X|>c

and

Y=-X

if

|X|<c

, where

c>0

. There are similar counterexamples for more than two random variables. In general, they sum to a mixture model.

Correlations and independence

In general, random variables may be uncorrelated but statistically dependent. But if a random vector has a multivariate normal distribution then any two or more of its components that are uncorrelated are independent. This implies that any two or more of its components that are pairwise independent are independent. But, as pointed out just above, it is not true that two random variables that are (separately, marginally) normally distributed and uncorrelated are independent.

Conditional distributions

If N-dimensional x is partitioned as follows

x = \begin{bmatrix} x1\\ x2 \end{bmatrix} withsizes\begin{bmatrix}q x 1\(N-q) x 1\end{bmatrix}

and accordingly μ and Σ are partitioned as follows

\boldsymbol\mu = \begin{bmatrix} \boldsymbol\mu1\\ \boldsymbol\mu2 \end{bmatrix} withsizes\begin{bmatrix}q x 1\(N-q) x 1\end{bmatrix}

\boldsymbol\Sigma = \begin{bmatrix} \boldsymbol\Sigma11&\boldsymbol\Sigma12\\ \boldsymbol\Sigma21&\boldsymbol\Sigma22\end{bmatrix} withsizes\begin{bmatrix}q x q&q x (N-q)\(N-q) x q&(N-q) x (N-q)\end{bmatrix}

then the distribution of x1 conditional on x2 = a is multivariate normal[18] where

\bar{\boldsymbol\mu} = \boldsymbol\mu1+\boldsymbol\Sigma12

-1
\boldsymbol\Sigma
22

\left(a-\boldsymbol\mu2 \right)

and covariance matrix

\overline{\boldsymbol\Sigma} = \boldsymbol\Sigma11-\boldsymbol\Sigma12

-1
\boldsymbol\Sigma
22

\boldsymbol\Sigma21.

[19]

Here

-1
\boldsymbol\Sigma
22
is the generalized inverse of

\boldsymbol\Sigma22

. The matrix

\overline{\boldsymbol\Sigma}

is the Schur complement of Σ22 in Σ. That is, the equation above is equivalent to inverting the overall covariance matrix, dropping the rows and columns corresponding to the variables being conditioned upon, and inverting back to get the conditional covariance matrix.

Note that knowing that alters the variance, though the new variance does not depend on the specific value of a; perhaps more surprisingly, the mean is shifted by

\boldsymbol\Sigma12

-1
\boldsymbol\Sigma
22

\left(a-\boldsymbol\mu2\right)

; compare this with the situation of not knowing the value of a, in which case x1 would have distribution

l{N}q\left(\boldsymbol\mu1,\boldsymbol\Sigma11\right)

.

An interesting fact derived in order to prove this result, is that the random vectors

x2

and

y1=x1-\boldsymbol\Sigma12

-1
\boldsymbol\Sigma
22

x2

are independent.

The matrix Σ12Σ22−1 is known as the matrix of regression coefficients.

Bivariate case

In the bivariate case where x is partitioned into

X1

and

X2

, the conditional distribution of

X1

given

X2

is[20]

X1\midX2=a

\siml{N}\left(\mu
1+\sigma1
\sigma2

\rho(a-\mu2),

2\right)
(1-\rho
1

where

\rho

is the correlation coefficient between

X1

and

X2

.

Bivariate conditional expectation

In the general case

\begin{pmatrix} X1\\ X2 \end{pmatrix}\siml{N}\left(\begin{pmatrix} \mu1\\ \mu2 \end{pmatrix},\begin{pmatrix}

2
\sigma
1

&\rho\sigma1\sigma2\\ \rho\sigma1\sigma2&

2
\sigma
2 \end{pmatrix}

\right)

The conditional expectation of X1 given X2 is:

\operatorname{E}(X1\midX2=x2)=\mu1+\rho

\sigma1
\sigma2

(x2-\mu2)

Proof: the result is obtained by taking the expectation of the conditional distribution

X1\midX2

above.
In the centered case with unit variances

\begin{pmatrix} X1\\ X2 \end{pmatrix}\siml{N}\left(\begin{pmatrix} 0\\ 0 \end{pmatrix},\begin{pmatrix} 1&\rho\\ \rho&1 \end{pmatrix}\right)

The conditional expectation of X1 given X2 is

\operatorname{E}(X1\midX2=x2)=\rhox2

and the conditional variance is

\operatorname{var}(X1\midX2=x2)=1-\rho2;

thus the conditional variance does not depend on x2.

The conditional expectation of X1 given that X2 is smaller/bigger than z is:[21]

\operatorname{E}(X1\midX2<z)=-\rho{\varphi(z)\over\Phi(z)},

\operatorname{E}(X1\midX2>z)=\rho{\varphi(z)\over(1-\Phi(z))},

where the final ratio here is called the inverse Mills ratio.

Proof: the last two results are obtained using the result

\operatorname{E}(X1\midX2=x2)=\rhox2

, so that

\operatorname{E}(X1\midX2<z)=\rhoE(X2\midX2<z)

and then using the properties of the expectation of a truncated normal distribution.

Marginal distributions

To obtain the marginal distribution over a subset of multivariate normal random variables, one only needs to drop the irrelevant variables (the variables that one wants to marginalize out) from the mean vector and the covariance matrix. The proof for this follows from the definitions of multivariate normal distributions and linear algebra.[22]

Example

Let be multivariate normal random variables with mean vector and covariance matrix Σ (standard parametrization for multivariate normal distributions). Then the joint distribution of is multivariate normal with mean vector and covariance matrix

\boldsymbol\Sigma'= \begin{bmatrix} \boldsymbol\Sigma11&\boldsymbol\Sigma13\\ \boldsymbol\Sigma31&\boldsymbol\Sigma33\end{bmatrix}

.

Affine transformation

If is an affine transformation of

X\siml{N}(\boldsymbol\mu,\boldsymbol\Sigma),

where c is an

M x 1

vector of constants and B is a constant

M x N

matrix, then Y has a multivariate normal distribution with expected value and variance BΣBT i.e.,

Y\siml{N}\left(c+B\boldsymbol\mu,B\boldsymbol\SigmaB\rm\right)

. In particular, any subset of the Xi has a marginal distribution that is also multivariate normal.To see this, consider the following example: to extract the subset (X1, X2, X4)T, use

B = \begin{bmatrix} 1&0&0&0&0&\ldots&0\\ 0&1&0&0&0&\ldots&0\\ 0&0&0&1&0&\ldots&0 \end{bmatrix}

which extracts the desired elements directly.

Another corollary is that the distribution of, where b is a constant vector with the same number of elements as X and the dot indicates the dot product, is univariate Gaussian with

Z\siml{N}\left(b ⋅ \boldsymbol\mu,b\rm\boldsymbol\Sigmab\right)

. This result follows by using

B=\begin{bmatrix} b1&b2&\ldots&bn \end{bmatrix}=b\rm.

Observe how the positive-definiteness of Σ implies that the variance of the dot product must be positive.

An affine transformation of X such as 2X is not the same as the sum of two independent realisations of X.

Geometric interpretation

See also: Confidence region.

The equidensity contours of a non-singular multivariate normal distribution are ellipsoids (i.e. affine transformations of hyperspheres) centered at the mean.[23] Hence the multivariate normal distribution is an example of the class of elliptical distributions. The directions of the principal axes of the ellipsoids are given by the eigenvectors of the covariance matrix

\boldsymbol\Sigma

. The squared relative lengths of the principal axes are given by the corresponding eigenvalues.

If is an eigendecomposition where the columns of U are unit eigenvectors and Λ is a diagonal matrix of the eigenvalues, then we have

X\siml{N}(\boldsymbol\mu,\boldsymbol\Sigma)\iffX\sim\boldsymbol\mu+U\boldsymbolΛ1/2l{N}(0,I)\iffX\sim\boldsymbol\mu+Ul{N}(0,\boldsymbolΛ).

Moreover, U can be chosen to be a rotation matrix, as inverting an axis does not have any effect on N(0, Λ), but inverting a column changes the sign of U's determinant. The distribution N(μ, Σ) is in effect N(0, I) scaled by Λ1/2, rotated by U and translated by μ.

Conversely, any choice of μ, full rank matrix U, and positive diagonal entries Λi yields a non-singular multivariate normal distribution. If any Λi is zero and U is square, the resulting covariance matrix UΛUT is singular. Geometrically this means that every contour ellipsoid is infinitely thin and has zero volume in n-dimensional space, as at least one of the principal axes has length of zero; this is the degenerate case.

"The radius around the true mean in a bivariate normal random variable, re-written in polar coordinates (radius and angle), follows a Hoyt distribution."[24]

In one dimension the probability of finding a sample of the normal distribution in the interval

\mu\pm\sigma

is approximately 68.27%, but in higher dimensions the probability of finding a sample in the region of the standard deviation ellipse is lower.[25]
Dimensionality Probability
1 0.6827
2 0.3935
3 0.1987
4 0.0902
5 0.0374
6 0.0144
7 0.0052
8 0.0018
9 0.0006
10 0.0002

Statistical inference

Parameter estimation

The derivation of the maximum-likelihood estimator of the covariance matrix of a multivariate normal distribution is straightforward.

In short, the probability density function (pdf) of a multivariate normal is

f(x)=

1
\sqrt{(2\pi)k|\boldsymbol\Sigma|

}\exp\left(-{1\over2}(x-\boldsymbol\mu)\rm\boldsymbol\Sigma-1({x}-\boldsymbol\mu)\right)

and the ML estimator of the covariance matrix from a sample of n observations is [26]

\widehat{\boldsymbol\Sigma}={1\over

n
n}\sum
i=1

({x}i-\overline{x})({x}

T
i-\overline{x})

which is simply the sample covariance matrix. This is a biased estimator whose expectation is

E\left[\widehat{\boldsymbol\Sigma}\right]=

n-1
n

\boldsymbol\Sigma.

An unbiased sample covariance is

\widehat{\boldsymbol\Sigma}=

1{n-1}\sum
i=1

n(xi-\overline{x

})(\mathbf_i-\overline)^ = \frac1 \left[X'\left(I - \frac{1}{n} \cdot J\right) X\right] (matrix form;

I

is the

K x K

identity matrix, J is a

K x K

matrix of ones; the term in parentheses is thus the

K x K

centering matrix)

The Fisher information matrix for estimating the parameters of a multivariate normal distribution has a closed form expression. This can be used, for example, to compute the Cramér–Rao bound for parameter estimation in this setting. See Fisher information for more details.

Bayesian inference

l{W}-1

. Suppose then that n observations have been made

X=\{x1,...,xn\}\siml{N}(\boldsymbol\mu,\boldsymbol\Sigma)

and that a conjugate prior has been assigned, where

p(\boldsymbol\mu,\boldsymbol\Sigma)=p(\boldsymbol\mu\mid\boldsymbol\Sigma)p(\boldsymbol\Sigma),

where

p(\boldsymbol\mu\mid\boldsymbol\Sigma)

-1
\siml{N}(\boldsymbol\mu
0,m

\boldsymbol\Sigma),

and

p(\boldsymbol\Sigma)\siml{W}-1(\boldsymbol\Psi,n0).

Then[26]

\begin{array}{rcl} p(\boldsymbol\mu\mid\boldsymbol\Sigma,X)&\sim&

l{N}\left(n\bar{x
+
m\boldsymbol\mu
0}{n+m},1
n+m

\boldsymbol\Sigma\right),\\ p(\boldsymbol\Sigma\midX)&\sim&l{W}-1\left(\boldsymbol\Psi+nS+

nm
n+m

(\bar{x

}-\boldsymbol\mu_0)(\bar-\boldsymbol\mu_0)', n+n_0\right),\endwhere

\begin{align} \bar{x

} & = \frac\sum_^ \mathbf_i,\\\mathbf & = \frac\sum_^ (\mathbf_i - \bar)(\mathbf_i - \bar)' .\end

Multivariate normality tests

Multivariate normality tests check a given set of data for similarity to the multivariate normal distribution. The null hypothesis is that the data set is similar to the normal distribution, therefore a sufficiently small p-value indicates non-normal data. Multivariate normality tests include the Cox–Small test[27] and Smith and Jain's adaptation[28] of the Friedman–Rafsky test created by Larry Rafsky and Jerome Friedman.[29]

Mardia's test is based on multivariate extensions of skewness and kurtosis measures. For a sample of k-dimensional vectors we compute

\begin{align} &\widehat{\boldsymbol\Sigma}={1\overn}

n
\sum
j=1

\left(xj-\bar{x

}\right)\left(\mathbf_j - \bar\right)^\mathrm \\

& A = \sum_^n \sum_^n \left[(\mathbf{x}_i - \bar{\mathbf{x}})^\mathrm{T}\;\widehat{\boldsymbol\Sigma}^{-1} (\mathbf{x}_j - \bar{\mathbf{x}}) \right]^3 \\

& B = \sqrt\left\ \endUnder the null hypothesis of multivariate normality, the statistic A will have approximately a chi-squared distribution with degrees of freedom, and B will be approximately standard normal N(0,1).

Mardia's kurtosis statistic is skewed and converges very slowly to the limiting normal distribution. For medium size samples

(50\len<400)

, the parameters of the asymptotic distribution of the kurtosis statistic are modified[30] For small sample tests (

n<50

) empirical critical values are used. Tables of critical values for both statistics are given by Rencher[31] for k = 2, 3, 4.

Mardia's tests are affine invariant but not consistent. For example, the multivariate skewness test is not consistent againstsymmetric non-normal alternatives.[32]

The BHEP test computes the norm of the difference between the empirical characteristic function and the theoretical characteristic function of the normal distribution. Calculation of the norm is performed in the L2(μ) space of square-integrable functions with respect to the Gaussian weighting function

\mu\beta(t)=(2\pi\beta2)-k/2

-|t|2/(2\beta2)
e
. The test statistic is

\begin{align} T\beta&=

\int
Rk

\left|{1\overn}

n
\sum
j=1
itT\widehat{\boldsymbol\Sigma
e

-1/2(xj-\bar{x)}}-

-|t|2/2
e

\right|2\boldsymbol\mu\beta(t)dt\\ &={1\overn2}

n
\sum
i,j=1
-{\beta2\over2
e

(xi-x

T\widehat{\boldsymbol\Sigma}
j)

-1(xi-xj)}-

2
n(1+\beta2)k/2
n
\sum
i=1
-\beta2
2(1+\beta2)
(xi-\bar{x
e

)T\widehat{\boldsymbol\Sigma}-1(xi-\bar{x

})} + \frac \endThe limiting distribution of this test statistic is a weighted sum of chi-squared random variables.

A detailed survey of these and other test procedures is available.

Classification into multivariate normal classes

Gaussian Discriminant Analysis

Suppose that observations (which are vectors) are presumed to come from one of several multivariate normal distributions, with known means and covariances. Then any given observation can be assigned to the distribution from which it has the highest probability of arising. This classification procedure is called Gaussian discriminant analysis.The classification performance, i.e. probabilities of the different classification outcomes, and the overall classification error, can be computed by the numerical method of ray-tracing (Matlab code).

Computational methods

Drawing values from the distribution

A widely used method for drawing (sampling) a random vector x from the N-dimensional multivariate normal distribution with mean vector μ and covariance matrix Σ works as follows:

  1. Find any real matrix A such that . When Σ is positive-definite, the Cholesky decomposition is typically used, and the extended form of this decomposition can always be used (as the covariance matrix may be only positive semi-definite) in both cases a suitable matrix A is obtained. An alternative is to use the matrix A = 1/2 obtained from a spectral decomposition Σ = UΛU−1 of Σ. The former approach is more computationally straightforward but the matrices A change for different orderings of the elements of the random vector, while the latter approach gives matrices that are related by simple re-orderings. In theory both approaches give equally good ways of determining a suitable matrix A, but there are differences in computation time.
  2. Let be a vector whose components are N independent standard normal variates (which can be generated, for example, by using the Box–Muller transform).
  3. Let x be . This has the desired distribution due to the affine transformation property.

See also

References

Literature

Notes and References

  1. Book: Lapidoth, Amos . 2009 . A Foundation in Digital Communication . Cambridge University Press . 978-0-521-19395-5.
  2. Book: Gut, Allan . 2009 . An Intermediate Course in Probability . Springer . 978-1-441-90161-3.
  3. Kac . M. . On a characterization of the normal distribution . American Journal of Mathematics . 1939 . 61 . 3 . 726–728 . 2371328 . 10.2307/2371328 .
  4. Sinz . Fabian . Gerwinn . Sebastian . Bethge . Matthias . Characterization of the p-generalized normal distribution . Journal of Multivariate Analysis . 2009 . 100 . 5 . 817–820 . 10.1016/j.jmva.2008.07.006 . free .
  5. Simon J.D. Prince(June 2012). Computer Vision: Models, Learning, and Inference . Cambridge University Press. 3.7:"Multivariate normal distribution".
  6. Kim . M. G. . 2000 . Multivariate outliers and decompositions of Mahalanobis distance . Communications in Statistics – Theory and Methods . 29 . 7 . 1511–1526 . 10.1080/03610920008832559.
  7. Web site: linear algebra - Mapping between affine coordinate function . 2022-06-24 . Mathematics Stack Exchange . en.
  8. Botev. Z. I.. The normal law under linear restrictions: simulation and estimation via minimax tilting. Journal of the Royal Statistical Society, Series B. 79. 125–148. 2016. 10.1111/rssb.12162. 1603.04166. 2016arXiv160304166B. 88515228.
  9. Book: Genz, Alan. Computation of Multivariate Normal and t Probabilities. 2009. Springer. 978-3-642-01689-9.
  10. https://upload.wikimedia.org/wikipedia/commons/a/a2/Cumulative_function_n_dimensional_Gaussians_12.2013.pdf Bensimhoun Michael, N-Dimensional Cumulative Function, And Other Useful Facts About Gaussians and Normal Densities (2006)
  11. Tail distribution of the maximum of correlated Gaussian random variables . Botev . Z. I. . Mandjes . M. . Ridder . A. . IEEE. 978-1-4673-9743-8 . 2015 Winter Simulation Conference (WSC) . 633–642 . Huntington Beach, Calif., USA . 6–9 December 2015 . 10.1109/WSC.2015.7408202 . 10419/130486 . free .
  12. Efficient simulation for tail probabilities of Gaussian random fields . Adler . R. J. . Blanchet . J. . Liu . J. . 2008 . IEEE. 978-1-4244-2707-9 . 2008 Winter Simulation Conference (WSC) . 328–336 . Miami, Fla., USA . 7–10 Dec 2008 . 10.1109/WSC.2008.4736085 .
  13. 2012.14331 . Das . Abhranil . Wilson S Geisler . Methods to integrate multinormals and compute classification measures . 2020 . stat.ML .
  14. Tong, T. (2010) Multiple Linear Regression : MLE and Its Distributional Results, Lecture Notes
  15. Gokhale . DV . Ahmed . NA . Res . BC . Piscataway . NJ . May 1989 . Entropy Expressions and Their Estimators for Multivariate Distributions . IEEE Transactions on Information Theory . 35 . 3 . 688–692 . 10.1109/18.30996.
  16. J. . Duchi . Derivations for Linear Algebra and Optimization . 13 .
  17. Book: MacKay, David J. C. . Information Theory, Inference and Learning Algorithms . 2003-10-06 . Cambridge University Press . 978-0-521-64298-9 . Illustrated . Cambridge . en.
  18. Holt . W. . Nguyen . D. . Essential Aspects of Bayesian Data Imputation . 2023 . 4494314 .
  19. Book: Eaton, Morris L.. Multivariate Statistics: a Vector Space Approach. 1983. John Wiley and Sons. 978-0-471-02776-8. 116–117.
  20. Book: Jensen, J. Statistics for Petroleum Engineers and Geoscientists. 2000. Elsevier. Amsterdam. 207. 0-444-50552-0.
  21. Book: Maddala, G. S.. Limited Dependent and Qualitative Variables in Econometrics. 1983. Cambridge University Press. 0-521-33825-5.
  22. An algebraic computation of the marginal distribution is shown here http://fourier.eng.hmc.edu/e161/lectures/gaussianprocess/node7.html . A much shorter proof is outlined here https://math.stackexchange.com/a/3832137
  23. Web site: Nikolaus Hansen. The CMA Evolution Strategy: A Tutorial. 2012-01-07. https://web.archive.org/web/20100331114258/http://www.lri.fr/~hansen/cmatutorial.pdf. 2010-03-31. dead. 2016arXiv160400772H. 2016. 1604.00772.
  24. Web site: The Hoyt Distribution (Documentation for R package 'shotGroups' version 0.6.2) . Daniel Wollschlaeger .
  25. Wang. Bin. Shi. Wenzhong. Miao. Zelang. 2015-03-13. Rocchini. Duccio. Confidence Analysis of Standard Deviational Ellipse and Its Extension into Higher Dimensional Euclidean Space. PLOS ONE. en. 10. 3. e0118537. 10.1371/journal.pone.0118537. 1932-6203. 4358977. 25769048. 2015PLoSO..1018537W. free.
  26. Holt . W. . Nguyen . D. . Introduction to Bayesian Data Imputation . 2023 . 4494314 .
  27. Cox . D. R. . Small . N. J. H. . 10.1093/biomet/65.2.263 . Testing multivariate normality . Biometrika . 65 . 2 . 263 . 1978 .
  28. Smith . S. P. . Jain . A. K. . 10.1109/34.6789 . A test to determine the multivariate normality of a data set . IEEE Transactions on Pattern Analysis and Machine Intelligence . 10 . 5 . 757 . 1988 .
  29. Friedman . J. H. . Rafsky . L. C. . 10.1214/aos/1176344722 . Multivariate Generalizations of the Wald–Wolfowitz and Smirnov Two-Sample Tests . The Annals of Statistics . 7 . 4 . 697 . 1979 . free .
  30. Rencher (1995), pages 112–113.
  31. Rencher (1995), pages 493–495.
  32. Baringhaus . L. . Henze . N. . 10.1016/0047-259X(91)90031-V . Limit distributions for measures of multivariate skewness and kurtosis based on projections . Journal of Multivariate Analysis . 38 . 51–69 . 1991 . free .