This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# Covariance

 Covariance gives the covariance between the vectors and . Covariance[m]gives the covariance matrix for the matrix m. Covariancegives the covariance matrix for the matrices and . Covariance[dist]gives the covariance matrix for the multivariate symbolic distribution dist. Covariancegives the covariance for the multivariate symbolic distribution dist.
• Covariance gives the unbiased estimate of the covariance between and .
• The lists and must be the same length.
• For a matrix m with columns, Covariance[m] is a × matrix of the covariances between columns of m.
• For an × matrix and an × matrix , Covariance is a × matrix of the covariances between columns of and columns of .
Covariance between two vectors:
Covariance matrix for a matrix:
Covariance matrix for two matrices:
Covariance between two vectors:
 Out[1]=

Covariance matrix for a matrix:
 Out[1]//MatrixForm=

Covariance matrix for two matrices:
 Out[1]//MatrixForm=
 Scope   (4)
Covariances for machine-precision reals:
Use arbitrary precision:
Find the covariance between vectors of complexes:
Compute the covariance of a SparseArray:
 Applications   (1)
Compute the covariance of two financial time series:
The covariance tends to be large only on the diagonal of a random matrix:
The covariance of a list with itself is the variance:
The diagonal of a covariance matrix is the variance:
A covariance matrix scaled by standard deviations is a correlation matrix:
Compute the covariance for a GCD array: