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

# Correlation

 Correlation gives the correlation between the vectors and . Correlation[m]gives the correlation matrix for the matrix m. Correlationgives the correlation matrix for the matrices and . Correlation[dist]gives the correlation matrix for the multivariate symbolic distribution dist. Correlationgives the correlation for the multivariate symbolic distribution dist.
• Correlation gives Pearson's correlation coefficient between and .
• The lists and must be the same length.
• For a matrix m with columns, Correlation[m] is a × matrix of the correlations between columns of m.
• For an × matrix and an × matrix , Correlation is a × matrix of the correlations between columns of and columns of .
Correlation between two vectors:
Real values:
Correlation matrix for a matrix:
Real values:
Correlation matrix for two matrices:
Real values:
Correlation between two vectors:
 Out[1]=
Real values:
 Out[2]=

Correlation matrix for a matrix:
 Out[1]=
Real values:
 Out[2]=

Correlation matrix for two matrices:
 Out[1]//MatrixForm=
Real values:
 Out[2]=
 Scope   (4)
Correlations for machine-precision reals:
Use arbitrary precision:
Find the covariance between vectors of complexes:
Compute the correlation matrix for a SparseArray:
 Applications   (1)
Compute the correlation between two financial time series:
A correlation matrix is a covariance matrix scaled by standard deviations:
The diagonal elements of a correlation matrix are equal to 1: