Rank Correlation: When Numbers Have No Numbers
Imagine you're a teacher with two judges who ranked 10 students in a talent contest. Judge A gave ranks 1 to 10; Judge B did the same. You want to know: Do these two judges agree? You can't use the usual Pearson correlation because the "marks" are just ranks — 1st, 2nd, 3rd… — not actual scores like 85/100. The numbers themselves have no units, no spacing. A rank of 2 is simply "better than 3" and "worse than 1."
This is where Rank Correlation enters. It measures the strength and direction of association between two sets of rankings. It answers: If one judge ranks a student high, does the other judge also rank that student high?
The Formula (Spearman's Rank Correlation Coefficient)
The standard measure you will use is Spearman's rank correlation coefficient, denoted by the Greek letter ρ (rho) or sometimes rₛ. The formula is:
ρ=1−n(n2−1)6∑di2
Where:
- n = number of items (students, cities, products, etc.) being ranked.
- di = the difference between the two ranks assigned to the i-th item. For each item, you calculate: di=RankA−RankB.
- ∑di2 = sum of the squares of all those differences.
The value of ρ always lies between -1 and +1.
- +1 means perfect agreement (both judges gave exactly the same ranks).
- -1 means perfect disagreement (one judge's rank 1 is the other's rank 10, rank 2 is rank 9, etc.).
- 0 means no association — the rankings are completely unrelated.
Why Does This Matter in Economics?
Economics is full of situations where you have ordinal data — data that can be ordered but not measured precisely. You cannot calculate an average rank, but you can ask: Are these two rankings related?
Example 1: Quality of Life vs. Cost of Living
Suppose you rank 8 Indian cities by "quality of life" (1 = best) and also by "cost of living" (1 = most expensive). You want to know: Do people pay more for a better life? Rank correlation gives you the answer. If ρ is close to +1, expensive cities tend to have better quality of life. If it's close to 0, there's no clear link.
Example 2: Exam Performance vs. Family Income
You rank 12 students by their board exam marks and also by their family income. A high positive ρ would suggest that richer students tend to score higher — a finding that might point to inequality in educational access.
Example 3: Consumer Preferences
A company asks 10 consumers to rank 5 brands of soap from most to least preferred. Then the same consumers rank the same brands by "price." Rank correlation tells the company whether people prefer expensive brands (positive ρ) or cheap ones (negative ρ).
How to Calculate It (Step by Step)
Let's take a small example. Five students (A, B, C, D, E) are ranked by two teachers:
| Student | Teacher 1 Rank | Teacher 2 Rank |
|---|
| A | 1 | 2 |
| B | 2 | 1 |
| C | 3 | 4 |
| D | 4 | 3 |
| E | 5 | 5 |
Step 1: Find the difference di for each student.
- A: d=1−2=−1
- B: d=2−1=1
- C: d=3−4=−1
- D: d=4−3=1
- E: d=5−5=0
Step 2: Square each difference.
- A: (−1)2=1
- B: 12=1
- C: (−1)2=1
- D: 12=1
- E: 02=0
Step 3: Sum the squared differences.
∑di2=1+1+1+1+0=4
Step 4: Plug into the formula. Here n=5.
ρ=1−5(25−1)6×4=1−5×2424=1−12024=1−0.2=0.8 …