Spearman Rank Correlation, Tied Ranks and the Scatter Diagram
Updated 17 October 2026 · Fact-checked
Spearman's rank correlation measures association between ranks, useful for qualitative data or small samples: rs = 1 - 6 Sum(D^2) / [n(n^2 - 1)]. For tied ranks, add m(m^2 - 1)/12 to Sum D^2 for each tied group of m items. The scatter diagram plots pairs of values to show the direction and strength of relationship before computing.
A scatter diagram shows direction at a glance; Spearman's formula turns rank differences into a number, here 0.83 for strong agreement.
Illustration drawn for QuestionBuddy.
Understand Spearman Rank Correlation and Scatter Diagram
Scatter diagram. Plot X on the horizontal axis and Y on the vertical axis. Reading: points rising from left to right → positive; falling → negative; closely along a straight line → strong; widely scattered → weak; no pattern → no correlation. It is a quick visual check; it does not give an exact number.
Spearman's rank correlation (r_s). Used when data are ranks or can be ranked (beauty contest, preferences, qualitative attributes) or when the sample is small. Rank each variable (1 for highest or lowest, consistently), find D = difference in ranks, and use
r_s = 1 − [6 ΣD²] ÷ [n(n² − 1)]
Values lie between −1 and +1: +1 identical rankings, −1 completely reversed, 0 no association.
Worked sum (no ties). Two judges rank 6 contestants: Judge 1: 1, 2, 3, 4, 5, 6; Judge 2: 2, 1, 4, 3, 6, 5. D = −1, 1, −1, 1, −1, 1; D² = 1 each; ΣD² = 6. r_s = 1 − (6 × 6) ÷ [6 × (36 − 1)] = 1 − 36 ÷ 210 = 0.83 (a strong agreement).
Tied ranks. When values repeat, each gets the average of the ranks they would have occupied. Example: marks 90, 80, 70, 70, 60 → ranks 1, 2, 3.5, 3.5, 5 (two 70s share ranks 3 and 4). The formula is adjusted by adding m(m² − 1) ÷ 12 to ΣD² for each group of m tied items.
Worked sum (ties). Marks in two tests: Test 1: 60, 70, 70, 80, 90; Test 2: 55, 65, 60, 85, 95. Ranks (highest = 1): Test 1: 5, 3.5, 3.5, 2, 1; Test 2: 5, 3, 4, 2, 1. D = 0, 0.5, −0.5, 0, 0; ΣD² = 0.25 + 0.25 = 0.5. One tied group of m = 2: correction = 2 × (4 − 1) ÷ 12 = 0.5. Adjusted ΣD² = 0.5 + 0.5 = 1.0. r_s = 1 − (6 × 1.0) ÷ (5 × 24) = 1 − 6 ÷ 120 = 0.95.
Advantages and limits. Simple, usable for qualitative data, less affected by extreme values; but loses information about the size of differences and is approximate for tied data and large samples.
Pearson versus Spearman. Pearson uses actual values and measures linear association; Spearman uses ranks and measures agreement in order.
Flow chart: rank both series → D → D² → ΣD² (+ correction for ties) → substitute in the formula → interpret.
Spearman Rank Correlation and Scatter Diagram: key facts
- Spearman
- rs = 1 - 6 Sum D^2 / [n(n^2 - 1)]
- D = rank difference
- Tie correction
- Add m(m^2 - 1)/12 to Sum D^2 per tied group of m
- Average ranks
- Range
- -1 <= rs <= +1
- Pure number
- Check
- Sum of D = 0
- Ranks
How to answer Spearman Rank Correlation and Scatter Diagram questions
Questions give scores or ranks and ask for rs.
- 1Rank both series in the same direction; use average ranks for ties.
- 2Compute D and D² and check ΣD = 0.
- 3Add the tie correction for each group.
- 4Substitute in the formula and interpret.
- 5Compare with Pearson only if actual values are given.
Spearman Rank Correlation and Scatter Diagram in real life
The idea, met in an everyday situation. Answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.
Two judges
Suppose two judges rank six singers and their lists differ slightly.
Find the agreement between the judges.
Try it first, then show the solutionSolution
- Judge 1 ranks 1 to 6; Judge 2: 2, 1, 4, 3, 6, 5.
- D² are all 1, so ΣD² = 6.
- rs = 1 - 6 x 6 / (6 x 35) = 0.83: strong agreement.
Answer: rs = 0.83.
Memory hook: Small gaps mean high rho.
Tricks to remember Spearman Rank Correlation and Scatter Diagram
Short memory aids. Say each one aloud once, then use it on a question the same day.
One minus six D2
rs = 1 - 6 sum D2 / n(n2 - 1).
Use it when: Formula
Average the ranks
Tied items share the average of the ranks.
Use it when: Ties
m cubed minus m over 12
Correction m(m^2 - 1)/12.
Use it when: Correction
Spearman Rank Correlation and Scatter Diagram: solved examples
Ordered from board level to HOTS. Try each one before you open the solution.
Example 1: Rank correlation · 3 marks · Short answerBoard level
Judge 1 ranks: 1, 2, 3, 4, 5, 6; Judge 2: 2, 1, 4, 3, 6, 5. Find rs.
Try it first, then show the solutionSolution
- D = -1, 1, -1, 1, -1, 1; D2 = 1 each, sum 6 (1 mark).
- rs = 1 - 6 x 6 / [6 x (36 - 1)] (1 mark).
- = 1 - 36/210 = 0.83, strong agreement (1 mark).
Answer: 0.83.
Example 2: Tied ranks · 2 marks · Very short answerBoard level
Rank the marks 90, 80, 70, 70, 60 (highest = 1) and give the tie correction.
Try it first, then show the solutionSolution
- Ranks 1, 2, 3.5, 3.5, 5 (1 mark).
- Correction m(m2 - 1)/12 with m = 2 is 2 x 3 / 12 = 0.5 (1 mark).
Answer: 1, 2, 3.5, 3.5, 5; correction 0.5.
Example 3: With ties · 5 marks · Long answerHarder board level
Test 1: 60, 70, 70, 80, 90; Test 2: 55, 65, 60, 85, 95. Find rs after the tie correction.
Try it first, then show the solutionSolution
- Ranks Test 1: 5, 3.5, 3.5, 2, 1; Test 2: 5, 3, 4, 2, 1 (1 mark).
- D = 0, 0.5, -0.5, 0, 0; Sum D2 = 0.5 (1 mark).
- Correction for the pair of 70s = 0.5, adjusted Sum D2 = 1.0 (1 mark).
- rs = 1 - 6 x 1.0 / (5 x 24) (1 mark).
- = 1 - 0.05 = 0.95 (1 mark).
Answer: 0.95.
Example 4: Reading a scatter · 3 marks · Short answerHarder board level
Describe what the scatter diagram would show for (a) rs near +1 (b) rs near -1 (c) rs near 0, for ranks.
Try it first, then show the solutionSolution
- Near +1: points rise in a narrow band (1 mark).
- Near -1: points fall in a narrow band (1 mark).
- Near 0: a shapeless cloud (1 mark).
Answer: Rising band; falling band; cloud.
Example 5: Rank versus Pearson · 5 marks · Long answerHOTS / competency
Marks of five students are X: 10, 20, 30, 40, 100 and Y: 12, 18, 25, 35, 40. Compute the ranks, rs, and explain why rs is little affected by the extreme value 100 while Pearson r would be.
Try it first, then show the solutionSolution
- Ranks of X: 5, 4, 3, 2, 1; of Y: 5, 4, 3, 2, 1 (1 mark).
- All D are 0, so rs = 1 (1 mark).
- Ranks ignore the size of 100 and look only at order (1 mark).
- Pearson r uses actual values, where the extreme value dominates the deviations (1 mark).
- So r would be below 1 (less than perfect) because the relation is not exactly linear, while rs is exactly 1 (1 mark).
Answer: rs = 1; Pearson r differs due to the extreme value.
Where students lose marks in Spearman Rank Correlation and Scatter Diagram
The slips examiners see most often, and what to write instead.
Mistake: Ranking in opposite directions
Inconsistent ranking.
Wrong working
Rank X high first, Y low first.
Right working
Rank both in the same direction.
Do this: Same direction.
Usually costs: 1 mark.
Mistake: Skipping tie correction
Ties ignored.
Wrong working
Use Sum D2 as it is.
Right working
Add m(m2 - 1)/12 per group.
Do this: Correct.
Usually costs: 1 mark.
Mistake: Dividing by n only
Formula slip.
Wrong working
rs = 1 - 6 Sum D2 / n.
Right working
Denominator is n(n2 - 1).
Do this: n(n2 - 1).
Usually costs: 1 mark.
Exam tips
- Check that the rank sum is n(n+1)/2.
- Write D, D2 columns.
- Add tie corrections.
- Interpret sign and size.
Practice questions on Spearman Rank Correlation and Scatter Diagram
Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.
Q1 · 1 mark · MCQBoard level
The rank correlation coefficient is useful when data are
(a) always large (b) qualitative or ranked (c) only in decimals (d) only time seriesHint
Order.
Answer
(b).
Q2 · 1 mark · Assertion-reasonHarder board level
Assertion (A): Tied observations are given the average of the ranks they occupy.
Reason (R): This keeps the sum of ranks equal to n(n + 1)/2.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.Hint
Consistency.
Answer
(a).
Q3 · 2 marks · Very short answerBoard level
If n = 10 and Sum D2 = 33, find rs.
Hint
Substitute.
Answer
rs = 1 - 6 x 33 / (10 x 99) = 1 - 198/990 = 1 - 0.2 = 0.8.
Q4 · 4 marks · Case-basedHarder board level
Read and answer.
Suppose two judges rank 5 candidates as 1,2,3,4,5 and 5,4,3,2,1.
(a) Find Sum D2. (2)
(b) Find rs. (1)
(c) Interpret. (1)Hint
Reversed ranks.
Answer
(a) D = -4, -2, 0, 2, 4; D2 = 16 + 4 + 0 + 4 + 16 = 40. (b) rs = 1 - 6 x 40 / (5 x 24) = 1 - 2 = -1. (c) Perfect disagreement: the rankings are exactly opposite.
Q5 · 3 marks · Short answerHOTS / competency
Suppose a rank correlation computed from ten ranks is 0.9 but a student claims the sample proves that training raises sales. Evaluate with the idea of causation and sample size.
Hint
Not cause.
Answer
A strong rank correlation shows that the two rankings agree, not that training causes the sales. Ten ranks is a small sample, and other factors may matter, so more evidence is needed.
Test your recall
Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.
1.Spearman formula?Show answer
1 - 6 Sum D2 / n(n2 - 1).
2.Tie correction?Show answer
m(m2 - 1)/12.
3.Rank of ties?Show answer
Average of ranks.
4.Sum of D?Show answer
Zero.
5.Use of scatter diagram?Show answer
Visual check of relation.
6.rs range?Show answer
-1 to +1.
Spearman Rank Correlation and Scatter Diagram: frequently asked questions
What is rank correlation?
Association between two rankings.
When to use Spearman?
For ranked or qualitative data.
How are ties handled?
Average ranks and correction.
What is D?
Difference between ranks.
What does rs = -1 mean?
Rankings are exactly reversed.