Misplaced Pages

Multivariate normal distribution

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from BHEP test) Generalization of the one-dimensional normal distribution to higher dimensions
Multivariate normal
Probability density functionMany sample points from a multivariate normal distribution with μ = [ 0 0 ] {\displaystyle {\boldsymbol {\mu }}=\left} and Σ = [ 1 3 / 5 3 / 5 2 ] {\displaystyle {\boldsymbol {\Sigma }}=\left} , shown along with the 3-sigma ellipse, the two marginal distributions, and the two 1-d histograms.
Notation N ( μ , Σ ) {\displaystyle {\mathcal {N}}({\boldsymbol {\mu }},\,{\boldsymbol {\Sigma }})}
Parameters μRlocation
ΣRcovariance (positive semi-definite matrix)
Support xμ + span(Σ) ⊆ R
PDF ( 2 π ) k / 2 det ( Σ ) 1 / 2 exp ( 1 2 ( x μ ) T Σ 1 ( x μ ) ) , {\displaystyle (2\pi )^{-k/2}\det({\boldsymbol {\Sigma }})^{-1/2}\,\exp \left(-{\frac {1}{2}}(\mathbf {x} -{\boldsymbol {\mu }})^{\mathrm {T} }{\boldsymbol {\Sigma }}^{-1}(\mathbf {x} -{\boldsymbol {\mu }})\right),}
exists only when Σ is positive-definite
Mean μ
Mode μ
Variance Σ
Entropy k 2 log ( 2 π e ) + 1 2 log det ( Σ ) {\displaystyle {\frac {k}{2}}\log {\mathord {\left(2\pi \mathrm {e} \right)}}+{\frac {1}{2}}\log \det {\mathord {\left({\boldsymbol {\Sigma }}\right)}}}
MGF exp ( μ T t + 1 2 t T Σ t ) {\displaystyle \exp \!{\Big (}{\boldsymbol {\mu }}^{\mathrm {T} }\mathbf {t} +{\tfrac {1}{2}}\mathbf {t} ^{\mathrm {T} }{\boldsymbol {\Sigma }}\mathbf {t} {\Big )}}
CF exp ( i μ T t 1 2 t T Σ t ) {\displaystyle \exp \!{\Big (}i{\boldsymbol {\mu }}^{\mathrm {T} }\mathbf {t} -{\tfrac {1}{2}}\mathbf {t} ^{\mathrm {T} }{\boldsymbol {\Sigma }}\mathbf {t} {\Big )}}
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

Notation and parametrization

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 ( μ , Σ ) , {\displaystyle \mathbf {X} \ \sim \ {\mathcal {N}}({\boldsymbol {\mu }},\,{\boldsymbol {\Sigma }}),}

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

X     N k ( μ , Σ ) , {\displaystyle \mathbf {X} \ \sim \ {\mathcal {N}}_{k}({\boldsymbol {\mu }},\,{\boldsymbol {\Sigma }}),}

with k-dimensional mean vector

μ = E [ X ] = ( E [ X 1 ] , E [ X 2 ] , , E [ X k ] ) T , {\displaystyle {\boldsymbol {\mu }}=\operatorname {E} =(\operatorname {E} ,\operatorname {E} ,\ldots ,\operatorname {E} )^{\mathrm {T} },}

and k × k {\displaystyle k\times k} covariance matrix

Σ i , j = E [ ( X i μ i ) ( X j μ j ) ] = Cov [ X i , X j ] {\displaystyle \Sigma _{i,j}=\operatorname {E} =\operatorname {Cov} }

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 = Σ 1 {\displaystyle {\boldsymbol {Q}}={\boldsymbol {\Sigma }}^{-1}} .

Standard normal random vector

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

Centered normal random vector

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.

Normal random vector

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 μ {\displaystyle \mathbf {\mu } } , and a k × {\displaystyle k\times \ell } matrix A {\displaystyle {\boldsymbol {A}}} , such that X = A Z + μ {\displaystyle \mathbf {X} ={\boldsymbol {A}}\mathbf {Z} +\mathbf {\mu } } .

Formally:

X     N ( μ , Σ ) there exist  μ R k , A R k ×  such that  X = A Z + μ  and  n = 1 , , : 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 ,\ell :Z_{n}\sim \ {\mathcal {N}}(0,1),{\text{i.i.d.}}}

Here the covariance matrix is Σ = 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

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})^{\mathrm {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 μ {\displaystyle \mathbf {\mu } } and a symmetric, positive semidefinite k × k {\displaystyle k\times k} matrix Σ {\displaystyle {\boldsymbol {\Sigma }}} , such that the characteristic function of X {\displaystyle \mathbf {X} } is φ X ( u ) = exp ( i u T μ 1 2 u T Σ u ) . {\displaystyle \varphi _{\mathbf {X} }(\mathbf {u} )=\exp {\Big (}i\mathbf {u} ^{\mathrm {T} }{\boldsymbol {\mu }}-{\tfrac {1}{2}}\mathbf {u} ^{\mathrm {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.

Density function

Bivariate normal joint density

Non-degenerate case

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

f X ( x 1 , , x k ) = exp ( 1 2 ( x μ ) T Σ 1 ( x μ ) ) ( 2 π ) k | Σ | {\displaystyle f_{\mathbf {X} }(x_{1},\ldots ,x_{k})={\frac {\exp \left(-{\frac {1}{2}}\left({\mathbf {x} }-{\boldsymbol {\mu }}\right)^{\mathrm {T} }{\boldsymbol {\Sigma }}^{-1}\left({\mathbf {x} }-{\boldsymbol {\mu }}\right)\right)}{\sqrt {(2\pi )^{k}|{\boldsymbol {\Sigma }}|}}}}

where x {\displaystyle {\mathbf {x} }} is a real k-dimensional column vector and | Σ | det Σ {\displaystyle |{\boldsymbol {\Sigma }}|\equiv \det {\boldsymbol {\Sigma }}} is the determinant of Σ {\displaystyle {\boldsymbol {\Sigma }}} , also known as the generalized variance. The equation above reduces to that of the univariate normal distribution if Σ {\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 μ ) T Σ 1 ( x μ ) {\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 μ {\displaystyle {\boldsymbol {\mu }}} . The squared Mahalanobis distance ( x μ ) T Σ 1 ( x μ ) {\displaystyle ({\mathbf {x} }-{\boldsymbol {\mu }})^{\mathrm {T} }{\boldsymbol {\Sigma }}^{-1}({\mathbf {x} }-{\boldsymbol {\mu }})} is decomposed into a sum of k terms, each term being a product of three meaningful components. Note that in the case when k = 1 {\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

In the 2-dimensional nonsingular case ( k = rank ( Σ ) = 2 {\displaystyle k=\operatorname {rank} \left(\Sigma \right)=2} ), the probability density function of a vector {\displaystyle {\text{}}\prime } is: f ( x , y ) = 1 2 π σ X σ Y 1 ρ 2 exp ( 1 2 [ 1 ρ 2 ] [ ( x μ X σ X ) 2 2 ρ ( x μ X σ X ) ( y μ Y σ Y ) + ( y μ Y σ Y ) 2 ] ) {\displaystyle f(x,y)={\frac {1}{2\pi \sigma _{X}\sigma _{Y}{\sqrt {1-\rho ^{2}}}}}\exp \left(-{\frac {1}{2\left}}\left\right)} where ρ {\displaystyle \rho } is the correlation between X {\displaystyle X} and Y {\displaystyle Y} and where σ X > 0 {\displaystyle \sigma _{X}>0} and σ Y > 0 {\displaystyle \sigma _{Y}>0} . In this case,

μ = ( μ X μ Y ) , Σ = ( σ X 2 ρ σ X σ Y ρ σ X σ Y σ Y 2 ) . {\displaystyle {\boldsymbol {\mu }}={\begin{pmatrix}\mu _{X}\\\mu _{Y}\end{pmatrix}},\quad {\boldsymbol {\Sigma }}={\begin{pmatrix}\sigma _{X}^{2}&\rho \sigma _{X}\sigma _{Y}\\\rho \sigma _{X}\sigma _{Y}&\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 a countably infinite set of distinct linear combinations of X {\displaystyle X} and Y {\displaystyle Y} are normal in order to conclude that the vector of {\displaystyle {\text{}}\prime } is bivariate normal.

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 Σ {\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 ρ {\displaystyle \rho } increases, these loci are squeezed toward the following line :

y ( x ) = sgn ( ρ ) σ Y σ X ( x μ X ) + μ Y . {\displaystyle y(x)=\operatorname {sgn}(\rho ){\frac {\sigma _{Y}}{\sigma _{X}}}(x-\mu _{X})+\mu _{Y}.}

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

Degenerate case

If the covariance matrix Σ {\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 ( Σ ) {\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.

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 ( Σ ) {\displaystyle \operatorname {rank} ({\boldsymbol {\Sigma }})} -dimensional affine subspace of R k {\displaystyle \mathbb {R} ^{k}} where the Gaussian distribution is supported, i.e. { μ + Σ 1 / 2 v : v R k } {\displaystyle \left\{{\boldsymbol {\mu }}+{\boldsymbol {\Sigma ^{1/2}}}\mathbf {v} :\mathbf {v} \in \mathbb {R} ^{k}\right\}} . With respect to this measure the distribution has the density of the following motif:

f ( x ) = exp ( 1 2 ( x μ ) T Σ + ( x μ ) ) det ( 2 π Σ ) {\displaystyle f(\mathbf {x} )={\frac {\exp \left(-{\frac {1}{2}}\left(\mathbf {x} -{\boldsymbol {\mu }}\right)^{\mathrm {T} }{\boldsymbol {\Sigma }}^{+}\left(\mathbf {x} -{\boldsymbol {\mu }}\right)\right)}{\sqrt {\det \nolimits ^{*}(2\pi {\boldsymbol {\Sigma }})}}}}

where Σ + {\displaystyle {\boldsymbol {\Sigma }}^{+}} is the generalized inverse and det {\displaystyle \det \nolimits ^{*}} is the pseudo-determinant.

Cumulative distribution function

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

The first way is to define the cdf F ( x ) {\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} } :

F ( x ) = P ( X x ) , where  X N ( μ , Σ ) . {\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.

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

Interval

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 μ ) T Σ 1 ( x μ ) χ k 2 ( p ) . {\displaystyle ({\mathbf {x} }-{\boldsymbol {\mu }})^{\mathrm {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, μ {\displaystyle {\boldsymbol {\mu }}} is the known k {\displaystyle k} -dimensional mean vector, Σ {\displaystyle {\boldsymbol {\Sigma }}} is the known covariance matrix and χ 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. 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)

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} \left(\mathbf {X} \leq \mathbf {x} \right)} . When X N ( μ , Σ ) {\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:

F ¯ ( x ) = P ( i { X i x i } ) = P ( max i Y i 0 ) , where  Y N ( μ x , Σ ) . {\displaystyle {\overline {F}}(\mathbf {x} )=\mathbb {P} \left(\bigcup _{i}\{X_{i}\geq x_{i}\}\right)=\mathbb {P} \left(\max _{i}Y_{i}\geq 0\right),\quad {\text{where }}\mathbf {Y} \sim {\mathcal {N}}\left({\boldsymbol {\mu }}-\mathbf {x} ,\,{\boldsymbol {\Sigma }}\right).}

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

Properties

Probability in different domains

Top: the probability of a bivariate normal in the domain x sin y y cos x > 1 {\displaystyle x\sin y-y\cos x>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 | < 1 {\displaystyle \sum _{i=1}^{4}\vert x_{i}\vert <1} . These are all computed by the numerical method of ray-tracing.

The probability content of the multivariate normal in a quadratic domain defined by q ( x ) = x Q 2 x + q 1 x + q 0 > 0 {\displaystyle q({\boldsymbol {x}})={\boldsymbol {x}}'\mathbf {Q_{2}} {\boldsymbol {x}}+{\boldsymbol {q_{1}}}'{\boldsymbol {x}}+q_{0}>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. The probability content within any general domain defined by f ( x ) > 0 {\displaystyle f({\boldsymbol {x}})>0} (where f ( x ) {\displaystyle f({\boldsymbol {x}})} is a general function) can be computed using the numerical method of ray-tracing (Matlab code).

Higher moments

Main article: Isserlis' theorem

The kth-order moments of x are given by

μ 1 , , N ( x ) = d e f μ r 1 , , r N ( x ) = d e f E [ j = 1 N X j r j ] {\displaystyle \mu _{1,\ldots ,N}(\mathbf {x} )\mathrel {\stackrel {\mathrm {def} }{=}} \mu _{r_{1},\ldots ,r_{N}}(\mathbf {x} )\mathrel {\stackrel {\mathrm {def} }{=}} \operatorname {E} \left}

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 μ 1 , , 2 λ ( x μ ) = ( σ i j σ k σ 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 λ } {\displaystyle \left\{1,\ldots ,2\lambda \right\}} 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 [ 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}&\operatorname {E} \\={}&\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} \\&{}+\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} \\&{}+\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} \\&{}+\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} \\&{}+\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} +\operatorname {E} \operatorname {E} \operatorname {E} .\end{aligned}}}

This yields ( 2 λ 1 ) ! 2 λ 1 ( λ 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 λ (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 λ ] {\displaystyle } 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 σ i i 2 E [ X i 3 X j ] = 3 σ i i σ i j E [ X i 2 X j 2 ] = σ i i σ j j + 2 σ i j 2 E [ X i 2 X j X k ] = σ i i σ j k + 2 σ i j σ i k E [ X i X j X k X n ] = σ i j σ k n + σ i k σ j n + σ i n σ j k . {\displaystyle {\begin{aligned}\operatorname {E} \left&=3\sigma _{ii}^{2}\\\operatorname {E} \left&=3\sigma _{ii}\sigma _{ij}\\\operatorname {E} \left&=\sigma _{ii}\sigma _{jj}+2\sigma _{ij}^{2}\\\operatorname {E} \left&=\sigma _{ii}\sigma _{jk}+2\sigma _{ij}\sigma _{ik}\\\operatorname {E} \left&=\sigma _{ij}\sigma _{kn}+\sigma _{ik}\sigma _{jn}+\sigma _{in}\sigma _{jk}.\end{aligned}}}

where σ 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} , and then one simplifies this accordingly. For example, for E [ X i 2 X k X n ] {\displaystyle \operatorname {E} } , one lets Xi = Xj and one uses the fact that σ i i = σ i 2 {\displaystyle \sigma _{ii}=\sigma _{i}^{2}} .

Functions of a normal vector

a: Probability density of a function cos x 2 {\displaystyle \cos x^{2}} of a single normal variable x {\displaystyle x} with μ = 2 {\displaystyle \mu =-2} and σ = 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 μ = ( 1 , 2 ) {\displaystyle {\boldsymbol {\mu }}=(1,2)} , and covariance Σ = [ .01 .016 .016 .04 ] {\displaystyle \mathbf {\Sigma } ={\begin{bmatrix}.01&.016\\.016&.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 μ = ( 2 , 5 ) {\displaystyle {\boldsymbol {\mu }}=(-2,5)} , and covariance Σ = [ 10 7 7 10 ] {\displaystyle \mathbf {\Sigma } ={\begin{bmatrix}10&-7\\-7&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.

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. The direction of a normal vector follows a projected normal distribution.

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

Likelihood function

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 ( | Σ | ) + ( x μ ) Σ 1 ( x μ ) + k ln ( 2 π ) ] {\displaystyle \ln L({\boldsymbol {x}})=-{\frac {1}{2}}\left} ,

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 ( | Σ | ) ( z μ ) Σ 1 ( z μ ) k ln ( π ) {\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.

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

Differential entropy

The differential entropy of the multivariate normal distribution is

h ( f ) = f ( x ) ln f ( x ) d x = 1 2 ln | 2 π e Σ | = k 2 + k 2 ln 2 π + 1 2 ln | Σ | {\displaystyle {\begin{aligned}h\left(f\right)&=-\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }\cdots \int _{-\infty }^{\infty }f(\mathbf {x} )\ln f(\mathbf {x} )\,d\mathbf {x} \\&={\frac {1}{2}}\ln {}\left|2\pi e{\boldsymbol {\Sigma }}\right|={\frac {k}{2}}+{\frac {k}{2}}\ln {}2\pi +{\frac {1}{2}}\ln {}\left|{\boldsymbol {\Sigma }}\right|\\\end{aligned}}} ,

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

The Kullback–Leibler divergence from N 1 ( μ 1 , Σ 1 ) {\displaystyle {\mathcal {N}}_{1}({\boldsymbol {\mu }}_{1},{\boldsymbol {\Sigma }}_{1})} to N 0 ( μ 0 , Σ 0 ) {\displaystyle {\mathcal {N}}_{0}({\boldsymbol {\mu }}_{0},{\boldsymbol {\Sigma }}_{0})} , for non-singular matrices Σ1 and Σ0, is:

D KL ( N 0 N 1 ) = 1 2 { tr ( Σ 1 1 Σ 0 ) + ( μ 1 μ 0 ) T Σ 1 1 ( μ 1 μ 0 ) k + ln | Σ 1 | | Σ 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 | | {\displaystyle |\cdot |} denotes the matrix determinant, t r ( ) {\displaystyle tr(\cdot )} is the trace, l n ( ) {\displaystyle ln(\cdot )} is the natural logarithm and 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 μ 1 = μ 0 {\displaystyle {\boldsymbol {\mu }}_{1}={\boldsymbol {\mu }}_{0}} ,

D KL ( N 0 N 1 ) = 1 2 { tr ( Σ 1 1 Σ 0 ) k + ln | Σ 1 | | Σ 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

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, Σ 1 {\displaystyle {\boldsymbol {\Sigma }}_{1}} is a diagonal matrix with the diagonal entries of Σ 0 {\displaystyle {\boldsymbol {\Sigma }}_{0}} , and μ 1 = μ 0 {\displaystyle {\boldsymbol {\mu }}_{1}={\boldsymbol {\mu }}_{0}} . The resulting formula for mutual information is:

I ( X ) = 1 2 ln | ρ 0 | , {\displaystyle I({\boldsymbol {X}})=-{1 \over 2}\ln |{\boldsymbol {\rho }}_{0}|,}

where ρ 0 {\displaystyle {\boldsymbol {\rho }}_{0}} is the correlation matrix constructed from Σ 0 {\displaystyle {\boldsymbol {\Sigma }}_{0}} .

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

I ( x ; y ) = 1 2 ln ( 1 ρ 2 ) . {\displaystyle I(x;y)=-{1 \over 2}\ln(1-\rho ^{2}).}

Joint normality

Normally distributed and independent

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, ρ = 0 {\displaystyle \rho =0} ).

Two normally distributed random variables need not be jointly bivariate normal

See also: normally distributed and uncorrelated does not imply independent

The fact that two random variables X {\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 | > c {\displaystyle |X|>c} and Y = X {\displaystyle Y=-X} if | X | < c {\displaystyle |X|<c} , where c > 0 {\displaystyle c>0} . There are similar counterexamples for more than two random variables. In general, they sum to a mixture model.

Correlations and independence

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

Conditional distributions

If N-dimensional x is partitioned as follows

x = [ 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 μ and Σ are partitioned as follows

μ = [ μ 1 μ 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}}}
Σ = [ Σ 11 Σ 12 Σ 21 Σ 22 ]  with sizes  [ q × q q × ( N q ) ( N q ) × q ( N q ) × ( N q ) ] {\displaystyle {\boldsymbol {\Sigma }}={\begin{bmatrix}{\boldsymbol {\Sigma }}_{11}&{\boldsymbol {\Sigma }}_{12}\\{\boldsymbol {\Sigma }}_{21}&{\boldsymbol {\Sigma }}_{22}\end{bmatrix}}{\text{ with sizes }}{\begin{bmatrix}q\times q&q\times (N-q)\\(N-q)\times q&(N-q)\times (N-q)\end{bmatrix}}}

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

μ ¯ = μ 1 + Σ 12 Σ 22 1 ( a μ 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

Σ ¯ = Σ 11 Σ 12 Σ 22 1 Σ 21 . {\displaystyle {\overline {\boldsymbol {\Sigma }}}={\boldsymbol {\Sigma }}_{11}-{\boldsymbol {\Sigma }}_{12}{\boldsymbol {\Sigma }}_{22}^{-1}{\boldsymbol {\Sigma }}_{21}.}

Here Σ 22 1 {\displaystyle {\boldsymbol {\Sigma }}_{22}^{-1}} is the generalized inverse of Σ 22 {\displaystyle {\boldsymbol {\Sigma }}_{22}} . The matrix Σ ¯ {\displaystyle {\overline {\boldsymbol {\Sigma }}}} is the Schur complement of Σ22 in Σ. That is, the equation above is equivalent to inverting the overall covariance matrix, dropping the rows and columns corresponding to the variables being conditioned upon, and inverting back to get the conditional covariance matrix.

Note that knowing that 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 ( a μ 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 ( μ 1 , Σ 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 Σ 12 Σ 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 Σ12Σ22 is known as the matrix of regression coefficients.

Bivariate case

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

X 1 X 2 = a     N ( μ 1 + σ 1 σ 2 ρ ( a μ 2 ) , ( 1 ρ 2 ) σ 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 ρ {\displaystyle \rho } is the correlation coefficient between X 1 {\displaystyle X_{1}} and X 2 {\displaystyle X_{2}} .

Bivariate conditional expectation

In the general case
( X 1 X 2 ) N ( ( μ 1 μ 2 ) , ( σ 1 2 ρ σ 1 σ 2 ρ σ 1 σ 2 σ 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}&\rho \sigma _{1}\sigma _{2}\\\rho \sigma _{1}\sigma _{2}&\sigma _{2}^{2}\end{pmatrix}}\right)}

The conditional expectation of X1 given X2 is:

E ( X 1 X 2 = x 2 ) = μ 1 + ρ σ 1 σ 2 ( x 2 μ 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
( X 1 X 2 ) N ( ( 0 0 ) , ( 1 ρ ρ 1 ) ) {\displaystyle {\begin{pmatrix}X_{1}\\X_{2}\end{pmatrix}}\sim {\mathcal {N}}\left({\begin{pmatrix}0\\0\end{pmatrix}},{\begin{pmatrix}1&\rho \\\rho &1\end{pmatrix}}\right)}

The conditional expectation of X1 given X2 is

E ( X 1 X 2 = x 2 ) = ρ 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 ρ 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:

E ( X 1 X 2 < z ) = ρ φ ( z ) Φ ( z ) , {\displaystyle \operatorname {E} (X_{1}\mid X_{2}<z)=-\rho {\varphi (z) \over \Phi (z)},}
E ( X 1 X 2 > z ) = ρ φ ( z ) ( 1 Φ ( z ) ) , {\displaystyle \operatorname {E} (X_{1}\mid X_{2}>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 ) = ρ x 2 {\displaystyle \operatorname {E} (X_{1}\mid X_{2}=x_{2})=\rho x_{2}} , so that

E ( X 1 X 2 < z ) = ρ E ( X 2 X 2 < z ) {\displaystyle \operatorname {E} (X_{1}\mid X_{2}<z)=\rho E(X_{2}\mid X_{2}<z)} and then using the properties of the expectation of a truncated normal distribution.

Marginal distributions

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

Example

Let X = be multivariate normal random variables with mean vector μ = and covariance matrix Σ (standard parametrization for multivariate normal distributions). Then the joint distribution of X′ = is multivariate normal with mean vector μ′ = and covariance matrix Σ = [ Σ 11 Σ 13 Σ 31 Σ 33 ] {\displaystyle {\boldsymbol {\Sigma }}'={\begin{bmatrix}{\boldsymbol {\Sigma }}_{11}&{\boldsymbol {\Sigma }}_{13}\\{\boldsymbol {\Sigma }}_{31}&{\boldsymbol {\Sigma }}_{33}\end{bmatrix}}} .

Affine transformation

If Y = c + BX is an affine transformation of X   N ( μ , Σ ) , {\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 + and variance BΣB i.e., Y N ( c + B μ , B Σ 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), 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&0&0&0&0&\ldots &0\\0&1&0&0&0&\ldots &0\\0&0&0&1&0&\ldots &0\end{bmatrix}}}

which extracts the desired elements directly.

Another corollary is that the distribution of 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 μ , b T Σ 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}&b_{2}&\ldots &b_{n}\end{bmatrix}}=\mathbf {b} ^{\rm {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

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. 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 Σ {\displaystyle {\boldsymbol {\Sigma }}} . The squared relative lengths of the principal axes are given by the corresponding eigenvalues.

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

X   N ( μ , Σ ) X   μ + U Λ 1 / 2 N ( 0 , I ) X   μ + U N ( 0 , Λ ) . {\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 }}).}

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 Λ, 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ΛU 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."

In one dimension the probability of finding a sample of the normal distribution in the interval μ ± σ {\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.

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

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 π ) k | Σ | exp ( 1 2 ( x μ ) T Σ 1 ( x μ ) ) {\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

Σ ^ = 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} }})^{\mathrm {T} }}

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

E [ Σ ^ ] = n 1 n Σ . {\displaystyle E\left={\frac {n-1}{n}}{\boldsymbol {\Sigma }}.}

An unbiased sample covariance is

Σ ^ = 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} (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 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 W 1 {\displaystyle {\mathcal {W}}^{-1}} . Suppose then that n observations have been made

X = { x 1 , , x n } N ( μ , Σ ) {\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 ( μ , Σ ) = p ( μ Σ )   p ( Σ ) , {\displaystyle p({\boldsymbol {\mu }},{\boldsymbol {\Sigma }})=p({\boldsymbol {\mu }}\mid {\boldsymbol {\Sigma }})\ p({\boldsymbol {\Sigma }}),}

where

p ( μ Σ ) N ( μ 0 , m 1 Σ ) , {\displaystyle p({\boldsymbol {\mu }}\mid {\boldsymbol {\Sigma }})\sim {\mathcal {N}}({\boldsymbol {\mu }}_{0},m^{-1}{\boldsymbol {\Sigma }}),}

and

p ( Σ ) W 1 ( Ψ , n 0 ) . {\displaystyle p({\boldsymbol {\Sigma }})\sim {\mathcal {W}}^{-1}({\boldsymbol {\Psi }},n_{0}).}

Then

p ( μ Σ , X ) N ( n x ¯ + m μ 0 n + m , 1 n + m Σ ) , p ( Σ X ) W 1 ( Ψ + n S + n m n + m ( x ¯ μ 0 ) ( x ¯ μ 0 ) , n + n 0 ) , {\displaystyle {\begin{array}{rcl}p({\boldsymbol {\mu }}\mid {\boldsymbol {\Sigma }},\mathbf {X} )&\sim &{\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} )&\sim &{\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

x ¯ = 1 n i = 1 n x i , S = 1 n i = 1 n ( x i x ¯ ) ( x i x ¯ ) . {\displaystyle {\begin{aligned}{\bar {\mathbf {x} }}&={\frac {1}{n}}\sum _{i=1}^{n}\mathbf {x} _{i},\\\mathbf {S} &={\frac {1}{n}}\sum _{i=1}^{n}(\mathbf {x} _{i}-{\bar {\mathbf {x} }})(\mathbf {x} _{i}-{\bar {\mathbf {x} }})'.\end{aligned}}}

Multivariate normality tests

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

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

Σ ^ = 1 n j = 1 n ( x j x ¯ ) ( x j x ¯ ) T A = 1 6 n i = 1 n j = 1 n [ ( x i x ¯ ) T Σ ^ 1 ( x j x ¯ ) ] 3 B = n 8 k ( k + 2 ) { 1 n i = 1 n [ ( x i x ¯ ) T Σ ^ 1 ( x i x ¯ ) ] 2 k ( k + 2 ) } {\displaystyle {\begin{aligned}&{\widehat {\boldsymbol {\Sigma }}}={1 \over n}\sum _{j=1}^{n}\left(\mathbf {x} _{j}-{\bar {\mathbf {x} }}\right)\left(\mathbf {x} _{j}-{\bar {\mathbf {x} }}\right)^{\mathrm {T} }\\&A={1 \over 6n}\sum _{i=1}^{n}\sum _{j=1}^{n}\left^{3}\\&B={\sqrt {\frac {n}{8k(k+2)}}}\left\{{1 \over n}\sum _{i=1}^{n}\left^{2}-k(k+2)\right\}\end{aligned}}}

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 ) {\displaystyle (50\leq n<400)} , the parameters of the asymptotic distribution of the kurtosis statistic are modified For small sample tests ( n < 50 {\displaystyle n<50} ) empirical critical values are used. Tables of critical values for both statistics are given by Rencher 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.

The BHEP test computes the norm of the difference between the empirical characteristic function and the theoretical characteristic function of the normal distribution. Calculation of the norm is performed in the L(μ) space of square-integrable functions with respect to the Gaussian weighting function μ β ( t ) = ( 2 π β 2 ) k / 2 e | t | 2 / ( 2 β 2 ) {\displaystyle \mu _{\beta }(\mathbf {t} )=(2\pi \beta ^{2})^{-k/2}e^{-|\mathbf {t} |^{2}/(2\beta ^{2})}} . The test statistic is

T β = R k | 1 n j = 1 n e i t T Σ ^ 1 / 2 ( x j x ) ¯ e | t | 2 / 2 | 2 μ β ( t ) d t = 1 n 2 i , j = 1 n e β 2 2 ( x i x j ) T Σ ^ 1 ( x i x j ) 2 n ( 1 + β 2 ) k / 2 i = 1 n e β 2 2 ( 1 + β 2 ) ( x i x ¯ ) T Σ ^ 1 ( x i x ¯ ) + 1 ( 1 + 2 β 2 ) k / 2 {\displaystyle {\begin{aligned}T_{\beta }&=\int _{\mathbb {R} ^{k}}\left|{1 \over n}\sum _{j=1}^{n}e^{i\mathbf {t} ^{\mathrm {T} }{\widehat {\boldsymbol {\Sigma }}}^{-1/2}(\mathbf {x} _{j}-{\bar {\mathbf {x} )}}}-e^{-|\mathbf {t} |^{2}/2}\right|^{2}\;{\boldsymbol {\mu }}_{\beta }(\mathbf {t} )\,d\mathbf {t} \\&={1 \over n^{2}}\sum _{i,j=1}^{n}e^{-{\beta ^{2} \over 2}(\mathbf {x} _{i}-\mathbf {x} _{j})^{\mathrm {T} }{\widehat {\boldsymbol {\Sigma }}}^{-1}(\mathbf {x} _{i}-\mathbf {x} _{j})}-{\frac {2}{n(1+\beta ^{2})^{k/2}}}\sum _{i=1}^{n}e^{-{\frac {\beta ^{2}}{2(1+\beta ^{2})}}(\mathbf {x} _{i}-{\bar {\mathbf {x} }})^{\mathrm {T} }{\widehat {\boldsymbol {\Sigma }}}^{-1}(\mathbf {x} _{i}-{\bar {\mathbf {x} }})}+{\frac {1}{(1+2\beta ^{2})^{k/2}}}\end{aligned}}}

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

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

Classification into multivariate normal classes

Left: Classification of seven multivariate normal classes. Coloured ellipses are 1 sd error ellipses. Black marks the boundaries between the classification regions. p e {\displaystyle p_{e}} is the probability of total classification error. Right: the error matrix. p i j {\displaystyle p_{ij}} is the probability of classifying a sample from normal i {\displaystyle i} as j {\displaystyle j} . These are computed by the numerical method of ray-tracing (Matlab code).

Gaussian Discriminant Analysis

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

Computational methods

Drawing values from the distribution

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

  1. Find any real matrix A such that AA = Σ. When Σ is positive-definite, the Cholesky decomposition is typically used, and the extended form of this decomposition can always be used (as the covariance matrix may be only positive semi-definite) in both cases a suitable matrix A is obtained. An alternative is to use the matrix A = obtained from a spectral decomposition Σ = UΛU of Σ. The former approach is more computationally straightforward but the matrices A change for different orderings of the elements of the random vector, while the latter approach gives matrices that are related by simple re-orderings. In theory both approaches give equally good ways of determining a suitable matrix A, but there are differences in computation time.
  2. Let z = (z1, ..., zN) 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

References

  1. ^ Lapidoth, Amos (2009). A Foundation in Digital Communication. Cambridge University Press. ISBN 978-0-521-19395-5.
  2. Gut, Allan (2009). An Intermediate Course in Probability. Springer. ISBN 978-1-441-90161-3.
  3. Kac, M. (1939). "On a characterization of the normal distribution". American Journal of Mathematics. 61 (3): 726–728. doi:10.2307/2371328. JSTOR 2371328.
  4. Sinz, Fabian; Gerwinn, Sebastian; Bethge, Matthias (2009). "Characterization of the p-generalized normal distribution". Journal of Multivariate Analysis. 100 (5): 817–820. doi:10.1016/j.jmva.2008.07.006.
  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. Kim, M. G. (2000). "Multivariate outliers and decompositions of Mahalanobis distance". Communications in Statistics – Theory and Methods. 29 (7): 1511–1526. doi:10.1080/03610920008832559.
  7. Hamedani, G. G.; Tata, M. N. (1975). "On the determination of the bivariate normal distribution from distributions of linear combinations of the variables". The American Mathematical Monthly. 82 (9): 913–915. doi:10.2307/2318494. JSTOR 2318494.
  8. Wyatt, John (November 26, 2008). "Linear least mean-squared error estimation" (PDF). Lecture notes course on applied probability. Archived from the original (PDF) on October 10, 2015. Retrieved 23 January 2012.
  9. "linear algebra - Mapping between affine coordinate function". Mathematics Stack Exchange. Retrieved 2022-06-24.
  10. Rao, C. R. (1973). Linear Statistical Inference and Its Applications. New York: Wiley. pp. 527–528. ISBN 0-471-70823-2.
  11. ^ Botev, Z. I. (2016). "The normal law under linear restrictions: simulation and estimation via minimax tilting". Journal of the Royal Statistical Society, Series B. 79: 125–148. arXiv:1603.04166. Bibcode:2016arXiv160304166B. doi:10.1111/rssb.12162. S2CID 88515228.
  12. Genz, Alan (2009). Computation of Multivariate Normal and t Probabilities. Springer. ISBN 978-3-642-01689-9.
  13. ^ Bensimhoun Michael, N-Dimensional Cumulative Function, And Other Useful Facts About Gaussians and Normal Densities (2006)
  14. Siotani, Minoru (1964). "Tolerance regions for a multivariate normal population" (PDF). Annals of the Institute of Statistical Mathematics. 16 (1): 135–153. doi:10.1007/BF02868568. S2CID 123269490.
  15. ^ Botev, Z. I.; Mandjes, M.; Ridder, A. (6–9 December 2015). "Tail distribution of the maximum of correlated Gaussian random variables". 2015 Winter Simulation Conference (WSC). Huntington Beach, Calif., USA: IEEE. pp. 633–642. doi:10.1109/WSC.2015.7408202. hdl:10419/130486. ISBN 978-1-4673-9743-8.
  16. Adler, R. J.; Blanchet, J.; Liu, J. (7–10 Dec 2008). "Efficient simulation for tail probabilities of Gaussian random fields". 2008 Winter Simulation Conference (WSC). Miami, Fla., USA: IEEE. pp. 328–336. doi:10.1109/WSC.2008.4736085. ISBN 978-1-4244-2707-9.{{cite conference}}: CS1 maint: date and year (link)
  17. ^ Das, Abhranil; Wilson S Geisler (2020). "Methods to integrate multinormals and compute classification measures". arXiv:2012.14331 .
  18. Hernandez-Stumpfhauser, Daniel; Breidt, F. Jay; van der Woerd, Mark J. (2017). "The General Projected Normal Distribution of Arbitrary Dimension: Modeling and Bayesian Inference". Bayesian Analysis. 12 (1): 113–133. doi:10.1214/15-BA989.
  19. Tong, T. (2010) Multiple Linear Regression : MLE and Its Distributional Results Archived 2013-06-16 at WebCite, Lecture Notes
  20. Gokhale, DV; Ahmed, NA; Res, BC; Piscataway, NJ (May 1989). "Entropy Expressions and Their Estimators for Multivariate Distributions". IEEE Transactions on Information Theory. 35 (3): 688–692. doi:10.1109/18.30996.
  21. Duchi, J. "Derivations for Linear Algebra and Optimization" (PDF): 13. {{cite journal}}: Cite journal requires |journal= (help)
  22. MacKay, David J. C. (2003-10-06). Information Theory, Inference and Learning Algorithms (Illustrated ed.). Cambridge: Cambridge University Press. ISBN 978-0-521-64298-9.
  23. Holt, W.; Nguyen, D. (2023). "Essential Aspects of Bayesian Data Imputation". SSRN 4494314. {{cite journal}}: Cite journal requires |journal= (help)
  24. Eaton, Morris L. (1983). Multivariate Statistics: a Vector Space Approach. John Wiley and Sons. pp. 116–117. ISBN 978-0-471-02776-8.
  25. Jensen, J (2000). Statistics for Petroleum Engineers and Geoscientists. Amsterdam: Elsevier. p. 207. ISBN 0-444-50552-0.
  26. Maddala, G. S. (1983). Limited Dependent and Qualitative Variables in Econometrics. Cambridge University Press. ISBN 0-521-33825-5.
  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. Nikolaus Hansen (2016). "The CMA Evolution Strategy: A Tutorial" (PDF). arXiv:1604.00772. Bibcode:2016arXiv160400772H. Archived from the original (PDF) on 2010-03-31. Retrieved 2012-01-07.
  29. Daniel Wollschlaeger. "The Hoyt Distribution (Documentation for R package 'shotGroups' version 0.6.2)".
  30. Wang, Bin; Shi, Wenzhong; Miao, Zelang (2015-03-13). Rocchini, Duccio (ed.). "Confidence Analysis of Standard Deviational Ellipse and Its Extension into Higher Dimensional Euclidean Space". PLOS ONE. 10 (3): e0118537. Bibcode:2015PLoSO..1018537W. doi:10.1371/journal.pone.0118537. ISSN 1932-6203. PMC 4358977. PMID 25769048.
  31. ^ Holt, W.; Nguyen, D. (2023). "Introduction to Bayesian Data Imputation". SSRN 4494314. {{cite journal}}: Cite journal requires |journal= (help)
  32. Cox, D. R.; Small, N. J. H. (1978). "Testing multivariate normality". Biometrika. 65 (2): 263. doi:10.1093/biomet/65.2.263.
  33. Smith, S. P.; Jain, A. K. (1988). "A test to determine the multivariate normality of a data set". IEEE Transactions on Pattern Analysis and Machine Intelligence. 10 (5): 757. doi:10.1109/34.6789.
  34. Friedman, J. H.; Rafsky, L. C. (1979). "Multivariate Generalizations of the Wald–Wolfowitz and Smirnov Two-Sample Tests". The Annals of Statistics. 7 (4): 697. doi:10.1214/aos/1176344722.
  35. Mardia, K. V. (1970). "Measures of multivariate skewness and kurtosis with applications". Biometrika. 57 (3): 519–530. doi:10.1093/biomet/57.3.519.
  36. Rencher (1995), pages 112–113.
  37. Rencher (1995), pages 493–495.
  38. Baringhaus, L.; Henze, N. (1991). "Limit distributions for measures of multivariate skewness and kurtosis based on projections". Journal of Multivariate Analysis. 38: 51–69. doi:10.1016/0047-259X(91)90031-V.
  39. ^ Baringhaus, L.; Henze, N. (1988). "A consistent test for multivariate normality based on the empirical characteristic function". Metrika. 35 (1): 339–348. doi:10.1007/BF02613322. S2CID 122362448.
  40. Henze, Norbert (2002). "Invariant tests for multivariate normality: a critical review". Statistical Papers. 43 (4): 467–506. doi:10.1007/s00362-002-0119-6. S2CID 122934510.
  41. Gentle, J. E. (2009). Computational Statistics. Statistics and Computing. New York: Springer. pp. 315–316. doi:10.1007/978-0-387-98144-4. ISBN 978-0-387-98143-7.

Literature

Probability distributions (list)
Discrete
univariate
with finite
support
with infinite
support
Continuous
univariate
supported on a
bounded interval
supported on a
semi-infinite
interval
supported
on the whole
real line
with support
whose type varies
Mixed
univariate
continuous-
discrete
Multivariate
(joint)
Directional
Univariate (circular) directional
Circular uniform
Univariate von Mises
Wrapped normal
Wrapped Cauchy
Wrapped exponential
Wrapped asymmetric Laplace
Wrapped Lévy
Bivariate (spherical)
Kent
Bivariate (toroidal)
Bivariate von Mises
Multivariate
von Mises–Fisher
Bingham
Degenerate
and singular
Degenerate
Dirac delta function
Singular
Cantor
Families
Statistics
Descriptive statistics
Continuous data
Center
Dispersion
Shape
Count data
Summary tables
Dependence
Graphics
Data collection
Study design
Survey methodology
Controlled experiments
Adaptive designs
Observational studies
Statistical inference
Statistical theory
Frequentist inference
Point estimation
Interval estimation
Testing hypotheses
Parametric tests
Specific tests
Goodness of fit
Rank statistics
Bayesian inference
Correlation
Regression analysis
Linear regression
Non-standard predictors
Generalized linear model
Partition of variance
Categorical / Multivariate / Time-series / Survival analysis
Categorical
Multivariate
Time-series
General
Specific tests
Time domain
Frequency domain
Survival
Survival function
Hazard function
Test
Applications
Biostatistics
Engineering statistics
Social statistics
Spatial statistics
Categories: