Home

covariantiematrix

The covariantiematrix, more commonly called the covariance matrix, is a matrix that summarizes how a set of random variables vary together. It captures the pairwise linear relationships between the components of a random vector and is fundamental in multivariate statistics and data analysis.

Formally, for a random vector X = (X1, ..., Xn) with mean vector mu, the covariance matrix Sigma

In practice, the population covariance is often unknown and estimated from data by the sample covariance matrix.

Applications of the covariantiematrix include principal component analysis, Mahalanobis distance, and multivariate normal modeling. It provides

is
defined
as
Sigma
=
E[(X
-
mu)(X
-
mu)^T].
Equivalently,
Sigma
can
be
written
as
E[XX^T]
-
mu
mu^T.
The
matrix
is
symmetric
(Sigma
=
Sigma^T)
and
positive
semidefinite.
Its
diagonal
entries
are
the
variances
Var(Xi),
and
the
off-diagonal
entries
Cov(Xi,
Xj)
measure
the
covariances
between
different
components.
If
the
variables
are
centered
(mean
zero),
Sigma
=
E[XX^T].
Given
observations
x1,
...,
xn
of
the
vector
X,
the
sample
covariance
is
S
=
(1/(n-1))
sum_k
(xk
-
x_bar)(xk
-
x_bar)^T,
where
x_bar
is
the
sample
mean.
S
is
symmetric
and
positive
semidefinite;
it
is
invertible
if
the
observed
variables
are
linearly
independent.
a
basis
for
understanding
dependence
structure,
performing
dimensionality
reduction,
and
designing
multivariate
statistical
procedures.
A
standardized
version
of
Sigma
yields
the
correlation
matrix,
where
diagonal
entries
are
1
and
off-diagonals
are
correlations.