TOPICS
Search

Spearman Rank Correlation Coefficient


The Spearman rank correlation coefficient, often shortened to Spearman rank correlation and also called Spearman's rho, is a nonparametric (distribution-free) rank statistic proposed by Spearman in 1904 as a measure of the strength of the monotone association between two variables (Lehmann and D'Abrera 1998). The coefficient is commonly denoted rho_s, while r_s is also used for its sample value. It can be used to give an R-estimate and is useful when the distribution of the data makes Pearson's correlation coefficient undesirable or misleading.

For a sample of N pairs, let R_i and S_i be the statistical ranks of the two components of pair i, with respective means R^_ and S^_. The sample Spearman rank correlation coefficient is the Pearson correlation coefficient of these ranks,

 r_s=(sum_(i=1)^(N)(R_i-R^_)(S_i-S^_))/(sqrt(sum_(i=1)^(N)(R_i-R^_)^2sum_(i=1)^(N)(S_i-S^_)^2)).
(1)

If there are no tied statistical ranks and d_i=R_i-S_i, this simplifies exactly to

 r_s=1-(6sum_(i=1)^(N)d_i^2)/(N(N^2-1)).
(2)

When ties occur, the Pearson correlation coefficient of the statistical ranks remains the definition, while the shortcut formula must be replaced by a tie-corrected form.

Under the null hypothesis of independent identically distributed observation pairs with independent continuous coordinates, r_s has mean 0. Its variance, kurtosis excess, and odd standardized moments include

sigma^2=1/(N-1)
(3)
gamma_2=-(114)/(25N)-6/(5N^2)-...
(4)
gamma_3=gamma_5=...=0.
(5)

Student was the first to obtain the variance.

For the paired positions of two independent centered random walks, rank dependence within each path changes this behavior. Assume that each random walk has independent identically distributed increments with a continuous distribution and positive finite variance. Xie and Zhu (2026) proved that the sample coefficient converges in distribution to a nondegenerate Brownian occupation functional with variance approximately 0.222. Thus it does not converge in probability to zero, and the usual independent-observation Student t calibration rejects process independence with probability tending to one at every fixed nominal significance level between 0 and 1.


See also

Correlation Coefficient, Least Squares Fitting, Linear Regression, Statistical Rank

Explore with Wolfram|Alpha

References

Hogg, R. V. and Craig, A. T. Introduction to Mathematical Statistics, 5th ed. New York: Macmillan, pp. 338 and 400, 1995.Lehmann, E. L. and D'Abrera, H. J. M. Nonparametrics: Statistical Methods Based on Ranks, rev. ed. Englewood Cliffs, NJ: Prentice-Hall, pp. 292, 300, and 323, 1998.Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 634-637, 1992.Xie, Z. and Zhu, L. "Nonsense Rank Correlations Between Independent Random Walks." 16 Nov 2026. https://arxiv.org/abs/2611.20572.

Referenced on Wolfram|Alpha

Spearman Rank Correlation Coefficient

Cite this as:

Weisstein, Eric W. "Spearman Rank Correlation Coefficient." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/SpearmanRankCorrelationCoefficient.html

Subject classifications