As of Version 9.0, has been renamed to SpearmanRho and is part of the built-in Mathematica kernel.

gives Spearman's rank correlation coefficient for the real-valued vectors xlist and ylist.


  • To use , you first need to load the Multivariate Statistics Package using Needs["MultivariateStatistics`"].
  • Spearman's rank correlation coefficient is a measure of association based on the rank differences between two lists.
  • Spearman's is given by , where n=Length[xlist], is the rank difference between and , is the correction term for ties in xlist, and is the correction term for ties in ylist.
  • The arguments xlist and ylist can be any real-valued vectors of equal length.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Click for copyable input

Spearman's rank correlation for two vectors:

Click for copyable input
New to Mathematica? Find your learning path »
Have a question? Ask support »