You are reading the 2026 curriculum (exams up to November 2026). Sitting in February 2027 or later? Go to the 2027 Quantitative Methods guide.
Spearman rank correlation: the nonparametric test
Rank each variable, find the difference d in ranks for each observation, and compute rₛ = 1 − 6Σd² ÷ [n(n² − 1)]. Because it uses ranks, it is not thrown by outliers and needs no normality. Test it against a Spearman table for small samples, or with the usual t formula when n is above 30.
Before this: Hypothesis Testing, Statistical Measures of Asset Returns
On the exam
- Explain parametric and nonparametric tests of the hypothesis that the population correlation coefficient equals zero, and determine whether the hypothesis is rejected at a given level of significance
Explain the Spearman rank correlation test and determine whether to reject H₀: ρ = 0. Expect to compute rₛ from a sum of squared rank differences, and to pick Spearman over the parametric test when data are ranks, skewed or full of outliers.
How deeply to learn each part
- Know the idea
- Understand it in general. It frames other topics, but you will not calculate with it.
- Use it
- Understand it well enough to solve a question with it. Recognize when it applies.
- Memorize
- Learn it by heart. The exam will not give it to you.
You know this one. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still do.
You tested strong here. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still know it.
What is the Spearman rank correlation?
It is the correlation of the rank positions of two variables rather than of their values. If the highest value of X always goes with the highest value of Y, the ranks agree perfectly and the coefficient is +1. If they are exactly reversed it is −1.
The Spearman rank correlation coefficient is the main nonparametric test of correlation. It makes no assumption that the data are normally distributed.
How do you compute it?
Rank both variables the same way, take the difference between each pair of ranks, square the differences and sum them.
Rearranged, the formula gives the sum of squared differences from a known .
For 10 paired rankings, the sum of squared rank differences is 16. The Spearman rank correlation is closest to:
1 − 6 × 16 ÷ (10 × 99) = 0.903
Spearman correlation, rₛ0.903
- 1−(6×16÷(10×(10x²−1)))=
x² square
- 6ENTER16×10ENTERENTER×1−×÷CHS1+
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
Try this 0 of 3
- Add the outlier and compare Pearson's r with r_s
- Rank the agency cost the other way (highest first)
- Edit values until r_s = 1 and check Pearson's r
Ranking direction for the agency cost
| Fund | X | Y | Rank X | Rank Y | d | d² |
|---|---|---|---|---|---|---|
| A | 1 | 2 | −1 | 1 | ||
| B | 2 | 1 | +1 | 1 | ||
| C | 3 | 4 | −1 | 1 | ||
| D | 4 | 3 | +1 | 1 | ||
| E | 5 | 6 | −1 | 1 | ||
| F | 6 | 5 | +1 | 1 | ||
| G | 7 | 8 | −1 | 1 | ||
| H | 8 | 10 | −2 | 4 | ||
| I | 9 | 7 | +2 | 4 | ||
| J | 10 | 9 | +1 | 1 | ||
| Σd² | 16 | |||||
Values: Pearson r 0.881
Ranks: r_s 0.903
Σd² = 16, so r_s = 1 − 6 × 16 ÷ 990 = 0.903. The two cost measures put the funds in almost the same order.
Show working
1. Rank X (lowest expense ratio = 1): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.
2. Rank Y the same way (lowest = 1): 2, 1, 4, 3, 6, 5, 8, 10, 7, 9.
3. d = rank X − rank Y: −1, +1, −1, +1, −1, +1, −1, −2, +2, +1. Σd² = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 4 + 4 + 1 = 16.
4. r_s = 1 − 6Σd² ÷ [n(n² − 1)] = 1 − 6 × 16 ÷ [10 × (10² − 1)] = 1 − 96 ÷ 990 = 0.9030.
Test of H₀: ρ = 0. With n = 10 (small), compare r_s with a Spearman critical value from a table; the question gives it. For n above 30 use t = r_s√(n − 2) ÷ √(1 − r_s²); here, for illustration, t = 5.95 against 2.306 (df 8, 5% two-tailed).
Pearson's r on the raw values is 0.881: it uses the size of every gap, so one extreme value can move it a lot.
- 1−(6×16÷(10×(10x²−1)))=r_s = 0.9030
- 0.90303×8√x÷(1−0.90303x²)√x=t = 5.95
x² square · √x square root
- 6ENTER16×10ENTER10ENTER×1−×÷CHS1+r_s = 0.9030
- 0.90303ENTER8g√x×1ENTER0.90303ENTER×−g√x÷t = 5.95
ENTER enter (on the HP, puts the number on the stack) · CHS change sign · g blue shift key · √x square root
Common slips: dropping the 6 or the “1 −”, and using n² instead of n² − 1.
How do you test whether rₛ is significant?
It depends on the sample size. With a small sample, compare with a critical value from a Spearman table, which the question will supply. With a large sample (n above 30), use the same t-statistic as the parametric test, with degrees of freedom.
The ten-fund example has , so in practice you would use a Spearman table. Applied purely for practice, the same formula with the unrounded gives , far beyond 2.306 at 8 degrees of freedom.
When should you choose Spearman?
Choose it when the parametric test’s assumptions are doubtful: the data are ranks or ordinal grades, one extreme observation would dominate Pearson’s , or the variables are clearly non-normal.
- Parametric t-test Memorize Pearson r on the actual values
- Both variables roughly normal no extreme outliers
- More powerful when its assumptions hold
-
- Spearman rank test Memorize rₛ on the ranks
- Data are ranks or ordinal fund rankings, credit grades
- Outliers or non-normal data ranks tame them
- Critical value small n: Spearman table; n above 30: t formula
-
The cost is power. When both variables really are close to normal, the parametric test is more likely to detect a true correlation.
Exam tip If a question mentions rankings, grades or “an extreme month”, the answer is Spearman. If it says “approximately normal” and gives return data, it is the parametric test.
Go deeper Ties and monotonic relationships
When two observations of the same variable tie, give each the average of the ranks they would have occupied. Two values tied for third and fourth place both get 3.5. Heavy ties make the simple formula slightly inexact, but the exam avoids them. Spearman measures a monotonic relationship: one variable consistently rising as the other rises, even along a curve. A perfectly curved but always rising relationship has while Pearson’s is below 1.
Memorize this
MemorizeSpearman in four steps
| Step | Action |
|---|---|
| 1 | Rank (best to worst, or the reverse) |
| 2 | Rank the same way; ties share the average rank |
| 3 | = rank − rank ; square and sum |
| 4 |
Memory hook "1 minus 6 d-squared over n times n-squared-minus-one." If every rank matches, Σd² = 0 and rₛ = 1.
Know it cold Small sample: use the Spearman table the question gives. n > 30: use the t formula with df.
- Parametric t-test Memorize Pearson r on the actual values
- Both variables roughly normal no extreme outliers
- More powerful when its assumptions hold
-
- Spearman rank test Memorize rₛ on the ranks
- Data are ranks or ordinal fund rankings, credit grades
- Outliers or non-normal data ranks tame them
- Critical value small n: Spearman table; n above 30: t formula
-
Quick example
8 pairs of rankings with Σd² = 14. rₛ = 1 − 6 × 14 ÷ (8 × 63) = 1 − 84 ÷ 504 = 0.833.
- 1−(6×14÷(8×(8x²−1)))= 0.8333
x² square
- 6ENTER14×8ENTERENTER×1−×÷CHS1+ 0.8333
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
Quick example
rₛ = 0.45 from 40 pairs. t = 0.45 × √38 ÷ √(1 − 0.2025) = 3.11, against a critical value of 2.024.
- 0.45×38√x÷(1−0.45x²)√x= 3.1063
√x square root · x² square
- 0.45ENTER38g√x×1ENTER0.45ENTER×−g√x÷ 3.1063
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
How it is asked
-
Compute rₛ from Σd²
12 paired rankings, Σd² = 40. Spearman correlation?
1 − 6 × 40 ÷ (12 × 143) = 0.86. Omitting the 6 gives 0.98, omitting the "1 −" gives 0.14.
-
Which test fits the data?
15 funds ranked by two consultants.
Ranked data: Spearman. Roughly normal returns with no outliers favor the parametric test.
-
Large-sample test
rₛ = 0.45, n = 40, critical value 2.024.
n > 30, so t = 0.45 × √38 ÷ √(1 − 0.2025) = 3.11: reject H₀.
Exam traps
- Forgetting the 6 or the 1 − in the formula.
- Using n² instead of n² − 1 in the denominator.
- Ranking the two variables in opposite directions.
- Using the Spearman formula on raw values instead of ranks.
Checkpoint
4 exam-style questions. About 90 seconds each.
1For 12 paired rankings, the sum of squared rank differences is 40. The Spearman rank correlation is closest to:
2Which situation most favors the Spearman test over the parametric test of correlation?
3Compared with the parametric test of correlation, the Spearman test is least likely to be affected by:
4A researcher computes a Spearman rank correlation of 0.45 from 40 pairs of observations. The critical value at the 5% level is 2.024. The t-statistic and the conclusion are closest to:
Key takeaways
- rₛ = 1 − 6Σd² ÷ [n(n² − 1)], computed on ranks.
- Use Spearman for ranks, outliers and non-normal data.
- Large n (above 30): test with the t formula. Small n: a Spearman table.
Quick example
8 pairs of rankings with Σd² = 14. rₛ = 1 − 6 × 14 ÷ (8 × 63) = 1 − 84 ÷ 504 = 0.833.
- 1−(6×14÷(8×(8x²−1)))= 0.8333
x² square
- 6ENTER14×8ENTERENTER×1−×÷CHS1+ 0.8333
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
Quick example
rₛ = 0.45 from 40 pairs. t = 0.45 × √38 ÷ √(1 − 0.2025) = 3.11, against a critical value of 2.024.
- 0.45×38√x÷(1−0.45x²)√x= 3.1063
√x square root · x² square
- 0.45ENTER38g√x×1ENTER0.45ENTER×−g√x÷ 3.1063
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
Questions about this lesson?
Where this comes back
- Simple Linear Regression Quantitative Methods
- Portfolio Risk and Return: Part I Portfolio Construction
- Market Efficiency Equity Investments
Questions candidates ask
What is the Spearman rank correlation coefficient?
It is the correlation of the ranks of two variables instead of their raw values. It equals 1 − 6Σd² ÷ [n(n² − 1)], where d is the difference between each observation's two ranks. It ranges from −1 to +1 like Pearson's r.
When should you use Spearman instead of Pearson correlation?
Use Spearman when the data are ranks, when outliers would dominate Pearson's r, or when the variables are clearly non-normal. It also picks up consistent relationships that are not straight lines. The price is lower power when the parametric assumptions do hold.
How do you test Spearman's rank correlation for significance?
For small samples, compare rₛ with a Spearman critical value from a table the question supplies. When n is above 30, use t = rₛ√(n − 2) ÷ √(1 − rₛ²) with n − 2 degrees of freedom, exactly as in the parametric test.
Spotted an error? Tell us and we will fix it.