Spearman's Rank Correlation Coefficient
What you'll learn: How to measure monotonic relationships between variables by computing correlation on their ranks instead of raw values.
What Is Spearman's Rank Correlation?
Pearson correlation (r) measures linear relationships, but what if your data follows a curved pattern that's consistently increasing or decreasing? That's where Spearman's rank correlation coefficient (ρ, pronounced "rho") comes in.
Spearman's method works by first ranking your data points (smallest to largest), then calculating Pearson correlation on those ranks. This captures monotonic relationships—where one variable consistently increases as the other increases (positive monotonic) or consistently decreases (negative monotonic)—even if the relationship isn't a straight line.
Why Use Ranks?
Think of a competition: the actual scores might be 45, 78, and 150, but the rankings are simply 1st, 2nd, and 3rd. By converting to ranks, you:
- Remove the influence of outliers (the difference between 78 and 150 becomes just one rank step)
- Capture non-linear monotonic patterns (a curved upward trend still gets positive correlation)
- Work with ordinal data (survey ratings like "good, better, best")
How It Works
- Rank each variable separately from smallest to largest
- Apply Pearson's correlation formula to the ranks
- Interpret ρ the same way: values near +1 (strong positive monotonic), near -1 (strong negative monotonic), or near 0 (weak/no monotonic relationship)
When to Choose Spearman Over Pearson
Use Spearman when:
- Your relationship is monotonic but not linear
- Your data has outliers that skew Pearson's r
- You're working with ordinal (ranked) data
- Normality assumptions don't hold
Key Takeaway: Spearman's rank correlation measures monotonic relationships by correlating ranks instead of raw values, making it robust to outliers and suitable for non-linear but consistent patterns.