Covariance

Covariance[v1, v2]
gives the covariance between the vectors and .

Covariance[m]
gives the covariance matrix for the matrix m.

Covariance[m1, m2]
gives the covariance matrix for the matrices and .

Covariance[dist]
gives the covariance matrix for the multivariate symbolic distribution dist.

Covariance[dist, i, j]
gives the ^(th) covariance for the multivariate symbolic distribution dist.

DetailsDetails

  • Covariance[v1, v2] gives the unbiased estimate of the covariance between and .
  • The lists and must be the same length.
  • Covariance[v1, v2] is equivalent to (v1-Mean[v1]). Conjugate[v2-Mean[v2]]/(Length[v1]-1).
  • 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[m1, m2] is a × matrix of the covariances between columns of and columns of .
  • Covariance works with SparseArray objects.
  • Covariance[dist, i, j] gives Expectation[(xi-i)(xj-j), {x1, x2, ...}dist], where is the i^(th) component of the mean of dist.
  • Covariance[dist] gives a covariance matrix with the ^(th) entry given by Covariance[dist, i, j].
New in 6 | Last modified in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »