Science Fair Project Encyclopedia
Covariance matrix
In statistics, the covariance matrix is a matrix of covariances between elements of a vector. If x is an n-element column vector where μk is the expected value of the kth element of x, or μk = E(xk), then the covariance matrix is defined as:
Note that the diagonal elements are the variances of the elements of x. The (i,i) element of Σ is
- E[(xi - μi)(xi - μi)] = E[(xi - μi)2]
which is the definition of the variance of xi.
| Contents |
Scalar covariance
In statistics, the covariance matrix generalizes the concept of variance from one to n dimensions, or in other words, from scalar-valued random variables to vector-valued random variables (tuples of scalar random variables). If x is a scalar-valued random variable with expected value μ then its variance is
- σ2 = cov(x) = E[(x - μ)2]
Covariance of a vector
If x is an
column vector-valued random variable, then its variance is the
positive semidefinite matrix
The entries in this matrix are the covariances between all the n different scalar components of x.
Since the covariance between a scalar-valued random variable and itself is its variance, it follows that, in particular, the entries on the diagonal of this matrix are the variances of the scalar components of x.
This may appear to be a property of this matrix that depends on which coordinate system is chosen for the space in which the random vector x resides.
However, it is true generally that if u is any unit vector, then the variance of the projection of x on u is
.
(This point is expanded upon somewhat at Talk:Covariance matrix. It is a consequence of an identity that appears below.)
Nomenclatures differ. Some statisticians, following the probabilist William Feller, call this the variance of the random vector x, because it is the natural generalization to higher dimensions of the 1-dimensional variance. Others call it the covariance matrix, because it is the matrix of covariances between the scalar components of the vector x.
Properties
With scalar-valued random variables x, we have the identity
- cov(ax) = a2cov(x)
if a is constant, i.e., not random.
If x is an
column vector-valued random variable and A is an
constant (i.e., non-random) matrix, then Ax is an
column vector-valued random variable, whose variance must therefore be an
matrix.
It is
This covariance matrix (though very simple) is a very useful tool in many very different areas. From it a transformation matrix can be derived that allows one to completely decorrelate the data or, from a different point of view, to find an optimal basis for representing the data in a compact way. This is called principal components analysis (PCA) in statistics and Karhunen-Loève transform (KL-transform) in image processing.
Signal processing notation
In signal processing, the correlation matrix of a vector x is denoted
,
and the covariance matrix is denoted
for real signals. Complex signals involving imaginary numbers requires a slight adjustment to the formula:
where
indicates the conjugate transpose (or the complex conjugate of the transpose).
The relationship between the correlation and covariance matrices can be expressed as
.
Estimation
The derivation of the maximum-likelihood estimator of the covariance matrix of a multivariate normal distribution is perhaps surprisingly subtle.
It involves the spectral theorem and the reason why it can be better to view a scalar as the trace of a
matrix than as a mere scalar.
See estimation of covariance matrices.
External references
- Covariance Matrix at Mathworld
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details


