Spearman Rank Correlation
Linear Correlation — Chapter 5, GSEB Class 12 Statistics
When to Use Rank Correlation
Spearman rank correlation is used when data is available in ranks or order rather than actual numerical values. It is also preferred when the relationship between variables is not linear but monotonic (consistently increasing or decreasing).
Use Spearman When:
- ✓Data is in ranks (1st, 2nd, 3rd...)
- ✓Exact values are unavailable
- ✓Data is qualitative (beauty, intelligence)
- ✓Relationship is monotonic, not linear
Use Pearson When:
- ✗Data is quantitative (actual values)
- ✗Relationship is linear
- ✗Both variables are measured on interval/ratio scale
The Formula
R
Rank correlation
D
Difference between ranks
N
Number of pairs
Worked Example
Two judges rank 5 contestants. Find the rank correlation.
| Individual | Rank X | Rank Y | D | D² |
|---|---|---|---|---|
| A | 1 | 2 | -1 | 1 |
| B | 2 | 1 | 1 | 1 |
| C | 3 | 5 | -2 | 4 |
| D | 4 | 3 | 1 | 1 |
| E | 5 | 4 | 1 | 1 |
| Total | 8 | |||
R = 1 − 6ΣD² / N(N²−1) = 1 − (6 × 8) / (5 × (5² − 1))
= 1 − 48 / 120
R = 0.6000
Moderate positive agreement between the two judges
Handling Tied Ranks
When two or more values are tied (equal), assign the average rank to all tied values.
Tied Ranks Example
If three students score 85 marks (tied for 2nd position), they would occupy ranks 2, 3, 4. Assign average rank = (2 + 3 + 4) / 3 = 3 to each.
Then apply the correction factor to the formula for accuracy.
Key Takeaways
Key Takeaways
- Spearman R = 1 − 6ΣD² / N(N²−1) — used when data is in ranks or order.
- D = difference between ranks of the same individual in two variables.
- Use when exact values are unavailable or data is qualitative (beauty, intelligence).
- Tied ranks: assign average rank to all tied values.
- R is interpreted the same way as Pearson r: close to +1 = strong, close to 0 = weak.
- R satisfies the same properties as r: bounded between −1 and +1, unitless.