Math 2.0

Statistics Definition

Spearman's rank correlation coefficient

Builds on Correlation coefficientCumulative distribution function

Definition

Let (x1,y1),…,(xn,yn)(x_1, y_1), \dots, (x_n, y_n) be n≥2n \ge 2 pairs of real numbers, with x1,…,xnx_1, \dots, x_n distinct and y1,…,yny_1, \dots, y_n distinct. Let rir_i be the rank of xix_i among x1,…,xnx_1, \dots, x_n and sis_i the rank of yiy_i among y1,…,yny_1, \dots, y_n, with rank 11 for the smallest. Spearman's rank correlation coefficient is the sample correlation coefficient of the pairs (ri,si)(r_i, s_i). With di=ri−sid_i = r_i - s_i it equals ρs=1−6∑i=1ndi2n(n2−1).\rho_s = 1 - \frac{6 \sum_{i=1}^{n} d_i^2}{n(n^2 - 1)}.

Remarks

The closed formula holds because the ranks of each variable are the numbers 1,…,n1, \dots, n, whose mean and variance are known. For random variables XX and YY with continuous distribution functions FF and GG, the population version is the correlation of F(X)F(X) and G(Y)G(Y), which equals 12 E[F(X)G(Y)]−312 \, E[F(X) G(Y)] - 3.

Example: x=(1,2,3)x = (1, 2, 3) and y=(1,3,2)y = (1, 3, 2). The ranks are r=(1,2,3)r = (1, 2, 3) and s=(1,3,2)s = (1, 3, 2), so d=(0,−1,1)d = (0, -1, 1) and ρs=1−6⋅2/(3⋅8)=1/2\rho_s = 1 - 6 \cdot 2 / (3 \cdot 8) = 1/2. For y=(1,4,9)y = (1, 4, 9) instead, d=0d = 0 and ρs=1\rho_s = 1.

Non-example: for data with ties, such as y=(1,1,2)y = (1, 1, 2), the ranks are not defined by the clause above. The usual fix gives tied values the average of their ranks and takes the Pearson correlation; the formula with ∑di2\sum d_i^2 is then no longer exact.

The Kendall rank correlation coefficient is another rank correlation, based on pairs of observations.

Reading path

To understand this page from the ground up, read these 55 pages in order. The foundations come first.

  1. Construction of the reals from Cauchy sequences concept
  2. Element definition
  3. Integers object
  4. Ordered field definition
  5. Proposition concept
  6. Random experiment concept
  7. Rational numbers object
  8. Real numbers object
  9. Set bounded above definition
  10. Set definition
  11. Ring of integers statement
  12. Disjunction definition
  13. Implication definition
  14. Predicate definition
  15. Supremum definition
  16. Ordered pair definition
  17. Union definition
  18. Sample space definition
  19. The rationals form a field statement
  20. Existential quantifier definition
  21. Universal quantifier definition
  22. Completeness axiom statement
  23. Cartesian product definition
  24. Subset definition
  25. The rationals form an ordered field statement
  26. Uniqueness quantifier definition
  27. Existence of square roots of nonnegative reals statement
  28. Binary relation definition
  29. Universal set definition
  30. Order on the reals definition
  31. Power set definition
  32. Square root definition
  33. Complement definition
  34. Function definition
  35. Interval definition
  36. Injective function definition
  37. Preimage of a set definition
  38. Sigma-algebra definition
  39. Countable set definition
  40. Event definition
  41. Borel sigma-algebra definition
  42. Probability axioms concept
  43. Probability measure definition
  44. Probability distribution definition
  45. Probability space definition
  46. Random variable definition
  47. Cumulative distribution function definition
  48. Discrete random variable definition
  49. Random variable with a density definition
  50. Expected value definition
  51. Variance definition
  52. Covariance definition
  53. Standard deviation definition
  54. Correlation coefficient definition
  55. Spearman's rank correlation coefficient definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient
About this page
TagM092V97ZET
URIm2://M092V97ZET
Kinddefinition
WritingW0 stub
MSC62H20, 62G10
DefinesSpearman's rank correlation coefficient
UsesCorrelation coefficient, Cumulative distribution function

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.