This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Covariance

Updated In 8 Graphic
Covariance
gives the covariance between the vectors and .
Covariance[m]
gives the covariance matrix for the matrix m.
Covariance
gives the covariance matrix for the matrices and .
Covariance[dist]
gives the covariance matrix for the multivariate symbolic distribution dist.
Covariance
gives the ^(th) 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:
In[1]:=
Click for copyable input
Out[1]=
 
Covariance matrix for a matrix:
In[1]:=
Click for copyable input
Out[1]//MatrixForm=
 
Covariance matrix for two matrices:
In[1]:=
Click for copyable input
Out[1]//MatrixForm=
Covariances for machine-precision reals:
Use arbitrary precision:
Find the covariance between vectors of complexes:
Compute the covariance of a SparseArray:
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:
New in 6 | Last modified in 8