gives the correlation between the vectors v1 and v2.
gives the sample correlation matrix for observations in matrix m.
gives the correlation matrix for the matrices m1 and m2.
gives the correlation matrix for the multivariate symbolic distribution dist.
gives the (i,j) correlation for the multivariate symbolic distribution dist.
- Correlation[v1,v2] gives Pearson's correlation coefficient between v1 and v2.
- The lists v1 and v2 must be the same length.
- Correlation[v1,v2] is equivalent to Covariance[v1,v2]/(StandardDeviation[v1]StandardDeviation[v2]).
- For a matrix m with columns, Correlation[m] is a × matrix of the correlations between columns of m.
- For an × matrix m1 and an × matrix m2, Correlation[m1,m2] is a × matrix of the correlations between columns of m1 and columns of m2.
- Correlation works with SparseArray objects.
- Correlation[dist,i,j] gives Covariance[dist,i,j]/(σi σj), where σi is the i component of the standard deviation of dist.
- Correlation[dist] gives a correlation matrix with the (i,j) entry given by Correlation[dist,i,j].
Examplesopen allclose all
Basic Examples (3)
Distributions and Processes (5)
Correlation matrix for TemporalData at times and :
Properties & Relations (7)
CorrelationFunction for a process is the off-diagonal entry in the correlation matrix:
Wolfram Research (2007), Correlation, Wolfram Language function, https://reference.wolfram.com/language/ref/Correlation.html (updated 2010).
Wolfram Language. 2007. "Correlation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/Correlation.html.
Wolfram Language. (2007). Correlation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Correlation.html