Multivariate normal distribution

From Wikipedia, the free encyclopedia
(Redirected from Multivariate normal)
Jump to navigation Jump to search
Multivariate normal
Probability density function
Many sample points from a multivariate normal distribution with ๐=[00] and ๐œฎ=[13/53/52], shown along with the 3-sigma ellipse, the two marginal distributions, and the two 1-d histograms.
Notation ๐’ฉ(๐,๐œฎ)
Parameters ฮผ โˆˆ Rk โ€” location
ฮฃ โˆˆ Rk ร— k โ€” covariance (positive semi-definite matrix)
Support x โˆˆ ฮผ + span(ฮฃ) โІ Rk
PDF (2ฯ€)โˆ’k/2det(๐œฎ)โˆ’1/2exp(โˆ’12(๐ฑโˆ’๐)T๐œฎโˆ’1(๐ฑโˆ’๐)),
exists only when ฮฃ is positive-definite
Mean ฮผ
Mode ฮผ
Variance ฮฃ
Entropy k2log(2ฯ€e)+12logdet(๐œฎ)
MGF exp(๐T๐ญ+12๐ญT๐œฎ๐ญ)
CF exp(i๐T๐ญโˆ’12๐ญT๐œฎ๐ญ)
Kullbackโ€“Leibler divergence See ยง Kullbackโ€“Leibler divergence

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

[edit | edit source]

Notation and parametrization

[edit | edit source]

The multivariate normal distribution of a k-dimensional random vector ๐—=(X1,โ€ฆ,Xk)T can be written in the following notation:

๐— โˆผ ๐’ฉ(๐,๐œฎ),

or to make it explicitly known that ๐— is k-dimensional,

๐— โˆผ ๐’ฉk(๐,๐œฎ),

with k-dimensional mean vector

๐=E[๐—]=(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 ๐‘ธ=๐œฎโˆ’1.

Standard normal random vector

[edit | edit source]

A real random vector ๐—=(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โˆผ ๐’ฉ(0,1) for all i=1โ€ฆk.[1]: p. 454 

Centered normal random vector

[edit | edit source]

A real random vector ๐—=(X1,โ€ฆ,Xk)T is called a centered normal random vector if there exists a kร—โ„“ matrix ๐‘จ such that ๐‘จ๐™ has the same distribution as ๐— where ๐™ is a standard normal random vector with โ„“ components.[1]: p. 454 

Normal random vector

[edit | edit source]

A real random vector ๐—=(X1,โ€ฆ,Xk)T is called a normal random vector if there exists a random โ„“-vector ๐™, which is a standard normal random vector, a k-vector ๐, and a kร—โ„“ matrix ๐‘จ, such that ๐—=๐‘จ๐™+๐.[2]: p. 454 [1]: p. 455 

Formally:

๐— โˆผ ๐’ฉk(๐,๐œฎ)there exist ๐โˆˆโ„k,๐‘จโˆˆโ„kร—โ„“ such that ๐—=๐‘จ๐™+๐ and โˆ€n=1,โ€ฆ,โ„“:Znโˆผ ๐’ฉ(0,1),i.i.d.

Here the covariance matrix is ๐œฎ=๐‘จ๐‘จ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 ๐‘จ to a collection of independent Gaussian variables ๐™.

Equivalent definitions

[edit | edit source]

The following definitions are equivalent to the definition given above. A random vector ๐—=(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 ๐šโˆˆโ„k, the random variable Y=๐šT๐— 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 ๐— is ฯ†๐—(๐ฎ)=exp(i๐ฎT๐โˆ’12๐ฎT๐œฎ๐ฎ).

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

Density function

[edit | edit source]
Bivariate normal joint density

Non-degenerate case

[edit | edit source]

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

f๐—(x1,โ€ฆ,xk)=exp(โˆ’12(๐ฑโˆ’๐)T๐œฎโˆ’1(๐ฑโˆ’๐))(2ฯ€)k|๐œฎ|

where ๐ฑ is a real k-dimensional column vector and |๐œฎ|โ‰กdet๐œฎ is the determinant of ๐œฎ, also known as the generalized variance. 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 (๐ฑโˆ’๐)T๐œฎโˆ’1(๐ฑโˆ’๐) is known as the Mahalanobis distance, which represents the distance of the test point ๐ฑ from the mean ๐. The squared Mahalanobis distance (๐ฑโˆ’๐)T๐œฎโˆ’1(๐ฑโˆ’๐) 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

[edit | edit source]

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

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

Bivariate normal distribution centered at (1,3) with a standard deviation of 3 in roughly the (0.878,0.478) direction and of 1 in the orthogonal direction.

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

Degenerate case

[edit | edit source]

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 ๐ฑ 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.[9]

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 โ„k where the Gaussian distribution is supported, i.e. {๐+๐œฎ1/2๐ฏ:๐ฏโˆˆโ„k}. With respect to this measure the distribution has the density of the following motif:

f(๐ฑ)=exp(โˆ’12(๐ฑโˆ’๐)T๐œฎ+(๐ฑโˆ’๐))det\nolimits *(2ฯ€๐œฎ)

where ๐œฎ+ is the generalized inverse and det\nolimits * is the pseudo-determinant.[10]

Cumulative distribution function

[edit | edit source]

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(๐ฑ) of a random vector ๐— as the probability that all components of ๐— are less than or equal to the corresponding values in the vector ๐ฑ:[11]

F(๐ฑ)=โ„™(๐—โ‰ค๐ฑ),where ๐—โˆผ๐’ฉ(๐,๐œฎ).

Though there is no closed form for F(๐ฑ), there are a number of algorithms that estimate it numerically.[11][12]

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

Interval

[edit | edit source]

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

(๐ฑโˆ’๐)T๐œฎโˆ’1(๐ฑโˆ’๐)โ‰คฯ‡k2(p).

Here ๐ฑ 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.[14] 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)

[edit | edit source]

The complementary cumulative distribution function (ccdf) or the tail distribution is defined as Fโ€พ(๐ฑ)=1โˆ’โ„™(๐—โ‰ค๐ฑ). When ๐—โˆผ๐’ฉ(๐,๐œฎ), then the ccdf can be written as a probability the maximum of dependent Gaussian variables:[15]

Fโ€พ(๐ฑ)=โ„™(โ‹ƒi{Xiโ‰ฅxi})=โ„™(maxiYiโ‰ฅ0),where ๐˜โˆผ๐’ฉ(๐โˆ’๐ฑ,๐œฎ).

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

Properties

[edit | edit source]

Moments

[edit | edit source]

The kth-order moments of x are given by

ฮผ1,โ€ฆ,N(๐ฑ)=defฮผr1,โ€ฆ,rN(๐ฑ)=defE[โˆj=1NXjrj]

where r1 + r2 + โ‹ฏ + rN = k.

The kth-order central moments are as follows

  1. If k is odd, ฮผ1, ..., N(x โˆ’ ฮผ) = 0.
  2. If k is even with k = 2ฮป, then[ambiguous] ฮผ1,,2ฮป(๐ฑโˆ’๐)=โˆ‘(ฯƒijฯƒkโ„“โ‹ฏฯƒXZ)

where the sum is taken over all allocations of the set {1,โ€ฆ,2ฮป} into ฮป (unordered) pairs. That is, for a kth (= 2ฮป = 6) central moment, one sums the products of ฮป = 3 covariances (the expected value ฮผ is taken to be 0 in the interests of parsimony):

E[X1X2X3X4X5X6]=E[X1X2]E[X3X4]E[X5X6]+E[X1X2]E[X3X5]E[X4X6]+E[X1X2]E[X3X6]E[X4X5]+E[X1X3]E[X2X4]E[X5X6]+E[X1X3]E[X2X5]E[X4X6]+E[X1X3]E[X2X6]E[X4X5]+E[X1X4]E[X2X3]E[X5X6]+E[X1X4]E[X2X5]E[X3X6]+E[X1X4]E[X2X6]E[X3X5]+E[X1X5]E[X2X3]E[X4X6]+E[X1X5]E[X2X4]E[X3X6]+E[X1X5]E[X2X6]E[X3X4]+E[X1X6]E[X2X3]E[X4X5]+E[X1X6]E[X2X4]E[X3X5]+E[X1X6]E[X2X5]E[X3X4].

This yields (2ฮปโˆ’1)!2ฮปโˆ’1(ฮปโˆ’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 3 ร— 5 = 15 terms, and for eighth-order moments there are 3 ร— 5 ร— 7 = 105 terms.

The covariances are then determined by replacing the terms of the list [1,โ€ฆ,2ฮป] 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:

E[Xi4]=3ฯƒii2E[Xi3Xj]=3ฯƒiiฯƒijE[Xi2Xj2]=ฯƒiiฯƒjj+2ฯƒij2E[Xi2XjXk]=ฯƒiiฯƒjk+2ฯƒijฯƒikE[XiXjXkXn]=ฯƒijฯƒkn+ฯƒikฯƒjn+ฯƒinฯƒjk.

where ฯƒij 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[XiXjXkXn], and then one simplifies this accordingly. For example, for E[Xi2XkXn], one lets Xi = Xj and one uses the fact that ฯƒii=ฯƒi2.

Functions of a normal vector

[edit | edit source]

A quadratic form of a normal vector ๐’™, q(๐’™)=๐’™๐๐Ÿ๐’™+๐’’1๐’™+q0 (where ๐๐Ÿ is a matrix, ๐’’1 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.[17]

If f(๐’™) 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

[edit | edit source]

If the mean and covariance matrix are known, the log likelihood of an observed vector ๐’™ is simply the log of the probability density function:

lnL(๐’™)=โˆ’12[ln(|๐œฎ|)+(๐’™โˆ’๐)๐œฎโˆ’1(๐’™โˆ’๐)+kln(2ฯ€)],

The circularly symmetric version of the noncentral complex case, where ๐’› is a vector of complex numbers, would be

lnL(๐’›)=โˆ’ln(|๐œฎ|)โˆ’(๐’›โˆ’๐)โ€ ๐œฎโˆ’1(๐’›โˆ’๐)โˆ’kln(ฯ€)

i.e. with the conjugate transpose (indicated by โ€ ) 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.[18]

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

[edit | edit source]

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

h(f)=โˆ’โˆซโˆ’โˆžโˆžโˆซโˆ’โˆžโˆžโ‹ฏโˆซโˆ’โˆžโˆžf(๐ฑ)lnf(๐ฑ)d๐ฑ=12ln|2ฯ€e๐œฎ|=k2(1+ln2ฯ€)+12ln|๐œฎ|,

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

Kullbackโ€“Leibler divergence

[edit | edit source]

The Kullbackโ€“Leibler divergence from ๐’ฉ1(๐1,๐œฎ1) to ๐’ฉ0(๐0,๐œฎ0), for non-singular matrices ฮฃ1 and ฮฃ0, is:[20]

DKL(๐’ฉ0โˆฅ๐’ฉ1)=12{tr(๐œฎ1โˆ’1๐œฎ0)+(๐1โˆ’๐0)T๐œฎ1โˆ’1(๐1โˆ’๐0)โˆ’k+ln|๐œฎ1||๐œฎ0|},

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 ๐1=๐0,

DKL(๐’ฉ0โˆฅ๐’ฉ1)=12{tr(๐œฎ1โˆ’1๐œฎ0)โˆ’k+ln|๐œฎ1||๐œฎ0|}.

Mutual information

[edit | edit source]

The mutual information of two multivariate normal distribution is a special case of the Kullbackโ€“Leibler divergence in which P is the full k dimensional multivariate distribution and Q is the product of the k1 and k2 dimensional marginal distributions X and Y, such that k1+k2=k. The mutual information between X and Y is given by:[21]

I(๐‘ฟ,๐’€)=12ln(det(ฮฃX)det(ฮฃY)det(ฮฃ)),

where

ฮฃ=[ฮฃXฮฃXYฮฃXYฮฃY].

If Q is product of k one-dimensional normal distributions, then in the notation of the Kullbackโ€“Leibler divergence section of this article, ๐œฎ1 is a diagonal matrix with the diagonal entries of ๐œฎ0, and ๐1=๐0. The resulting formula for mutual information is:

I(๐‘ฟ)=โˆ’12ln|๐†0|,

where ๐†0 is the correlation matrix constructed from ๐œฎ0.[22]

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

I(x;y)=โˆ’12ln(1โˆ’ฯ2).

Joint normality

[edit | edit source]

Normally distributed and independent

[edit | edit source]

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, ฯ=0 ).

Two normally distributed random variables need not be jointly bivariate normal

[edit | edit source]

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

Correlations and independence

[edit | edit source]

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

[edit | edit source]

If N-dimensional x is partitioned as follows

๐ฑ=[๐ฑ1๐ฑ2] with sizes [qร—1(Nโˆ’q)ร—1]

and accordingly ฮผ and ฮฃ are partitioned as follows

๐=[๐1๐2] with sizes [qร—1(Nโˆ’q)ร—1]
๐œฎ=[๐œฎ11๐œฎ12๐œฎ21๐œฎ22] with sizes [qร—qqร—(Nโˆ’q)(Nโˆ’q)ร—q(Nโˆ’q)ร—(Nโˆ’q)]

then the distribution of x1 conditional on x2 = a is multivariate normal[23] (x1 | x2 = a) ~ N(ฮผ, ฮฃ) where

๐ยฏ=๐1+๐œฎ12๐œฎ22โˆ’1(๐šโˆ’๐2)

and covariance matrix

๐œฎโ€พ=๐œฎ11โˆ’๐œฎ12๐œฎ22โˆ’1๐œฎ21.[24]

Here ๐œฎ22โˆ’1 is the generalized inverse of ๐œฎ22. The matrix ๐œฎโ€พ 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 x2 = a alters the variance, though the new variance does not depend on the specific value of a; perhaps more surprisingly, the mean is shifted by ๐œฎ12๐œฎ22โˆ’1(๐šโˆ’๐2); compare this with the situation of not knowing the value of a, in which case x1 would have distribution ๐’ฉq(๐1,๐œฎ11).

An interesting fact derived in order to prove this result, is that the random vectors ๐ฑ2 and ๐ฒ1=๐ฑ1โˆ’๐œฎ12๐œฎ22โˆ’1๐ฑ2 are independent.

The matrix ฮฃ12ฮฃ22โˆ’1 is known as the matrix of regression coefficients.

Bivariate case

[edit | edit source]

In the bivariate case where x is partitioned into X1 and X2, the conditional distribution of X1 given X2 is[25]

X1โˆฃX2=a โˆผ ๐’ฉ(ฮผ1+ฯƒ1ฯƒ2ฯ(aโˆ’ฮผ2),(1โˆ’ฯ2)ฯƒ12)

where ฯ=ฯƒ12ฯƒ1ฯƒ2 is the correlation coefficient between X1 and X2.

Bivariate conditional expectation

[edit | edit source]
In the general case
[edit | edit source]
(X1X2)โˆผ๐’ฉ((ฮผ1ฮผ2),(ฯƒ12ฯฯƒ1ฯƒ2ฯฯƒ1ฯƒ2ฯƒ22))

The conditional expectation of X1 given X2 is:

E(X1โˆฃX2=x2)=ฮผ1+ฯฯƒ1ฯƒ2(x2โˆ’ฮผ2)

Proof: the result is obtained by taking the expectation of the conditional distribution X1โˆฃX2 above.

In the centered case with unit variances
[edit | edit source]
(X1X2)โˆผ๐’ฉ((00),(1ฯฯ1))

The conditional expectation of X1 given X2 is

E(X1โˆฃX2=x2)=ฯx2

and the conditional variance is

var(X1โˆฃX2=x2)=1โˆ’ฯ2;

thus the conditional variance does not depend on x2.

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

E(X1โˆฃX2<z)=โˆ’ฯฯ†(z)ฮฆ(z),
E(X1โˆฃX2>z)=ฯฯ†(z)(1โˆ’ฮฆ(z)),

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

Proof: the last two results are obtained using the result E(X1โˆฃX2=x2)=ฯx2, so that

E(X1โˆฃX2<z)=ฯE(X2โˆฃX2<z) and then using the properties of the expectation of a truncated normal distribution.

Marginal distributions

[edit | edit source]

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

Example

Let X = [X1, X2, X3] be multivariate normal random variables with mean vector ฮผ = [ฮผ1, ฮผ2, ฮผ3] and covariance matrix ฮฃ (standard parametrization for multivariate normal distributions). Then the joint distribution of Xโ€ฒ = [X1, X3] is multivariate normal with mean vector ฮผโ€ฒ = [ฮผ1, ฮผ3] and covariance matrix ๐œฎ=[๐œฎ11๐œฎ13๐œฎ31๐œฎ33].

Affine transformation

[edit | edit source]

If Y = c + BX is an affine transformation of ๐— โˆผ๐’ฉ(๐,๐œฎ), where c is an Mร—1 vector of constants and B is a constant Mร—N matrix, then Y has a multivariate normal distribution with expected value c + Bฮผ and variance BฮฃBT i.e., ๐˜โˆผ๐’ฉ(๐œ+๐๐,๐๐œฎ๐T). 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

๐=[10000โ€ฆ001000โ€ฆ000010โ€ฆ0]

which extracts the desired elements directly.

Another corollary is that the distribution of Z = b ยท X, 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โˆผ๐’ฉ(๐›โ‹…๐,๐›T๐œฎ๐›). This result follows by using

๐=[b1b2โ€ฆbn]=๐›T.

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

[edit | edit source]

The equidensity contours of a non-singular multivariate normal distribution are ellipsoids (i.e. affine transformations of hyperspheres) centered at the mean.[28] 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 ๐œฎ. The squared relative lengths of the principal axes are given by the corresponding eigenvalues.

If ฮฃ = Uฮ›UT = Uฮ›1/2(Uฮ›1/2)T is an eigendecomposition where the columns of U are unit eigenvectors and ฮ› is a diagonal matrix of the eigenvalues, then we have

๐— โˆผ๐’ฉ(๐,๐œฎ)๐— โˆผ๐+๐”๐œฆ1/2๐’ฉ(0,๐ˆ)๐— โˆผ๐+๐”๐’ฉ(0,๐œฆ).

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

In one dimension the probability of finding a sample of the normal distribution in the interval ฮผยฑฯƒ is approximately 68.27%, but in higher dimensions the probability of finding a sample in the region of the standard deviation ellipse is lower.[30]

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

[edit | edit source]

Parameter estimation

[edit | edit source]

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(๐ฑ)=1(2ฯ€)k|๐œฎ|exp(โˆ’12(๐ฑโˆ’๐)T๐œฎโˆ’1(๐ฑโˆ’๐))

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

๐œฎ^=1nโˆ‘i=1n(๐ฑiโˆ’๐ฑโ€พ)(๐ฑiโˆ’๐ฑโ€พ)T

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

E[๐œฎ^]=nโˆ’1n๐œฎ.

An unbiased sample covariance is

๐œฎ^=1nโˆ’1โˆ‘i=1n(๐ฑiโˆ’๐ฑโ€พ)(๐ฑiโˆ’๐ฑโ€พ)T=1nโˆ’1[X(Iโˆ’1nโ‹…J)X] (matrix form; I is the Kร—K identity matrix, J is a Kร—K matrix of ones; the term in parentheses is thus the Kร—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

[edit | edit source]

In Bayesian statistics, the conjugate prior of the mean vector is another multivariate normal distribution, and the conjugate prior of the covariance matrix is an inverse-Wishart distribution ๐’ฒโˆ’1 . Suppose then that n observations have been made

๐—={๐ฑ1,,๐ฑn}โˆผ๐’ฉ(๐,๐œฎ)

and that a conjugate prior has been assigned, where

p(๐,๐œฎ)=p(๐โˆฃ๐œฎ) p(๐œฎ),

where

p(๐โˆฃ๐œฎ)โˆผ๐’ฉ(๐0,mโˆ’1๐œฎ),

and

p(๐œฎ)โˆผ๐’ฒโˆ’1(๐œณ,n0).

Then[31]

p(๐โˆฃ๐œฎ,๐—)โˆผ๐’ฉ(n๐ฑยฏ+m๐0n+m,1n+m๐œฎ),p(๐œฎโˆฃ๐—)โˆผ๐’ฒโˆ’1(๐œณ+n๐’+nmn+m(๐ฑยฏโˆ’๐0)(๐ฑยฏโˆ’๐0),n+n0),

where

๐ฑยฏ=1nโˆ‘i=1n๐ฑi,๐’=1nโˆ‘i=1n(๐ฑiโˆ’๐ฑยฏ)(๐ฑiโˆ’๐ฑยฏ).

Multivariate normality tests

[edit | edit source]

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[32] and Smith and Jain's adaptation[33] of the Friedmanโ€“Rafsky test created by Larry Rafsky and Jerome Friedman.[34]

Mardia's test

[edit | edit source]

Mardia's test[35] is based on multivariate extensions of skewness and kurtosis measures. For a sample {x1, ..., xn} of k-dimensional vectors we compute

๐œฎ^=1nโˆ‘j=1n(๐ฑjโˆ’๐ฑยฏ)(๐ฑjโˆ’๐ฑยฏ)TA=16nโˆ‘i=1nโˆ‘j=1n[(๐ฑiโˆ’๐ฑยฏ)T๐œฎ^โˆ’1(๐ฑjโˆ’๐ฑยฏ)]3B=n8k(k+2){1nโˆ‘i=1n[(๐ฑiโˆ’๐ฑยฏ)T๐œฎ^โˆ’1(๐ฑiโˆ’๐ฑยฏ)]2โˆ’k(k+2)}

Under the null hypothesis of multivariate normality, the statistic A will have approximately a chi-squared distribution with 1/6โ‹…k(k + 1)(k + 2) 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โ‰คn<400), the parameters of the asymptotic distribution of the kurtosis statistic are modified[36] For small sample tests (n<50) empirical critical values are used. Tables of critical values for both statistics are given by Rencher[37] for k = 2, 3, 4.

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

BHEP test

[edit | edit source]

The BHEP test[39] 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 ฮผฮฒ(๐ญ)=(2ฯ€ฮฒ2)โˆ’k/2eโˆ’|๐ญ|2/(2ฮฒ2). The test statistic is

Tฮฒ=โˆซโ„k|1nโˆ‘j=1nei๐ญT๐œฎ^โˆ’1/2(๐ฑjโˆ’๐ฑ)ยฏโˆ’eโˆ’|๐ญ|2/2|2๐ฮฒ(๐ญ)d๐ญ=1n2โˆ‘i,j=1neโˆ’ฮฒ22(๐ฑiโˆ’๐ฑj)T๐œฎ^โˆ’1(๐ฑiโˆ’๐ฑj)โˆ’2n(1+ฮฒ2)k/2โˆ‘i=1neโˆ’ฮฒ22(1+ฮฒ2)(๐ฑiโˆ’๐ฑยฏ)T๐œฎ^โˆ’1(๐ฑiโˆ’๐ฑยฏ)+1(1+2ฮฒ2)k/2

The limiting distribution of this test statistic is a weighted sum of chi-squared random variables.[39]

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

Computational methods

[edit | edit source]

Drawing values from the distribution

[edit | edit source]

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:[41]

  1. Find any real matrix A such that AAT = ฮฃ. When ฮฃ is positive-definite, the Cholesky decomposition is typically used because it is widely available, computationally efficient, and well known. If a rank-revealing (pivoted) Cholesky decomposition such as LAPACK's dpstrf() is available, it can be used in the general positive-semidefinite case as well. A slower general alternative is to use the matrix A = Uฮ›1/2 obtained from a spectral decomposition ฮฃ = Uฮ›Uโˆ’1 of ฮฃ.
  2. Let z = (z1, ..., zN)T 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 ฮผ + Az. This has the desired distribution due to the affine transformation property.

See also

[edit | edit source]

References

[edit | edit source]
  1. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  5. ^ Simon J.D. Prince(June 2012). Computer Vision: Models, Learning, and Inference Archived 2020-10-28 at the Wayback Machine. Cambridge University Press. 3.7:"Multivariate normal distribution".
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  11. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  13. ^ a b Bensimhoun Michael, N-Dimensional Cumulative Function, And Other Useful Facts About Gaussians and Normal Densities (2006)
  14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  15. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  16. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  17. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  18. ^ Tong, T. (2010) Multiple Linear Regression : MLE and Its Distributional Results Archived 2013-06-16 at WebCite, Lecture Notes
  19. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  21. ^ Proof: Mutual information of the multivariate normal distribution
  22. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  23. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  24. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  25. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  26. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  27. ^ An algebraic computation of the marginal distribution is shown here http://fourier.eng.hmc.edu/e161/lectures/gaussianprocess/node7.html Archived 2010-01-17 at the Wayback Machine. A much shorter proof is outlined here https://math.stackexchange.com/a/3832137
  28. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  29. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).[permanent dead link]
  30. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  31. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  32. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  33. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  34. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  35. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  36. ^ Rencher (1995), pages 112โ€“113.
  37. ^ Rencher (1995), pages 493โ€“495.
  38. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  39. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  40. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  41. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

Literature

[edit | edit source]
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).