fbpx
Wikipedia

Multivariate normal distribution

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.

Multivariate normal
Probability density function
Many sample points from a multivariate normal distribution with and , shown along with the 3-sigma ellipse, the two marginal distributions, and the two 1-d histograms.
Notation
Parameters μRklocation
ΣRk × kcovariance (positive semi-definite matrix)
Support xμ + span(Σ) ⊆ Rk
PDF
exists only when Σ is positive-definite
Mean μ
Mode μ
Variance Σ
Entropy
MGF
CF
Kullback-Leibler divergence see below

Definitions

Notation and parameterization

The multivariate normal distribution of a k-dimensional random vector   can be written in the following notation:

 

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

 

with k-dimensional mean vector

 

and   covariance matrix

 

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

Standard normal random vector

A real random vector   is called a standard normal random vector if all of its components   are independent and each is a zero-mean unit-variance normally distributed random variable, i.e. if   for all  .[1]: p. 454 

Centered normal random vector

A real random vector   is called a centered normal random vector if there exists a deterministic   matrix   such that   has the same distribution as   where   is a standard normal random vector with   components.[1]: p. 454 

Normal random vector

A real random vector   is called a normal random vector if there exists a random  -vector  , which is a standard normal random vector, a  -vector  , and a   matrix  , such that  .[2]: p. 454 [1]: p. 455 

Formally:

 

Here the covariance matrix is  .

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

The following definitions are equivalent to the definition given above. A random vector   has a multivariate normal distribution if it satisfies one of the following equivalent conditions.

  • Every linear combination   of its components is normally distributed. That is, for any constant vector  , the random variable   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   matrix  , such that the characteristic function of   is
     

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

Density function

 
Bivariate normal joint density

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

 

where   is a real k-dimensional column vector and   is the determinant of  , also known as the generalized variance. The equation above reduces to that of the univariate normal distribution if   is a   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   is known as the Mahalanobis distance, which represents the distance of the test point   from the mean  . Note that in the case when  , 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 ( ), the probability density function of a vector   is:

 
where   is the correlation between   and   and where   and  . In this case,
 

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 countably many distinct linear combinations of   and   are normal in order to conclude that the vector of   is bivariate normal.[6]

The bivariate iso-density loci plotted in the  -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   with a standard deviation of 3 in roughly the   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 :

 

This is because this expression, with   (where sgn is the Sign function) replaced by  , is the best linear unbiased prediction of   given a value of  .[7]

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

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  -dimensional affine subspace of   where the Gaussian distribution is supported, i.e.  . With respect to this measure the distribution has the density of the following motif:

 

where   is the generalized inverse,   is the rank of   and   is the pseudo-determinant.[9]

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   of a random vector   as the probability that all components of   are less than or equal to the corresponding values in the vector  :[10]

 

Though there is no closed form for  , there are a number of algorithms that estimate it numerically.[10][11]

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

Interval

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

 

Here   is a  -dimensional vector,   is the known  -dimensional mean vector,   is the known covariance matrix and   is the quantile function for probability   of the chi-squared distribution with   degrees of freedom.[13] When   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  . When  , then the ccdf can be written as a probability the maximum of dependent Gaussian variables:[14]

 

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

Properties

Probability in different domains

 
Top: the probability of a bivariate normal in the domain   (blue regions). Middle: the probability of a trivariate normal in a toroidal domain. Bottom: converging Monte-Carlo integral of the probability of a 4-variate normal in the 4d regular polyhedral domain defined by  . These are all computed by the numerical method of ray-tracing. [16]

The probability content of the multivariate normal in a quadratic domain defined by   (where   is a matrix,   is a vector, and   is a scalar), which is relevant for Bayesian classification/decision theory using Gaussian discriminant analysis, is given by the generalized chi-squared distribution.[16] The probability content within any general domain defined by   (where   is a general function) can be computed using the numerical method of ray-tracing [16] (Matlab code).

Higher moments

The kth-order moments of x are given by

 

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]
     

where the sum is taken over all allocations of the set   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):

 

This yields   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   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:

 

where   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,  , and then one simplifies this accordingly. For example, for  , one lets Xi = Xj and one uses the fact that  .

Functions of a normal vector

 
a: Probability density of a function   of a single normal variable   with   and  . b: Probability density of a function   of a normal vector  , with mean  , and covariance  . c: Heat map of the joint probability density of two functions of a normal vector  , with mean  , and covariance  . d: Probability density of a function   of 4 iid standard normal variables. These are computed by the numerical method of ray-tracing. [16]

A quadratic form of a normal vector  ,   (where   is a matrix,   is a vector, and   is a scalar), is a generalized chi-squared variable. [16]

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

Likelihood function

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

 ,

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

 

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

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

Differential entropy

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

 

where the bars denote the matrix determinant and k is the dimensionality of the vector space.

Kullback–Leibler divergence

The Kullback–Leibler divergence from   to  , for non-singular matrices Σ1 and Σ0, is:[19]

 

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

 

Mutual information

The mutual information of a distribution is a special case of the Kullback–Leibler divergence in which   is the full multivariate distribution and   is the product of the 1-dimensional marginal distributions. In the notation of the Kullback–Leibler divergence section of this article,   is a diagonal matrix with the diagonal entries of  , and  . The resulting formula for mutual information is:

 

where   is the correlation matrix constructed from  .[citation needed]

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

 

Joint normality

Normally distributed and independent

If   and   are normally distributed and independent, this implies they are "jointly normally distributed", i.e., the pair   must have multivariate normal distribution. However, a pair of jointly normally distributed variables need not be independent (would only be so if uncorrelated,   ).

Two normally distributed random variables need not be jointly bivariate normal

The fact that two random variables   and   both have a normal distribution does not imply that the pair   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   if   and   if  , where  . There are similar counterexamples for more than two random variables. In general, they sum to a mixture model.[citation needed]

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

 

and accordingly μ and Σ are partitioned as follows

 
 

then the distribution of x1 conditional on x2 = a is multivariate normal (x1 | x2 = a) ~ N(μ, Σ) where

 

and covariance matrix

 [20]

Here   is the generalized inverse of  . 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  ; compare this with the situation of not knowing the value of a, in which case x1 would have distribution  .

An interesting fact derived in order to prove this result, is that the random vectors   and   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   and  , the conditional distribution of   given   is[21]

 

where   is the correlation coefficient between   and  .

Bivariate conditional expectation

In the general case
 

The conditional expectation of X1 given X2 is:

 

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

In the centered case with unit variances
 

The conditional expectation of X1 given X2 is

 

and the conditional variance is

 

thus the conditional variance does not depend on x2.

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

 
 

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

Proof: the last two results are obtained using the result  , so that

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

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  .

Affine transformation

If Y = c + BX is an affine transformation of   where c is an   vector of constants and B is a constant   matrix, then Y has a multivariate normal distribution with expected value c + and variance BΣBT i.e.,  . 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

 

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  . This result follows by using

 

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

The equidensity contours of a non-singular multivariate normal distribution are ellipsoids (i.e. affine transformations of hyperspheres) centered at the mean.[24] 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 = 1/2(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

 

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

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

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

 

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

 

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

 

An unbiased sample covariance is

  (matrix form;   is the   identity matrix, J is a   matrix of ones; the term in parentheses is thus the   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

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   . Suppose then that n observations have been made

 

and that a conjugate prior has been assigned, where

 

where

 

and

 

Then,[citation needed]

 

where

multivariate, normal, distribution, redirects, here, airport, with, that, iata, code, mount, vernon, airport, build, automation, software, apache, maven, probability, theory, statistics, multivariate, normal, distribution, multivariate, gaussian, distribution,. MVN redirects here For the airport with that IATA code see Mount Vernon Airport For the mvn build automation software see Apache Maven 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 Multivariate normalProbability density functionMany sample points from a multivariate normal distribution with m 0 0 displaystyle boldsymbol mu left begin smallmatrix 0 0 end smallmatrix right and S 1 3 5 3 5 2 displaystyle boldsymbol Sigma left begin smallmatrix 1 amp 3 5 3 5 amp 2 end smallmatrix right shown along with the 3 sigma ellipse the two marginal distributions and the two 1 d histograms NotationN m S displaystyle mathcal N boldsymbol mu boldsymbol Sigma Parametersm Rk locationS Rk k covariance positive semi definite matrix Supportx m span S RkPDF 2 p k 2 det S 1 2 exp 1 2 x m T S 1 x m displaystyle 2 pi k 2 det boldsymbol Sigma 1 2 exp left frac 1 2 mathbf x boldsymbol mu mathsf T boldsymbol Sigma 1 mathbf x boldsymbol mu right exists only when S is positive definiteMeanmModemVarianceSEntropy1 2 ln det 2 p e S displaystyle frac 1 2 ln det left 2 pi mathrm e boldsymbol Sigma right MGFexp m T t 1 2 t T S t displaystyle exp Big boldsymbol mu mathsf T mathbf t tfrac 1 2 mathbf t mathsf T boldsymbol Sigma mathbf t Big CFexp i m T t 1 2 t T S t displaystyle exp Big i boldsymbol mu mathsf T mathbf t tfrac 1 2 mathbf t mathsf T boldsymbol Sigma mathbf t Big Kullback Leibler divergencesee below Contents 1 Definitions 1 1 Notation and parameterization 1 2 Standard normal random vector 1 3 Centered normal random vector 1 4 Normal random vector 1 5 Equivalent definitions 1 6 Density function 1 6 1 Non degenerate case 1 6 2 Bivariate case 1 6 3 Degenerate case 1 7 Cumulative distribution function 1 7 1 Interval 1 8 Complementary cumulative distribution function tail distribution 2 Properties 2 1 Probability in different domains 2 2 Higher moments 2 3 Functions of a normal vector 2 3 1 Likelihood function 2 4 Differential entropy 2 5 Kullback Leibler divergence 2 6 Mutual information 2 7 Joint normality 2 7 1 Normally distributed and independent 2 7 2 Two normally distributed random variables need not be jointly bivariate normal 2 7 3 Correlations and independence 2 8 Conditional distributions 2 8 1 Bivariate case 2 8 2 Bivariate conditional expectation 2 8 2 1 In the general case 2 8 2 2 In the centered case with unit variances 2 9 Marginal distributions 2 10 Affine transformation 2 11 Geometric interpretation 3 Statistical inference 3 1 Parameter estimation 3 2 Bayesian inference 3 3 Multivariate normality tests 3 4 Classification into multivariate normal classes 3 4 1 Gaussian Discriminant Analysis 4 Computational methods 4 1 Drawing values from the distribution 5 See also 6 References 6 1 LiteratureDefinitions EditNotation and parameterization Edit The multivariate normal distribution of a k dimensional random vector X X 1 X k T displaystyle mathbf X X 1 ldots X k mathrm T can be written in the following notation X N m S displaystyle mathbf X sim mathcal N boldsymbol mu boldsymbol Sigma or to make it explicitly known that X is k dimensional X N k m S displaystyle mathbf X sim mathcal N k boldsymbol mu boldsymbol Sigma with k dimensional mean vector m E X E X 1 E X 2 E X k T displaystyle boldsymbol mu operatorname E mathbf X operatorname E X 1 operatorname E X 2 ldots operatorname E X k textbf T and k k displaystyle k times k covariance matrix S i j E X i m i X j m j Cov X i X j displaystyle Sigma i j operatorname E X i mu i X j mu j operatorname Cov X i X j such that 1 i k displaystyle 1 leq i leq k and 1 j k displaystyle 1 leq j leq k The inverse of the covariance matrix is called the precision matrix denoted by Q S 1 displaystyle boldsymbol Q boldsymbol Sigma 1 Standard normal random vector Edit A real random vector X X 1 X k T displaystyle mathbf X X 1 ldots X k mathrm T is called a standard normal random vector if all of its components X i displaystyle X i are independent and each is a zero mean unit variance normally distributed random variable i e if X i N 0 1 displaystyle X i sim mathcal N 0 1 for all i 1 k displaystyle i 1 ldots k 1 p 454 Centered normal random vector Edit A real random vector X X 1 X k T displaystyle mathbf X X 1 ldots X k mathrm T is called a centered normal random vector if there exists a deterministic k ℓ displaystyle k times ell matrix A displaystyle boldsymbol A such that A Z displaystyle boldsymbol A mathbf Z has the same distribution as X displaystyle mathbf X where Z displaystyle mathbf Z is a standard normal random vector with ℓ displaystyle ell components 1 p 454 Normal random vector Edit A real random vector X X 1 X k T displaystyle mathbf X X 1 ldots X k mathrm T is called a normal random vector if there exists a random ℓ displaystyle ell vector Z displaystyle mathbf Z which is a standard normal random vector a k displaystyle k vector m displaystyle mathbf mu and a k ℓ displaystyle k times ell matrix A displaystyle boldsymbol A such that X A Z m displaystyle mathbf X boldsymbol A mathbf Z mathbf mu 2 p 454 1 p 455 Formally X N m S there exist m R k A R k ℓ such that X A Z m and n 1 l Z n N 0 1 i i d displaystyle mathbf X sim mathcal N mathbf mu boldsymbol Sigma quad iff quad text there exist mathbf mu in mathbb R k boldsymbol A in mathbb R k times ell text such that mathbf X boldsymbol A mathbf Z mathbf mu text and forall n 1 ldots l Z n sim mathcal N 0 1 text i i d Here the covariance matrix is S A A T displaystyle boldsymbol Sigma boldsymbol A boldsymbol A mathrm 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 X i displaystyle X i are in general not independent they can be seen as the result of applying the matrix A displaystyle boldsymbol A to a collection of independent Gaussian variables Z displaystyle mathbf Z Equivalent definitions Edit The following definitions are equivalent to the definition given above A random vector X X 1 X k T displaystyle mathbf X X 1 ldots X k T has a multivariate normal distribution if it satisfies one of the following equivalent conditions Every linear combination Y a 1 X 1 a k X k displaystyle Y a 1 X 1 cdots a k X k of its components is normally distributed That is for any constant vector a R k displaystyle mathbf a in mathbb R k the random variable Y a T X displaystyle Y mathbf a mathrm T mathbf X 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 m displaystyle mathbf mu and a symmetric positive semidefinite k k displaystyle k times k matrix S displaystyle boldsymbol Sigma such that the characteristic function of X displaystyle mathbf X is f X u exp i u T m 1 2 u T S u displaystyle varphi mathbf X mathbf u exp Big i mathbf u T boldsymbol mu tfrac 1 2 mathbf u T boldsymbol Sigma mathbf u 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 Edit Bivariate normal joint density Non degenerate case Edit The multivariate normal distribution is said to be non degenerate when the symmetric covariance matrix S displaystyle boldsymbol Sigma is positive definite In this case the distribution has density 5 f X x 1 x k exp 1 2 x m T S 1 x m 2 p k S displaystyle f mathbf X x 1 ldots x k frac exp left frac 1 2 mathbf x boldsymbol mu mathrm T boldsymbol Sigma 1 mathbf x boldsymbol mu right sqrt 2 pi k boldsymbol Sigma where x displaystyle mathbf x is a real k dimensional column vector and S det S displaystyle boldsymbol Sigma equiv det boldsymbol Sigma is the determinant of S displaystyle boldsymbol Sigma also known as the generalized variance The equation above reduces to that of the univariate normal distribution if S displaystyle boldsymbol Sigma is a 1 1 displaystyle 1 times 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 m T S 1 x m displaystyle sqrt mathbf x boldsymbol mu mathrm T boldsymbol Sigma 1 mathbf x boldsymbol mu is known as the Mahalanobis distance which represents the distance of the test point x displaystyle mathbf x from the mean m displaystyle boldsymbol mu Note that in the case when k 1 displaystyle 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 In the 2 dimensional nonsingular case k rank S 2 displaystyle k operatorname rank left Sigma right 2 the probability density function of a vector XY displaystyle text XY is f x y 1 2 p s X s Y 1 r 2 exp 1 2 1 r 2 x m X s X 2 2 r x m X s X y m Y s Y y m Y s Y 2 displaystyle f x y frac 1 2 pi sigma X sigma Y sqrt 1 rho 2 exp left frac 1 2 1 rho 2 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 r displaystyle rho is the correlation between X displaystyle X and Y displaystyle Y and where s X gt 0 displaystyle sigma X gt 0 and s Y gt 0 displaystyle sigma Y gt 0 In this case m m X m Y S s X 2 r s X s Y r s X s Y s Y 2 displaystyle boldsymbol mu begin pmatrix mu X mu Y end pmatrix quad boldsymbol Sigma begin pmatrix sigma X 2 amp rho sigma X sigma Y rho sigma X sigma Y amp sigma Y 2 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 countably many distinct linear combinations of X displaystyle X and Y displaystyle Y are normal in order to conclude that the vector of XY displaystyle text XY is bivariate normal 6 The bivariate iso density loci plotted in the x y displaystyle x y plane are ellipses whose principal axes are defined by the eigenvectors of the covariance matrix S displaystyle boldsymbol Sigma the major and minor semidiameters of the ellipse equal the square root of the ordered eigenvalues Bivariate normal distribution centered at 1 3 displaystyle 1 3 with a standard deviation of 3 in roughly the 0 878 0 478 displaystyle 0 878 0 478 direction and of 1 in the orthogonal direction As the absolute value of the correlation parameter r displaystyle rho increases these loci are squeezed toward the following line y x sgn r s Y s X x m X m Y displaystyle y x operatorname sgn rho frac sigma Y sigma X x mu X mu Y This is because this expression with sgn r displaystyle operatorname sgn rho where sgn is the Sign function replaced by r displaystyle rho is the best linear unbiased prediction of Y displaystyle Y given a value of X displaystyle X 7 Degenerate case Edit If the covariance matrix S displaystyle 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 rank S displaystyle operatorname rank boldsymbol Sigma of the coordinates of x displaystyle mathbf 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 8 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 S displaystyle operatorname rank boldsymbol Sigma dimensional affine subspace of R k displaystyle mathbb R k where the Gaussian distribution is supported i e m S 1 2 v v R k displaystyle boldsymbol mu boldsymbol Sigma 1 2 mathbf v mathbf v in mathbb R k With respect to this measure the distribution has the density of the following motif f x e 1 2 x m T S x m 2 p k det S displaystyle f mathbf x frac e frac 1 2 mathbf x boldsymbol mu mathsf T boldsymbol Sigma mathbf x boldsymbol mu sqrt 2 pi k det nolimits boldsymbol Sigma where S displaystyle boldsymbol Sigma is the generalized inverse k displaystyle k is the rank of S displaystyle boldsymbol Sigma and det displaystyle det nolimits is the pseudo determinant 9 Cumulative distribution function Edit 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 displaystyle F mathbf x of a random vector X displaystyle mathbf X as the probability that all components of X displaystyle mathbf X are less than or equal to the corresponding values in the vector x displaystyle mathbf x 10 F x P X x where X N m S displaystyle F mathbf x mathbb P mathbf X leq mathbf x quad text where mathbf X sim mathcal N boldsymbol mu boldsymbol Sigma Though there is no closed form for F x displaystyle F mathbf x there are a number of algorithms that estimate it numerically 10 11 Another way is to define the cdf F r displaystyle F r as the probability that a sample lies inside the ellipsoid determined by its Mahalanobis distance r displaystyle r from the Gaussian a direct generalization of the standard deviation 12 In order to compute the values of this function closed analytic formulae exist 12 as follows Interval Edit Further information Confidence region and Hotelling t squared statistic The interval for the multivariate normal distribution yields a region consisting of those vectors x satisfying x m T S 1 x m x k 2 p displaystyle mathbf x boldsymbol mu T boldsymbol Sigma 1 mathbf x boldsymbol mu leq chi k 2 p Here x displaystyle mathbf x is a k displaystyle k dimensional vector m displaystyle boldsymbol mu is the known k displaystyle k dimensional mean vector S displaystyle boldsymbol Sigma is the known covariance matrix and x k 2 p displaystyle chi k 2 p is the quantile function for probability p displaystyle p of the chi squared distribution with k displaystyle k degrees of freedom 13 When k 2 displaystyle 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 The complementary cumulative distribution function ccdf or the tail distribution is defined as F x 1 P X x displaystyle overline F mathbf x 1 mathbb P mathbf X leq mathbf x When X N m S displaystyle mathbf X sim mathcal N boldsymbol mu boldsymbol Sigma then the ccdf can be written as a probability the maximum of dependent Gaussian variables 14 F x P i X i x i P max i Y i 0 where Y N m x S displaystyle overline F mathbf x mathbb P left bigcup i X i geq x i right mathbb P max i Y i geq 0 quad text where mathbf Y sim mathcal N boldsymbol mu mathbf x boldsymbol Sigma 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 14 15 Properties EditProbability in different domains Edit Top the probability of a bivariate normal in the domain x sin y y cos x gt 1 displaystyle x sin y y cos x gt 1 blue regions Middle the probability of a trivariate normal in a toroidal domain Bottom converging Monte Carlo integral of the probability of a 4 variate normal in the 4d regular polyhedral domain defined by i 1 4 x i lt 1 displaystyle sum i 1 4 vert x i vert lt 1 These are all computed by the numerical method of ray tracing 16 The probability content of the multivariate normal in a quadratic domain defined by q x x Q 2 x q 1 x q 0 gt 0 displaystyle q boldsymbol x boldsymbol x mathbf Q 2 boldsymbol x boldsymbol q 1 boldsymbol x q 0 gt 0 where Q 2 displaystyle mathbf Q 2 is a matrix q 1 displaystyle boldsymbol q 1 is a vector and q 0 displaystyle q 0 is a scalar which is relevant for Bayesian classification decision theory using Gaussian discriminant analysis is given by the generalized chi squared distribution 16 The probability content within any general domain defined by f x gt 0 displaystyle f boldsymbol x gt 0 where f x displaystyle f boldsymbol x is a general function can be computed using the numerical method of ray tracing 16 Matlab code Higher moments Edit Main article Isserlis theorem The kth order moments of x are given by m 1 N x d e f m r 1 r N x d e f E j 1 N X j r j displaystyle mu 1 ldots N mathbf x stackrel mathrm def mu r 1 ldots r N mathbf x stackrel mathrm def operatorname E left prod j 1 N X j r j right where r1 r2 rN k The kth order central moments are as follows If k is odd m1 N x m 0 If k is even with k 2l then ambiguous m 1 2 l x m s i j s k ℓ s X Z displaystyle mu 1 dots 2 lambda mathbf x boldsymbol mu sum left sigma ij sigma k ell cdots sigma XZ right where the sum is taken over all allocations of the set 1 2 l displaystyle left 1 ldots 2 lambda right into l unordered pairs That is for a kth 2l 6 central moment one sums the products of l 3 covariances the expected value m is taken to be 0 in the interests of parsimony E X 1 X 2 X 3 X 4 X 5 X 6 E X 1 X 2 E X 3 X 4 E X 5 X 6 E X 1 X 2 E X 3 X 5 E X 4 X 6 E X 1 X 2 E X 3 X 6 E X 4 X 5 E X 1 X 3 E X 2 X 4 E X 5 X 6 E X 1 X 3 E X 2 X 5 E X 4 X 6 E X 1 X 3 E X 2 X 6 E X 4 X 5 E X 1 X 4 E X 2 X 3 E X 5 X 6 E X 1 X 4 E X 2 X 5 E X 3 X 6 E X 1 X 4 E X 2 X 6 E X 3 X 5 E X 1 X 5 E X 2 X 3 E X 4 X 6 E X 1 X 5 E X 2 X 4 E X 3 X 6 E X 1 X 5 E X 2 X 6 E X 3 X 4 E X 1 X 6 E X 2 X 3 E X 4 X 5 E X 1 X 6 E X 2 X 4 E X 3 X 5 E X 1 X 6 E X 2 X 5 E X 3 X 4 displaystyle begin aligned amp operatorname E X 1 X 2 X 3 X 4 X 5 X 6 8pt amp operatorname E X 1 X 2 operatorname E X 3 X 4 operatorname E X 5 X 6 operatorname E X 1 X 2 operatorname E X 3 X 5 operatorname E X 4 X 6 operatorname E X 1 X 2 operatorname E X 3 X 6 operatorname E X 4 X 5 4pt amp operatorname E X 1 X 3 operatorname E X 2 X 4 operatorname E X 5 X 6 operatorname E X 1 X 3 operatorname E X 2 X 5 operatorname E X 4 X 6 operatorname E X 1 X 3 operatorname E X 2 X 6 operatorname E X 4 X 5 4pt amp operatorname E X 1 X 4 operatorname E X 2 X 3 operatorname E X 5 X 6 operatorname E X 1 X 4 operatorname E X 2 X 5 operatorname E X 3 X 6 operatorname E X 1 X 4 operatorname E X 2 X 6 operatorname E X 3 X 5 4pt amp operatorname E X 1 X 5 operatorname E X 2 X 3 operatorname E X 4 X 6 operatorname E X 1 X 5 operatorname E X 2 X 4 operatorname E X 3 X 6 operatorname E X 1 X 5 operatorname E X 2 X 6 operatorname E X 3 X 4 4pt amp operatorname E X 1 X 6 operatorname E X 2 X 3 operatorname E X 4 X 5 operatorname E X 1 X 6 operatorname E X 2 X 4 operatorname E X 3 X 5 operatorname E X 1 X 6 operatorname E X 2 X 5 operatorname E X 3 X 4 end aligned This yields 2 l 1 2 l 1 l 1 displaystyle tfrac 2 lambda 1 2 lambda 1 lambda 1 terms in the sum 15 in the above case each being the product of l 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 l displaystyle 1 ldots 2 lambda 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 X i 4 3 s i i 2 E X i 3 X j 3 s i i s i j E X i 2 X j 2 s i i s j j 2 s i j 2 E X i 2 X j X k s i i s j k 2 s i j s i k E X i X j X k X n s i j s k n s i k s j n s i n s j k displaystyle begin aligned operatorname E left X i 4 right amp 3 sigma ii 2 4pt operatorname E left X i 3 X j right amp 3 sigma ii sigma ij 4pt operatorname E left X i 2 X j 2 right amp sigma ii sigma jj 2 sigma ij 2 4pt operatorname E left X i 2 X j X k right amp sigma ii sigma jk 2 sigma ij sigma ik 4pt operatorname E left X i X j X k X n right amp sigma ij sigma kn sigma ik sigma jn sigma in sigma jk end aligned where s i j displaystyle sigma 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 X i X j X k X n displaystyle E left X i X j X k X n right and then one simplifies this accordingly For example for E X i 2 X k X n displaystyle operatorname E X i 2 X k X n one lets Xi Xj and one uses the fact that s i i s i 2 displaystyle sigma ii sigma i 2 Functions of a normal vector Edit a Probability density of a function cos x 2 displaystyle cos x 2 of a single normal variable x displaystyle x with m 2 displaystyle mu 2 and s 3 displaystyle sigma 3 b Probability density of a function x y displaystyle x y of a normal vector x y displaystyle x y with mean m 1 2 displaystyle boldsymbol mu 1 2 and covariance S 01 016 016 04 displaystyle mathbf Sigma begin bmatrix 01 amp 016 016 amp 04 end bmatrix c Heat map of the joint probability density of two functions of a normal vector x y displaystyle x y with mean m 2 5 displaystyle boldsymbol mu 2 5 and covariance S 10 7 7 10 displaystyle mathbf Sigma begin bmatrix 10 amp 7 7 amp 10 end bmatrix d Probability density of a function i 1 4 x i displaystyle sum i 1 4 vert x i vert of 4 iid standard normal variables These are computed by the numerical method of ray tracing 16 A quadratic form of a normal vector x displaystyle boldsymbol x q x x Q 2 x q 1 x q 0 displaystyle q boldsymbol x boldsymbol x mathbf Q 2 boldsymbol x boldsymbol q 1 boldsymbol x q 0 where Q 2 displaystyle mathbf Q 2 is a matrix q 1 displaystyle boldsymbol q 1 is a vector and q 0 displaystyle q 0 is a scalar is a generalized chi squared variable 16 If f x displaystyle 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 16 Likelihood function Edit If the mean and covariance matrix are known the log likelihood of an observed vector x displaystyle boldsymbol x is simply the log of the probability density function ln L x 1 2 ln S x m S 1 x m k ln 2 p displaystyle ln L boldsymbol x frac 1 2 left ln boldsymbol Sigma boldsymbol x boldsymbol mu boldsymbol Sigma 1 boldsymbol x boldsymbol mu k ln 2 pi right The circularly symmetric version of the noncentral complex case where z displaystyle boldsymbol z is a vector of complex numbers would be ln L z ln S z m S 1 z m k ln p displaystyle ln L boldsymbol z ln boldsymbol Sigma boldsymbol z boldsymbol mu dagger boldsymbol Sigma 1 boldsymbol z boldsymbol mu k ln pi i e with the conjugate transpose indicated by displaystyle dagger replacing the normal transpose indicated by displaystyle 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 17 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 16 Differential entropy Edit The differential entropy of the multivariate normal distribution is 18 h f f x ln f x d x 1 2 ln 2 p e S 1 2 ln 2 p e k S k 2 ln 2 p e 1 2 ln S k 2 k 2 ln 2 p 1 2 ln S displaystyle begin aligned h left f right amp int infty infty int infty infty cdots int infty infty f mathbf x ln f mathbf x d mathbf x amp frac 1 2 ln left left left 2 pi e right boldsymbol Sigma right right frac 1 2 ln left left 2 pi e right k left boldsymbol Sigma right right frac k 2 ln left 2 pi e right frac 1 2 ln left left boldsymbol Sigma right right frac k 2 frac k 2 ln left 2 pi right frac 1 2 ln left left boldsymbol Sigma right right end aligned where the bars denote the matrix determinant and k is the dimensionality of the vector space Kullback Leibler divergence Edit The Kullback Leibler divergence from N 1 m 1 S 1 displaystyle mathcal N 1 boldsymbol mu 1 boldsymbol Sigma 1 to N 0 m 0 S 0 displaystyle mathcal N 0 boldsymbol mu 0 boldsymbol Sigma 0 for non singular matrices S1 and S0 is 19 D KL N 0 N 1 1 2 tr S 1 1 S 0 m 1 m 0 T S 1 1 m 1 m 0 k ln S 1 S 0 displaystyle D text KL mathcal N 0 parallel mathcal N 1 1 over 2 left operatorname tr left boldsymbol Sigma 1 1 boldsymbol Sigma 0 right left boldsymbol mu 1 boldsymbol mu 0 right rm T boldsymbol Sigma 1 1 boldsymbol mu 1 boldsymbol mu 0 k ln boldsymbol Sigma 1 over boldsymbol Sigma 0 right where k displaystyle 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 m 1 m 0 displaystyle boldsymbol mu 1 boldsymbol mu 0 D KL N 0 N 1 1 2 tr S 1 1 S 0 k ln S 1 S 0 displaystyle D text KL mathcal N 0 parallel mathcal N 1 1 over 2 left operatorname tr left boldsymbol Sigma 1 1 boldsymbol Sigma 0 right k ln boldsymbol Sigma 1 over boldsymbol Sigma 0 right Mutual information Edit The mutual information of a distribution is a special case of the Kullback Leibler divergence in which P displaystyle P is the full multivariate distribution and Q displaystyle Q is the product of the 1 dimensional marginal distributions In the notation of the Kullback Leibler divergence section of this article S 1 displaystyle boldsymbol Sigma 1 is a diagonal matrix with the diagonal entries of S 0 displaystyle boldsymbol Sigma 0 and m 1 m 0 displaystyle boldsymbol mu 1 boldsymbol mu 0 The resulting formula for mutual information is I X 1 2 ln r 0 displaystyle I boldsymbol X 1 over 2 ln boldsymbol rho 0 where r 0 displaystyle boldsymbol rho 0 is the correlation matrix constructed from S 0 displaystyle boldsymbol Sigma 0 citation needed In the bivariate case the expression for the mutual information is I x y 1 2 ln 1 r 2 displaystyle I x y 1 over 2 ln 1 rho 2 Joint normality Edit Normally distributed and independent Edit If X displaystyle X and Y displaystyle Y are normally distributed and independent this implies they are jointly normally distributed i e the pair X Y displaystyle 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 r 0 displaystyle rho 0 Two normally distributed random variables need not be jointly bivariate normal Edit See also normally distributed and uncorrelated does not imply independent The fact that two random variables X displaystyle X and Y displaystyle Y both have a normal distribution does not imply that the pair X Y displaystyle 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 displaystyle Y X if X gt c displaystyle X gt c and Y X displaystyle Y X if X lt c displaystyle X lt c where c gt 0 displaystyle c gt 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 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 If N dimensional x is partitioned as follows x x 1 x 2 with sizes q 1 N q 1 displaystyle mathbf x begin bmatrix mathbf x 1 mathbf x 2 end bmatrix text with sizes begin bmatrix q times 1 N q times 1 end bmatrix and accordingly m and S are partitioned as follows m m 1 m 2 with sizes q 1 N q 1 displaystyle boldsymbol mu begin bmatrix boldsymbol mu 1 boldsymbol mu 2 end bmatrix text with sizes begin bmatrix q times 1 N q times 1 end bmatrix S S 11 S 12 S 21 S 22 with sizes q q q N q N q q N q N q displaystyle boldsymbol Sigma begin bmatrix boldsymbol Sigma 11 amp boldsymbol Sigma 12 boldsymbol Sigma 21 amp boldsymbol Sigma 22 end bmatrix text with sizes begin bmatrix q times q amp q times N q N q times q amp N q times N q end bmatrix then the distribution of x1 conditional on x2 a is multivariate normal x1 x2 a N m S where m m 1 S 12 S 22 1 a m 2 displaystyle bar boldsymbol mu boldsymbol mu 1 boldsymbol Sigma 12 boldsymbol Sigma 22 1 left mathbf a boldsymbol mu 2 right and covariance matrix S S 11 S 12 S 22 1 S 21 displaystyle overline boldsymbol Sigma boldsymbol Sigma 11 boldsymbol Sigma 12 boldsymbol Sigma 22 1 boldsymbol Sigma 21 20 Here S 22 1 displaystyle boldsymbol Sigma 22 1 is the generalized inverse of S 22 displaystyle boldsymbol Sigma 22 The matrix S displaystyle overline boldsymbol Sigma is the Schur complement of S22 in S 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 S 12 S 22 1 a m 2 displaystyle boldsymbol Sigma 12 boldsymbol Sigma 22 1 left mathbf a boldsymbol mu 2 right compare this with the situation of not knowing the value of a in which case x1 would have distribution N q m 1 S 11 displaystyle mathcal N q left boldsymbol mu 1 boldsymbol Sigma 11 right An interesting fact derived in order to prove this result is that the random vectors x 2 displaystyle mathbf x 2 and y 1 x 1 S 12 S 22 1 x 2 displaystyle mathbf y 1 mathbf x 1 boldsymbol Sigma 12 boldsymbol Sigma 22 1 mathbf x 2 are independent The matrix S12S22 1 is known as the matrix of regression coefficients Bivariate case Edit In the bivariate case where x is partitioned into X 1 displaystyle X 1 and X 2 displaystyle X 2 the conditional distribution of X 1 displaystyle X 1 given X 2 displaystyle X 2 is 21 X 1 X 2 a N m 1 s 1 s 2 r a m 2 1 r 2 s 1 2 displaystyle X 1 mid X 2 a sim mathcal N left mu 1 frac sigma 1 sigma 2 rho a mu 2 1 rho 2 sigma 1 2 right where r displaystyle rho is the correlation coefficient between X 1 displaystyle X 1 and X 2 displaystyle X 2 Bivariate conditional expectation Edit In the general case Edit X 1 X 2 N m 1 m 2 s 1 2 r s 1 s 2 r s 1 s 2 s 2 2 displaystyle begin pmatrix X 1 X 2 end pmatrix sim mathcal N left begin pmatrix mu 1 mu 2 end pmatrix begin pmatrix sigma 1 2 amp rho sigma 1 sigma 2 rho sigma 1 sigma 2 amp sigma 2 2 end pmatrix right The conditional expectation of X1 given X2 is E X 1 X 2 x 2 m 1 r s 1 s 2 x 2 m 2 displaystyle operatorname E X 1 mid X 2 x 2 mu 1 rho frac sigma 1 sigma 2 x 2 mu 2 Proof the result is obtained by taking the expectation of the conditional distribution X 1 X 2 displaystyle X 1 mid X 2 above In the centered case with unit variances Edit X 1 X 2 N 0 0 1 r r 1 displaystyle begin pmatrix X 1 X 2 end pmatrix sim mathcal N left begin pmatrix 0 0 end pmatrix begin pmatrix 1 amp rho rho amp 1 end pmatrix right The conditional expectation of X1 given X2 is E X 1 X 2 x 2 r x 2 displaystyle operatorname E X 1 mid X 2 x 2 rho x 2 and the conditional variance is var X 1 X 2 x 2 1 r 2 displaystyle operatorname var X 1 mid X 2 x 2 1 rho 2 thus the conditional variance does not depend on x2 The conditional expectation of X1 given that X2 is smaller bigger than z is 22 367 E X 1 X 2 lt z r f z F z displaystyle operatorname E X 1 mid X 2 lt z rho varphi z over Phi z E X 1 X 2 gt z r f z 1 F z displaystyle operatorname E X 1 mid X 2 gt 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 E X 1 X 2 x 2 r x 2 displaystyle operatorname E X 1 mid X 2 x 2 rho x 2 so that E X 1 X 2 lt z r E X 2 X 2 lt z displaystyle operatorname E X 1 mid X 2 lt z rho E X 2 mid X 2 lt z and then using the properties of the expectation of a truncated normal distribution Marginal distributions Edit 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 23 ExampleLet X X1 X2 X3 be multivariate normal random variables with mean vector m m1 m2 m3 and covariance matrix S standard parametrization for multivariate normal distributions Then the joint distribution of X X1 X3 is multivariate normal with mean vector m m1 m3 and covariance matrix S S 11 S 13 S 31 S 33 displaystyle boldsymbol Sigma begin bmatrix boldsymbol Sigma 11 amp boldsymbol Sigma 13 boldsymbol Sigma 31 amp boldsymbol Sigma 33 end bmatrix Affine transformation Edit If Y c BX is an affine transformation of X N m S displaystyle mathbf X sim mathcal N boldsymbol mu boldsymbol Sigma where c is an M 1 displaystyle M times 1 vector of constants and B is a constant M N displaystyle M times N matrix then Y has a multivariate normal distribution with expected value c Bm and variance BSBT i e Y N c B m B S B T displaystyle mathbf Y sim mathcal N left mathbf c mathbf B boldsymbol mu mathbf B boldsymbol Sigma mathbf B rm T 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 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 displaystyle mathbf B begin bmatrix 1 amp 0 amp 0 amp 0 amp 0 amp ldots amp 0 0 amp 1 amp 0 amp 0 amp 0 amp ldots amp 0 0 amp 0 amp 0 amp 1 amp 0 amp ldots amp 0 end bmatrix 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 N b m b T S b displaystyle Z sim mathcal N left mathbf b cdot boldsymbol mu mathbf b rm T boldsymbol Sigma mathbf b right This result follows by using B b 1 b 2 b n b T displaystyle mathbf B begin bmatrix b 1 amp b 2 amp ldots amp b n end bmatrix mathbf b rm T Observe how the positive definiteness of S 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 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 24 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 S displaystyle boldsymbol Sigma The squared relative lengths of the principal axes are given by the corresponding eigenvalues If S ULUT UL1 2 UL1 2 T is an eigendecomposition where the columns of U are unit eigenvectors and L is a diagonal matrix of the eigenvalues then we have X N m S X m U L 1 2 N 0 I X m U N 0 L displaystyle mathbf X sim mathcal N boldsymbol mu boldsymbol Sigma iff mathbf X sim boldsymbol mu mathbf U boldsymbol Lambda 1 2 mathcal N 0 mathbf I iff mathbf X sim boldsymbol mu mathbf U mathcal N 0 boldsymbol Lambda dd Moreover U can be chosen to be a rotation matrix as inverting an axis does not have any effect on N 0 L but inverting a column changes the sign of U s determinant The distribution N m S is in effect N 0 I scaled by L1 2 rotated by U and translated by m Conversely any choice of m full rank matrix U and positive diagonal entries Li yields a non singular multivariate normal distribution If any Li is zero and U is square the resulting covariance matrix ULUT 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 25 In one dimension the probability of finding a sample of the normal distribution in the interval m s displaystyle 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 26 Dimensionality Probability1 0 68272 0 39353 0 19874 0 09025 0 03746 0 01447 0 00528 0 00189 0 000610 0 0002Statistical inference EditParameter estimation Edit Further information Estimation of covariance matrices 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 2 p k S exp 1 2 x m T S 1 x m displaystyle f mathbf x frac 1 sqrt 2 pi k boldsymbol Sigma exp left 1 over 2 mathbf x boldsymbol mu rm T boldsymbol Sigma 1 mathbf x boldsymbol mu right and the ML estimator of the covariance matrix from a sample of n observations is S 1 n i 1 n x i x x i x T displaystyle widehat boldsymbol Sigma 1 over n sum i 1 n mathbf x i overline mathbf x mathbf x i overline mathbf x T which is simply the sample covariance matrix This is a biased estimator whose expectation is E S n 1 n S displaystyle E left widehat boldsymbol Sigma right frac n 1 n boldsymbol Sigma An unbiased sample covariance is S 1 n 1 i 1 n x i x x i x T 1 n 1 X I 1 n J X displaystyle widehat boldsymbol Sigma frac 1 n 1 sum i 1 n mathbf x i overline mathbf x mathbf x i overline mathbf x rm T frac 1 n 1 left X left I frac 1 n cdot J right X right matrix form I displaystyle I is the K K displaystyle K times K identity matrix J is a K K displaystyle K times K matrix of ones the term in parentheses is thus the K K displaystyle K times 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 Cramer Rao bound for parameter estimation in this setting See Fisher information for more details Bayesian inference Edit 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 W 1 displaystyle mathcal W 1 Suppose then that n observations have been made X x 1 x n N m S displaystyle mathbf X mathbf x 1 dots mathbf x n sim mathcal N boldsymbol mu boldsymbol Sigma and that a conjugate prior has been assigned where p m S p m S p S displaystyle p boldsymbol mu boldsymbol Sigma p boldsymbol mu mid boldsymbol Sigma p boldsymbol Sigma where p m S N m 0 m 1 S displaystyle p boldsymbol mu mid boldsymbol Sigma sim mathcal N boldsymbol mu 0 m 1 boldsymbol Sigma and p S W 1 PS n 0 displaystyle p boldsymbol Sigma sim mathcal W 1 boldsymbol Psi n 0 Then citation needed p m S X N n x m m 0 n m 1 n m S p S X W 1 PS n S n m n m x m 0 x m 0 n n 0 displaystyle begin array rcl p boldsymbol mu mid boldsymbol Sigma mathbf X amp sim amp mathcal N left frac n bar mathbf x m boldsymbol mu 0 n m frac 1 n m boldsymbol Sigma right p boldsymbol Sigma mid mathbf X amp sim amp mathcal W 1 left boldsymbol Psi n mathbf S frac nm n m bar mathbf x boldsymbol mu 0 bar mathbf x boldsymbol mu 0 n n 0 right end array where, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.