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

Correlation

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