Relate › Correlation

Spearman's ρ

Spearman's ρ measures rank correlation between two variables, capturing any monotonic association rather than only a linear one — the standard non-parametric alternative to Pearson.

What is Spearman's ρ?

Spearman's ρ is just Pearson's r computed on the *ranks* of the data. By replacing values with their ranks before correlating, it strips out scale and shape information and asks only "does y tend to increase / decrease as x increases?". This makes it robust to outliers and free of any distributional assumptions for inference.

ρ = 1 ⇔ y is a strictly monotonic increasing function of x (perfect concordance of ranks); ρ = −1 ⇔ strictly monotonic decreasing. A non-linear but monotonic relationship like y = x³ has Pearson r < 1 but Spearman ρ = 1.

Less efficient than Pearson on truly bivariate-normal data (~91% efficiency), but the trade-off is essentially always worth it for ordinal data, heavy-tailed data, or data with outliers.

When should I use Spearman's ρ?

  • One or both variables ordinal (Likert, severity grades, ranks).
  • Continuous data with skew, heavy tails, or outliers — Pearson misleads here.
  • Monotonic but non-linear relationships.
  • Kendall's τ is often preferred over Spearman for small n or many ties (see corr_kendall).

What data does it need?

Two numeric or ordinal columns.

What does it report?

ρ, S statistic, p, 95% CI via Bonett-Wright Fisher-z.

What does it assume?

  • Independent paired observations.
  • Outcomes at least ordinal (rank-able).
  • Monotonic relationship (otherwise ρ still computes but has no clean interpretation).

Formula

ρ = 1 − 6 · Σ dᵢ² / (n · (n² − 1)) when there are no ties, dᵢ = rank(xᵢ) − rank(yᵢ)

How do I interpret the result?

Same Cohen anchors as Pearson (0.1 / 0.3 / 0.5) but read as ordinal-rank concordance, not linear variance shared.

Big gap between Pearson r and Spearman ρ on the same data ⇒ the relationship is curved (or outliers are driving the Pearson estimate). Plot to confirm.

See also

References

  • Spearman (1904). The proof and measurement of association between two things. American Journal of Psychology 15(1).