In
probability theory and
statistics
Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional (
univariate)
normal distribution
In statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable. The general form of its probability density function is
:
f(x) = \frac e^
The parameter \mu ...
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 variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
s each of which clusters around a mean value.
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
There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value (magnitude and sign) of a given data set.
For a data set, the ''arithme ...
:
and
covariance matrix
In probability theory and statistics, a covariance matrix (also known as auto-covariance matrix, dispersion matrix, variance matrix, or variance–covariance matrix) is a square matrix giving the covariance between each pair of elements of ...
:
such that
and
. The
inverse
Inverse or invert may refer to:
Science and mathematics
* Inverse (logic), a type of conditional sentence which is an immediate inference made from another conditional sentence
* Additive inverse (negation), the inverse of a number that, when ad ...
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
.
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.
[
]
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 .[
Formally:
Here the ]covariance matrix
In probability theory and statistics, a covariance matrix (also known as auto-covariance matrix, dispersion matrix, variance matrix, or variance–covariance matrix) is a square matrix giving the covariance between each pair of elements of ...
is .
In the degenerate
Degeneracy, degenerate, or degeneration may refer to:
Arts and entertainment
* ''Degenerate'' (album), a 2010 album by the British band Trigger the Bloodshed
* Degenerate art, a term adopted in the 1920s by the Nazi Party in Germany to descr ...
case where the covariance matrix is singular
Singular may refer to:
* Singular, the grammatical number that denotes a unit quantity, as opposed to the plural and other forms
* Singular homology
* SINGULAR, an open source Computer Algebra System (CAS)
* Singular or sounder, a group of boar, ...
, the corresponding distribution has no density; see the section below for details. This case arises frequently in statistics
Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
; for example, in the distribution of the vector of residuals in the ordinary least squares
In statistics, ordinary least squares (OLS) is a type of linear least squares method for choosing the unknown parameters in a linear regression model (with fixed level-one effects of a linear function of a set of explanatory variables) by the prin ...
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.
Density function
Non-degenerate case
The multivariate normal distribution is said to be "non-degenerate" when the symmetric covariance matrix
In probability theory and statistics, a covariance matrix (also known as auto-covariance matrix, dispersion matrix, variance matrix, or variance–covariance matrix) is a square matrix giving the covariance between each pair of elements of ...
is positive definite In mathematics, positive definiteness is a property of any object to which a bilinear form or a sesquilinear form may be naturally associated, which is positive-definite. See, in particular:
* Positive-definite bilinear form
* Positive-definite f ...
. In this case the distribution has density
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
In mathematics, an ellipse is a plane curve surrounding two focus (geometry), focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. It generalizes a circle, which is the special ty ...
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 The Mahalanobis distance is a measure of the distance between a point ''P'' and a distribution ''D'', introduced by P. C. Mahalanobis in 1936. Mahalanobis's definition was prompted by the problem of identifying the similarities of skulls based ...
, 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
In statistics, the standard score is the number of standard deviations by which the value of a raw score (i.e., an observed value or data point) is above or below the mean value of what is being observed or measured. Raw scores above the mean ...
. See also Interval below.
Bivariate case
In the 2-dimensional nonsingular case (), the probability density function of a vector is:
where is the correlation
In statistics, correlation or dependence is any statistical relationship, whether causal or not, between two random variables or bivariate data. Although in the broadest sense, "correlation" may indicate any type of association, in statistics ...
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
In mathematics, a set is countable if either it is finite or it can be made in one to one correspondence with the set of natural numbers. Equivalently, a set is ''countable'' if there exists an injective function from it into the natural number ...
distinct linear combinations of and are normal in order to conclude that the vector of is bivariate normal.[
The bivariate iso-density loci plotted in the -plane are ]ellipse
In mathematics, an ellipse is a plane curve surrounding two focus (geometry), focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. It generalizes a circle, which is the special ty ...
s, whose principal axes are defined by the eigenvectors of the covariance matrix (the major and minor semidiameter
In geometry, the semidiameter or semi-diameter of a set of points may be one half of its diameter; or, sometimes, one half of its extent along a particular direction.
Special cases
The semi-diameter of a sphere, circle, or interval is the same ...
s of the ellipse equal the square-root of the ordered eigenvalues).
As the absolute value of the correlation parameter increases, these loci are squeezed toward the following line :
:
This is because this expression, with (where sgn is the Sign function
In mathematics, the sign function or signum function (from '' signum'', Latin for "sign") is an odd mathematical function that extracts the sign of a real number. In mathematical expressions the sign function is often represented as . To avoi ...
) replaced by , is the best linear unbiased prediction of given a value of .[
]
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
In measure theory, a branch of mathematics, the Lebesgue measure, named after French mathematician Henri Lebesgue, is the standard way of assigning a measure to subsets of ''n''-dimensional Euclidean space. For ''n'' = 1, 2, or 3, it coincides wit ...
(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
In Euclidean geometry, an affine transformation or affinity (from the Latin, ''affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles.
More generally, ...
of these selected coordinates.
To talk about densities meaningfully in singular cases, then, we must select a different base measure. Using the disintegration theorem
In mathematics, the disintegration theorem is a result in measure theory and probability theory. It rigorously defines the idea of a non-trivial "restriction" of a measure to a measure zero subset of the measure space in question. It is relate ...
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
In mathematics, and in particular, algebra, a generalized inverse (or, g-inverse) of an element ''x'' is an element ''y'' that has some properties of an inverse element but not necessarily all of them. The purpose of constructing a generalized inv ...
, is the rank of and is the pseudo-determinant In linear algebra and statistics, the pseudo-determinant is the product of all non-zero eigenvalues of a square matrix. It coincides with the regular determinant when the matrix is non-singular.
Definition
The pseudo-determinant of a square '' ...
.[
]
Cumulative distribution function
The notion of cumulative distribution function
In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x.
Ev ...
(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 :
:
Though there is no closed form for , there are a number of algorithms that
estimate it numerically
Another way is to define the cdf as the probability that a sample lies inside the ellipsoid determined by its Mahalanobis distance The Mahalanobis distance is a measure of the distance between a point ''P'' and a distribution ''D'', introduced by P. C. Mahalanobis in 1936. Mahalanobis's definition was prompted by the problem of identifying the similarities of skulls based ...
from the Gaussian, a direct generalization of the standard deviation.[Bensimhoun Michael, ''N-Dimensional Cumulative Function, And Other Useful Facts About Gaussians and Normal Densities'' (2006)]
/ref>
In order to compute the values of this function, closed analytic formulae exist,[ 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
In probability theory and statistics, a covariance matrix (also known as auto-covariance matrix, dispersion matrix, variance matrix, or variance–covariance matrix) is a square matrix giving the covariance between each pair of elements of ...
and is the quantile function
In probability and statistics, the quantile function, associated with a probability distribution of a random variable, specifies the value of the random variable such that the probability of the variable being less than or equal to that value equ ...
for probability of the chi-squared distribution with degrees of freedom.[
When the expression defines the interior of an ellipse and the chi-squared distribution simplifies to an ]exponential distribution
In probability theory and statistics, the exponential distribution is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average ...
with mean equal to two (rate equal to half).
Complementary cumulative distribution function (tail distribution)
The complementary cumulative distribution function
In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x.
Ever ...
(ccdf) or the tail distribution
is defined as .
When , then
the ccdf can be written as a probability the maximum of dependent Gaussian variables:[
]
:
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
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
In probability theory and statistics, the generalized chi-squared distribution (or generalized chi-square distribution) is the distribution of a quadratic form of a multinormal variable (normal vector), or a linear combination of different no ...
.
The probability content within any general domain defined by (where is a general function) can be computed using the numerical method of ray-tracing
Matlab code
.
Higher moments
The ''k''th-order moments of x are given by
:
where
The ''k''th-order central moments are as follows
where the sum is taken over all allocations of the set into ''λ'' (unordered) pairs. That is, for a ''k''th central moment, one sums the products of covariances (the expected value ''μ'' is taken to be 0 in the interests of parsimony):
: _1 X_2 X_3 X_4 X_5 X_6
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1. ...
\\ pt= & \operatorname E_1 X_2
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1. I ...
operatorname E_3 X_4
3 (three) is a number, numeral and digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cultural significance in many societie ...
operatorname E_5 X_6
5 (five) is a number, numeral and digit. It is the natural number, and cardinal number, following 4 and preceding 6, and is a prime number. It has attained significance throughout history in part because typical humans have five digits on eac ...
+ \operatorname E_1 X_2
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1. I ...
operatorname E_3 X_5
3 (three) is a number, numeral and digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cultural significance in many societie ...
operatorname E_4 X_6
4 (four) is a number, numeral and digit. It is the natural number following 3 and preceding 5. It is the smallest semiprime and composite number, and is considered unlucky in many East Asian cultures.
In mathematics
Four is the smallest c ...
+ \operatorname E_1 X_2
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1. I ...
operatorname E_3 X_6
3 (three) is a number, numeral (linguistics), numeral and numerical digit, digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cu ...
\operatorname E_4 X_5
4 (four) is a number, numeral (linguistics), numeral and numerical digit, digit. It is the natural number following 3 and preceding 5. It is the smallest semiprime and composite number, and is tetraphobia, considered unlucky in many East Asian c ...
\\ pt& + \operatorname E_1 X_3
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_4operatorname E_5 X_6
5 (five) is a number, numeral and digit. It is the natural number, and cardinal number, following 4 and preceding 6, and is a prime number. It has attained significance throughout history in part because typical humans have five digits on eac ...
+ \operatorname E_1 X_3
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_5operatorname E_4 X_6
4 (four) is a number, numeral and digit. It is the natural number following 3 and preceding 5. It is the smallest semiprime and composite number, and is considered unlucky in many East Asian cultures.
In mathematics
Four is the smallest c ...
+ \operatorname E_1 X_3
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_6\operatorname E_4 X_5
4 (four) is a number, numeral (linguistics), numeral and numerical digit, digit. It is the natural number following 3 and preceding 5. It is the smallest semiprime and composite number, and is tetraphobia, considered unlucky in many East Asian c ...
\\ pt& + \operatorname E_1 X_4
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_3operatorname E_5 X_6
5 (five) is a number, numeral and digit. It is the natural number, and cardinal number, following 4 and preceding 6, and is a prime number. It has attained significance throughout history in part because typical humans have five digits on eac ...
+ \operatorname E_1 X_4
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_5operatorname E_3 X_6
3 (three) is a number, numeral (linguistics), numeral and numerical digit, digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cu ...
\operatorname E_1 X_4
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_6\operatorname E_3 X_5
3 (three) is a number, numeral and digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cultural significance in many societie ...
\\ pt& + \operatorname E_1 X_5
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_3operatorname E_4 X_6
4 (four) is a number, numeral and digit. It is the natural number following 3 and preceding 5. It is the smallest semiprime and composite number, and is considered unlucky in many East Asian cultures.
In mathematics
Four is the smallest c ...
+ \operatorname E_1 X_5
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_4operatorname E_3 X_6
3 (three) is a number, numeral (linguistics), numeral and numerical digit, digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cu ...
+ \operatorname E_1 X_5
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit (measurement), unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment ...
operatorname E _2 X_6\operatorname E_3 X_4
3 (three) is a number, numeral and digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cultural significance in many societie ...
\\ pt& + \operatorname E_1 X_6
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1 ...
operatorname E _2 X_3operatorname E_4 X_5
4 (four) is a number, numeral (linguistics), numeral and numerical digit, digit. It is the natural number following 3 and preceding 5. It is the smallest semiprime and composite number, and is tetraphobia, considered unlucky in many East Asian c ...
+ \operatorname E_1 X_6
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1 ...
operatorname E _2 X_4operatorname E_3 X_5
3 (three) is a number, numeral and digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cultural significance in many societie ...
+ \operatorname E_1 X_6
1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1 ...
\operatorname E _2 X_5operatorname E_3 X_4
3 (three) is a number, numeral and digit. It is the natural number following 2 and preceding 4, and is the smallest odd prime number and the only prime preceding a square number. It has religious or cultural significance in many societie ...
\end
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 terms, and for eighth-order moments there are terms.
The covariances are then determined by replacing the terms of the list 1 ones, then ''r''2 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 ''k''th moment with ''k'' different ''X'' variables, X_i^2 X_k X_n
X, or x, is the twenty-fourth and third-to-last letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''"ex"'' (pronounced ), ...
/math>, one lets and one uses the fact that \sigma_ = \sigma_i^2.
Functions of a normal vector
A quadratic form
In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example,
:4x^2 + 2xy - 3y^2
is a quadratic form in the variables and . The coefficients usually belong to a ...
of a normal vector \boldsymbol, q(\boldsymbol) = \boldsymbol' \mathbf \boldsymbol + \boldsymbol' \boldsymbol + q_0 (where \mathbf is a matrix, \boldsymbol is a vector, and q_0 is a scalar), is a generalized chi-squared variable. [
If f(\boldsymbol) is a general scalar-valued function of a normal vector, its probability density function, ]cumulative distribution function
In probability theory and statistics, the cumulative distribution function (CDF) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x.
Ev ...
, and inverse cumulative distribution function
In probability and statistics, the quantile function, associated with a probability distribution of a random variable, specifies the value of the random variable such that the probability of the variable being less than or equal to that value equ ...
can be computed with the numerical method of ray-tracing
Matlab code
.
Likelihood function
If the mean and covariance matrix are known, the log likelihood of an observed vector \boldsymbol is simply the log of the probability density function:
:\ln L (\boldsymbol)= -\frac \left \boldsymbol\Sigma, \,) + (\boldsymbol-\boldsymbol\mu)'\boldsymbol\Sigma^(\boldsymbol-\boldsymbol\mu) + k\ln(2\pi) \right/math>,
The circularly symmetric version of the noncentral complex case, where \boldsymbol is a vector of complex numbers, would be
:\ln L (\boldsymbol) = -\ln (, \boldsymbol\Sigma, \,) -(\boldsymbol-\boldsymbol\mu)^\dagger\boldsymbol\Sigma^(\boldsymbol-\boldsymbol\mu) -k\ln(\pi)
i.e. with the conjugate transpose (indicated by \dagger) replacing the normal transpose (indicated by '). This is slightly different than in the real case, because the circularly symmetric version of the complex normal distribution has a slightly different form for the normalization constant.
A similar notation is used for multiple linear regression.
Since the log likelihood of a normal vector is a quadratic form
In mathematics, a quadratic form is a polynomial with terms all of degree two ("form" is another name for a homogeneous polynomial). For example,
:4x^2 + 2xy - 3y^2
is a quadratic form in the variables and . The coefficients usually belong to a ...
of the normal vector, it is distributed as a generalized chi-squared variable.[
]
Differential entropy
The differential entropy of the multivariate normal distribution is
:
\begin
h\left(f\right) & = -\int_^\infty \int_^\infty \cdots\int_^\infty f(\mathbf) \ln f(\mathbf)\,d\mathbf,\\
& = \frac12 \ln\left(\left, \left(2\pi e\right)\boldsymbol\Sigma \\right) = \frac12 \ln\left(\left(2\pi e\right)^k \left, \boldsymbol\Sigma \\right) = \frac \ln\left(2\pi e\right) + \frac \ln\left(\left, \boldsymbol\Sigma \\right) = \frac + \frac \ln\left(2\pi \right) + \frac \ln\left(\left, \boldsymbol\Sigma \\right)\\
\end
where the bars denote the matrix determinant
In mathematics, the determinant is a scalar value that is a function of the entries of a square matrix. It characterizes some properties of the matrix and the linear map represented by the matrix. In particular, the determinant is nonzero if an ...
and is the dimensionality of the vector space.
Kullback–Leibler divergence
The Kullback–Leibler divergence from \mathcal_1(\boldsymbol\mu_1, \boldsymbol\Sigma_1) to \mathcal_0(\boldsymbol\mu_0, \boldsymbol\Sigma_0), for non-singular matrices Σ1 and Σ0, is:
:
D_\text(\mathcal_0 \parallel \mathcal_1) = \left\,
where 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 nat
Nat or NAT may refer to:
Computing
* Network address translation (NAT), in computer networking
Organizations
* National Actors Theatre, New York City, U.S.
* National AIDS trust, a British charity
* National Archives of Thailand
* National As ...
s. Dividing the entire expression above by log''e'' 2 yields the divergence in bits.
When \boldsymbol\mu_1 = \boldsymbol\mu_0,
:
D_\text(\mathcal_0 \parallel \mathcal_1) = \left\.
Mutual information
The mutual information of a distribution is a special case of the Kullback–Leibler divergence in which P is the full multivariate distribution and Q is the product of the 1-dimensional marginal distributions. In the notation of the Kullback–Leibler divergence section of this article, \boldsymbol\Sigma_1 is a diagonal matrix with the diagonal entries of \boldsymbol\Sigma_0, and \boldsymbol\mu_1 = \boldsymbol\mu_0. The resulting formula for mutual information is:
:
I(\boldsymbol) = - \ln , \boldsymbol \rho_0 , ,
where \boldsymbol \rho_0 is the correlation matrix
In statistics, correlation or dependence is any statistical relationship, whether causal or not, between two random variables or bivariate data. Although in the broadest sense, "correlation" may indicate any type of association, in statistic ...
constructed from \boldsymbol \Sigma_0.
In the bivariate case the expression for the mutual information is:
:
I(x;y) = - \ln (1 - \rho^2).
Joint normality
Normally distributed and independent
If X and Y are normally distributed and independent, this implies they are "jointly normally distributed", i.e., the pair (X,Y) must have multivariate normal distribution. However, a pair of jointly normally distributed variables need not be independent (would only be so if uncorrelated, \rho = 0 ).
Two normally distributed random variables need not be jointly bivariate normal
The fact that two random variables X and Y both have a normal distribution does not imply that the pair (X,Y) has a joint normal distribution. A simple example is one in which X has a normal distribution with expected value 0 and variance 1, and Y=X if , X, > c and Y=-X if , X, < c, where c > 0. There are similar counterexamples for more than two random variables. In general, they sum to a mixture model.
Correlations and independence
In general, random variables may be uncorrelated but statistically dependent. But if a random vector has a multivariate normal distribution then any two or more of its components that are uncorrelated are independent. This implies that any two or more of its components that are pairwise independent In probability theory, a pairwise independent collection of random variables is a set of random variables any two of which are independent. Any collection of mutually independent random variables is pairwise independent, but some pairwise indepen ...
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
:
\mathbf
=
\begin
\mathbf_1 \\
\mathbf_2
\end
\text\begin q \times 1 \\ (N-q) \times 1 \end
and accordingly ''μ'' and Σ are partitioned as follows
:
\boldsymbol\mu
=
\begin
\boldsymbol\mu_1 \\
\boldsymbol\mu_2
\end
\text\begin q \times 1 \\ (N-q) \times 1 \end
:
\boldsymbol\Sigma
=
\begin
\boldsymbol\Sigma_ & \boldsymbol\Sigma_ \\
\boldsymbol\Sigma_ & \boldsymbol\Sigma_
\end
\text\begin q \times q & q \times (N-q) \\ (N-q) \times q & (N-q) \times (N-q) \end
then the distribution of x1 conditional on x2 = a is multivariate normal where
:
\bar
=
\boldsymbol\mu_1 + \boldsymbol\Sigma_ \boldsymbol\Sigma_^
\left(
\mathbf - \boldsymbol\mu_2
\right)
and covariance matrix
:
\overline
=
\boldsymbol\Sigma_ - \boldsymbol\Sigma_ \boldsymbol\Sigma_^ \boldsymbol\Sigma_.
Here \boldsymbol\Sigma_^ is the generalized inverse
In mathematics, and in particular, algebra, a generalized inverse (or, g-inverse) of an element ''x'' is an element ''y'' that has some properties of an inverse element but not necessarily all of them. The purpose of constructing a generalized inv ...
of \boldsymbol\Sigma_. The matrix \overline is the Schur complement In linear algebra and the theory of matrices, the Schur complement of a block matrix is defined as follows.
Suppose ''p'', ''q'' are nonnegative integers, and suppose ''A'', ''B'', ''C'', ''D'' are respectively ''p'' × ''p'', ''p'' × ''q'', ''q'' ...
of Σ22 in Σ. That is, the equation above is equivalent to inverting the overall covariance matrix, dropping the rows and columns corresponding to the variables being conditioned upon, and inverting back to get the conditional covariance matrix.
Note that knowing that alters the variance, though the new variance does not depend on the specific value of a; perhaps more surprisingly, the mean is shifted by \boldsymbol\Sigma_ \boldsymbol\Sigma_^ \left(\mathbf - \boldsymbol\mu_2 \right); compare this with the situation of not knowing the value of a, in which case x1 would have distribution
\mathcal_q \left(\boldsymbol\mu_1, \boldsymbol\Sigma_ \right).
An interesting fact derived in order to prove this result, is that the random vectors \mathbf_2 and \mathbf_1=\mathbf_1-\boldsymbol\Sigma_\boldsymbol\Sigma_^\mathbf_2 are independent.
The matrix Σ12Σ22−1 is known as the matrix of regression
Regression or regressions may refer to:
Science
* Marine regression, coastal advance due to falling sea level, the opposite of marine transgression
* Regression (medicine), a characteristic of diseases to express lighter symptoms or less extent ( ...
coefficients.
Bivariate case
In the bivariate case where x is partitioned into X_1 and X_2, the conditional distribution of X_1 given X_2 is
: X_1\mid X_2=a \ \sim\ \mathcal\left(\mu_1+\frac\rho( a - \mu_2),\, (1-\rho^2)\sigma_1^2\right).
where \rho is the correlation coefficient between X_1 and X_2.
Bivariate conditional expectation
=In the general case
=
:
\begin
X_1 \\
X_2
\end \sim \mathcal \left( \begin
\mu_1 \\
\mu_2
\end , \begin
\sigma^2_1 & \rho \sigma_1 \sigma_2 \\
\rho \sigma_1 \sigma_2 & \sigma^2_2
\end \right)
The conditional expectation of X1 given X2 is:
: \operatorname(X_1 \mid X_2=x_2) = \mu_1 + \rho \frac(x_2 - \mu_2)
Proof: the result is obtained by taking the expectation of the conditional distribution X_1\mid X_2 above.
=In the centered case with unit variances
=
:
\begin
X_1 \\
X_2
\end \sim \mathcal \left( \begin
0 \\
0
\end , \begin
1 & \rho \\
\rho & 1
\end \right)
The conditional expectation of ''X''1 given ''X''2 is
: \operatorname(X_1 \mid X_2=x_2)= \rho x_2
and the conditional variance is
: \operatorname(X_1 \mid X_2 = x_2) = 1-\rho^2;
thus the conditional variance does not depend on ''x''2.
The conditional expectation of ''X''1 given that ''X''2 is smaller/bigger than ''z'' is:
:
\operatorname(X_1 \mid X_2 < z) = -\rho ,
:
\operatorname(X_1 \mid X_2 > z) = \rho ,
where the final ratio here is called the inverse Mills ratio.
Proof: the last two results are obtained using the result \operatorname(X_1 \mid X_2=x_2)= \rho x_2 , so that
:
\operatorname(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 be multivariate normal random variables with mean vector and covariance matrix Σ (standard parametrization for multivariate normal distributions). Then the joint distribution of is multivariate normal with mean vector and covariance matrix
\boldsymbol\Sigma' =
\begin
\boldsymbol\Sigma_ & \boldsymbol\Sigma_ \\
\boldsymbol\Sigma_ & \boldsymbol\Sigma_
\end
.
Affine transformation
If is an affine transformation
In Euclidean geometry, an affine transformation or affinity (from the Latin, ''affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles.
More generally, ...
of \mathbf\ \sim \mathcal(\boldsymbol\mu, \boldsymbol\Sigma), where c is an M \times 1 vector of constants and B is a constant M \times N matrix, then Y has a multivariate normal distribution with expected value and variance BΣBT i.e., \mathbf \sim \mathcal \left(\mathbf + \mathbf \boldsymbol\mu, \mathbf \boldsymbol\Sigma \mathbf^\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 (''X''1, ''X''2, ''X''4)T, use
:
\mathbf
=
\begin
1 & 0 & 0 & 0 & 0 & \ldots & 0 \\
0 & 1 & 0 & 0 & 0 & \ldots & 0 \\
0 & 0 & 0 & 1 & 0 & \ldots & 0
\end
which extracts the desired elements directly.
Another corollary is that the distribution of , where b is a constant vector with the same number of elements as X and the dot indicates the dot product, is univariate Gaussian with Z\sim\mathcal\left(\mathbf\cdot\boldsymbol\mu, \mathbf^\boldsymbol\Sigma \mathbf\right). This result follows by using
:
\mathbf=\begin
b_1 & b_2 & \ldots & b_n
\end = \mathbf^.
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 ellipsoid
An ellipsoid is a surface that may be obtained from a sphere by deforming it by means of directional scalings, or more generally, of an affine transformation.
An ellipsoid is a quadric surface; that is, a surface that may be defined as the ...
s (i.e. linear 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 \boldsymbol\Sigma. The squared relative lengths of the principal axes are given by the corresponding eigenvalues.
If is an eigendecomposition where the columns of U are unit eigenvectors and Λ is a diagonal matrix of the eigenvalues, then we have
::\mathbf\ \sim \mathcal(\boldsymbol\mu, \boldsymbol\Sigma) \iff \mathbf\ \sim \boldsymbol\mu+\mathbf\boldsymbol\Lambda^\mathcal(0, \mathbf) \iff \mathbf\ \sim \boldsymbol\mu+\mathbf\mathcal(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 Λ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
Singular may refer to:
* Singular, the grammatical number that denotes a unit quantity, as opposed to the plural and other forms
* Singular homology
* SINGULAR, an open source Computer Algebra System (CAS)
* Singular or sounder, a group of boar, ...
. 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
In mathematics, a degenerate case is a limiting case of a class of objects which appears to be qualitatively different from (and usually simpler than) the rest of the class, and the term degeneracy is the condition of being a degenerate case.
T ...
.
"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 \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.
Statistical inference
Parameter estimation
The derivation of the maximum-likelihood
In statistics, maximum likelihood estimation (MLE) is a method of estimating the parameters of an assumed probability distribution, given some observed data. This is achieved by maximizing a likelihood function so that, under the assumed stati ...
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(\mathbf)= \frac \exp\left(- (\mathbf-\boldsymbol\mu)^ \boldsymbol\Sigma^ (-\boldsymbol\mu)\right)
and the ML estimator of the covariance matrix from a sample of ''n'' observations is
:\widehat = \sum_^n (_i-\overline)(_i-\overline)^T
which is simply the sample covariance matrix. This is a biased estimator
In statistics, the bias of an estimator (or bias function) is the difference between this estimator's expected value and the true value of the parameter being estimated. An estimator or decision rule with zero bias is called ''unbiased''. In st ...
whose expectation is
:E\left widehat\right= \frac \boldsymbol\Sigma.
An unbiased sample covariance is
:\widehat = \frac1\sum_^n (\mathbf_i-\overline)(\mathbf_i-\overline)^
= \frac1 \left '\left(I - \frac \cdot J\right) X\right (matrix form; I is the K\times K identity matrix, J is a K \times K matrix of ones; the term in parentheses is thus the 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
In estimation theory and statistics, the Cramér–Rao bound (CRB) expresses a lower bound on the variance of unbiased estimators of a deterministic (fixed, though unknown) parameter, the variance of any such estimator is at least as high as the in ...
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 \mathcal^ . Suppose then that ''n'' observations have been made
:\mathbf = \ \sim \mathcal(\boldsymbol\mu,\boldsymbol\Sigma)
and that a conjugate prior has been assigned, where
:p(\boldsymbol\mu,\boldsymbol\Sigma)=p(\boldsymbol\mu\mid\boldsymbol\Sigma)\ p(\boldsymbol\Sigma),
where
:p(\boldsymbol\mu\mid\boldsymbol\Sigma) \sim\mathcal(\boldsymbol\mu_0,m^\boldsymbol\Sigma) ,
and
:p(\boldsymbol\Sigma) \sim \mathcal^(\boldsymbol\Psi,n_0).
Then,
:
\begin
p(\boldsymbol\mu\mid\boldsymbol\Sigma,\mathbf) & \sim & \mathcal\left(\frac,\frac\boldsymbol\Sigma\right),\\
p(\boldsymbol\Sigma\mid\mathbf) & \sim & \mathcal^\left(\boldsymbol\Psi+n\mathbf+\frac(\bar-\boldsymbol\mu_0)(\bar-\boldsymbol\mu_0)', n+n_0\right),
\end
where
:
\begin
\bar & = \frac\sum_^ \mathbf_i ,\\
\mathbf & = \frac\sum_^ (\mathbf_i - \bar)(\mathbf_i - \bar)' .
\end
Multivariate normality tests
Multivariate normality tests check a given set of data for similarity to the multivariate normal distribution
In statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable. The general form of its probability density function is
:
f(x) = \frac e^
The parameter \mu ...
. 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
Lawrence C. Rafsky (Larry Rafsky), is an American data scientist, inventor, and entrepreneur. Rafsky created search algorithms and methodologies for the financial and news information industries. He is co-inventor of the Friedman-Rafsky Test comm ...
and Jerome Friedman.
Mardia's test[ is based on multivariate extensions of skewness and kurtosis measures. For a sample of ''k''-dimensional vectors we compute
: \begin
& \widehat = \sum_^n \left(\mathbf_j - \bar\right)\left(\mathbf_j - \bar\right)^T \\
& A = \sum_^n \sum_^n \left (\mathbf_i - \bar)^T\;\widehat^ (\mathbf_j - \bar) \right3 \\
& B = \sqrt\left\
\end
Under the null hypothesis of multivariate normality, the statistic ''A'' will have approximately a chi-squared distribution with degrees of freedom, and ''B'' will be approximately standard normal ''N''(0,1).
Mardia's kurtosis statistic is skewed and converges very slowly to the limiting normal distribution. For medium size samples (50 \le n < 400), the parameters of the asymptotic distribution of the kurtosis statistic are modified For small sample tests (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 L2(''μ'') space of square-integrable functions with respect to the Gaussian weighting function \mu_\beta(\mathbf) = (2\pi\beta^2)^ e^. The test statistic is
: \begin
T_\beta &= \int_ \left, \sum_^n e^ - e^ \^2 \; \boldsymbol\mu_\beta(\mathbf) \, d\mathbf \\
&= \sum_^n e^ - \frac\sum_^n e^ + \frac
\end
The limiting distribution of this test statistic is a weighted sum of chi-squared random variables,][ however in practice it is more convenient to compute the sample quantiles using the Monte-Carlo simulations.
A detailed survey of these and other test procedures is available.][
]
Classification into multivariate normal classes

Gaussian Discriminant Analysis
Suppose that observations (which are vectors) are presumed to come from one of several multivariate normal distributions, with known means and covariances. Then any given observation can be assigned to the distribution from which it has the highest probability of arising. This classification procedure is called Gaussian discriminant analysis.
The classification performance, i.e. probabilities of the different classification outcomes, and the overall classification error, can be computed by the numerical method of ray-tracing
Matlab code
.
Computational methods
Drawing values from the distribution
A widely used method for drawing (sampling) a random vector x from the ''N''-dimensional multivariate normal distribution with mean vector μ and covariance matrix
In probability theory and statistics, a covariance matrix (also known as auto-covariance matrix, dispersion matrix, variance matrix, or variance–covariance matrix) is a square matrix giving the covariance between each pair of elements of ...
Σ works as follows:[
# Find any real matrix A such that . When Σ is positive-definite, the Cholesky decomposition is typically used, and the extended form of this decomposition can always be used (as the covariance matrix may be only positive semi-definite) in both cases a suitable matrix A is obtained. An alternative is to use the matrix A = UΛ½ obtained from a spectral decomposition Σ = UΛU−1 of Σ. The former approach is more computationally straightforward but the matrices A change for different orderings of the elements of the random vector, while the latter approach gives matrices that are related by simple re-orderings. In theory both approaches give equally good ways of determining a suitable matrix A, but there are differences in computation time.
# Let be a vector whose components are ''N'' independent standard normal variates (which can be generated, for example, by using the Box–Muller transform).
# Let x be . This has the desired distribution due to the affine transformation property.
]
See also
* Chi distribution, the pdf
Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
of the 2-norm
In mathematics, a norm is a function from a real or complex vector space to the non-negative real numbers that behaves in certain ways like the distance from the origin: it commutes with scaling, obeys a form of the triangle inequality, and is z ...
(Euclidean norm
Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidean s ...
or vector length
In mathematics, a norm is a function from a real or complex vector space to the non-negative real numbers that behaves in certain ways like the distance from the origin: it commutes with scaling, obeys a form of the triangle inequality, and is ze ...
) of a multivariate normally distributed vector (uncorrelated and zero centered).
** Rayleigh distribution, the pdf of the vector length of a bivariate normally distributed vector (uncorrelated and zero centered)
** Rice distribution, the pdf of the vector length of a bivariate normally distributed vector (uncorrelated and non-centered)
** Hoyt distribution, the pdf of the vector length of a bivariate normally distributed vector (correlated and centered)
* Complex normal distribution, an application of bivariate normal distribution
* Copula, for the definition of the Gaussian or normal copula model.
* Multivariate t-distribution, which is another widely used spherically symmetric multivariate distribution.
* Multivariate stable distribution extension of the multivariate normal distribution, when the index (exponent in the characteristic function) is between zero and two.
* Mahalanobis distance The Mahalanobis distance is a measure of the distance between a point ''P'' and a distribution ''D'', introduced by P. C. Mahalanobis in 1936. Mahalanobis's definition was prompted by the problem of identifying the similarities of skulls based ...
* Wishart distribution
In statistics, the Wishart distribution is a generalization to multiple dimensions of the gamma distribution. It is named in honor of John Wishart, who first formulated the distribution in 1928.
It is a family of probability distributions define ...
* Matrix normal distribution
References
Literature
*
*
{{DEFAULTSORT:Multivariate Normal Distribution
Continuous distributions
Multivariate continuous distributions
Normal distribution
Exponential family distributions
Stable distributions