Compute Spearman's rank correlation coefficient for the following data, which contain repeated values.
| x | 68 | 64 | 75 | 50 | 64 | 80 | 75 | 40 | 55 | 64 |
|---|---|---|---|---|---|---|---|---|---|---|
| y | 62 | 58 | 68 | 45 | 81 | 60 | 68 | 48 | 50 | 70 |
🔒You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
🔒 Start your 14-day free trial to unlock the full solution →Concept understanding — Spearman's Rank Correlation
Spearman's rank correlation coefficient measures the strength and direction of association between two variables using their ranks rather than their raw values. It is the natural tool for qualitative or ordinal data — judges' rankings, preference orders, or figures too imprecise to measure exactly.
Rank both series, find how far apart the paired ranks are, and turn the sum of squared differences into a coefficient between −1 and +1.
How it works
Each item receives a rank in the first series and a rank in the second. If the two rankings agree closely, the paired ranks stay near each other and the differences d are small, pushing R toward +1. If they disagree, the differences grow and R falls toward −1.
R=1−n(n2−1)6∑d2
where d = difference between the two ranks of each item and n = number of items.
Interpreting and adjusting
- R=+1: perfect agreement in ranking.
- R=−1: perfect disagreement (exact reversal).
- R=0: no rank association.
- Tied ranks: give tied items the average of the ranks they occupy, and add a correction of 121(m3−m) to ∑d2 for each group of m tied items.
Quick example
Five students are ranked by two judges:
| Student | Judge X rank | Judge Y rank | d | d2 |
|---|---|---|---|---|
| A | 1 | 2 | −1 | 1 |
| B | 2 | 1 | 1 | 1 |
| C | 3 | 4 | −1 | 1 |
| D | 4 | 3 | 1 | 1 |
| E | 5 | 5 | 0 | 0 |
There are ties, so assign average ranks and add the tie-correction term.
∑d2=72; ties give a correction ∑12m(m2−1)=3; n=10. …
With ties present, use
R=1−n(n2−1)6[∑d2+∑12m(m2−1)],n=10.
Rank x (highest = 1). Sorted: 80,75,75,68,64,64,64,55,50,40. So 80→1; the two 75s share ranks 2,3→2.5 each; 68→4; the three 64s share ranks 5,6,7→6 each; 55→8; 50→9; 40→10.
Rank y (highest = 1). Sorted: 81,70,68,68,62,60,58,50,48,45. So 81→1; 70→2; the two 68s share ranks 3,4→3.5 each; 62→5; 60→6; 58→7; 50→8; 48→9; 45→10.
| x | R1 | y | R2 | d | d2 |
|---|---|---|---|---|---|
| 68 | 4 | 62 | 5 | −1 | 1 |
| 64 | 6 | 58 | 7 | −1 | 1 |
| 75 | 2.5 | 68 | 3.5 | −1 | 1 |
| 50 | 9 | 45 | 10 | −1 | 1 |
| 64 | 6 | 81 | 1 | 5 | 25 |
| 80 | 1 | 60 | 6 | −5 | 25 |
| 75 | 2.5 | 68 | 3.5 | −1 | 1 |
| 40 | 10 | 48 | 9 | 1 | 1 |
| 55 | 8 | 50 | 8 | 0 | 0 |
| 64 | 6 | 70 | 2 | 4 | 16 |
| Total | 0 | 72 |
Giving tied values consecutive ranks (e.g. 2 and 3) instead of their average (2.5), and forgetting to add the tie correction for every tied group in *bo …
- CA Foundation 2026Set jan-20261 markMCQQ.The coefficient of rank correlation in a beauty contest of 10 candidates by two judges A & B was found to be 0.5. If it was later discovered that the difference in rank of one candidate was wrongly taken as 3 instead of 7. The corrected coefficient of rank correlation is? (A) 0.26 (B) 0.32 (C) 0.49 (D) 0.93
›Reveal solutionSolution
Spearman's rank correlation R=1−n(n2−1)6∑d2; fix ∑d2 for the misread difference and recompute.
Step 1 — find the original Σd².
With n=10, n(n2−1)=10×99=990 and R=0.5:
0.5=1−9906∑d2⇒9906∑d2=0.5⇒∑d2=60.5×990=82.5.
Step 2 — correct the wrong term.
One difference was recorded as 3 instead of 7. Remove 32=9 and add 72=49:
∑dcorrected2=82.5−9+49=122.5.
Step 3 — recompute R. …
- CA Foundation 2026Set may-20261 markMCQQ.The Spearman's Rank correlation coefficient between Economics and Accountancy marks for a class student is 9975 and the sum of Square of differences in ranks for Economics and Accountancy marks is 40. What is the number of students in the class? (A) 10 (B) 15 (C) 18 (D) 20
›Reveal solutionSolution
Solve 1−n(n2−1)6∑d2=9975 → n(n2−1)=990 → n=10.
Step 1 — Write Spearman's rank correlation formula
r=1−n(n2−1)6∑d2
Step 2 — Isolate the fraction
With r=9975 and ∑d2=40:
n(n2−1)6(40)=1−9975=9924
Step 3 — Solve for n
n(n2−1)=24240×99=10×99=990
Since n(n2−1)=990 and 10×(100−1)=10×99=990, we get n=10. …
- CA Foundation 2025Set jan-20251 markMCQQ.Compute the rank correlation coefficient from the following data: n=10,Σd2=5 (A) 0.95 (B) 0.97 (C) 0.96 (D) 0.99
›Reveal solutionSolution
r=1−n(n2−1)6Σd2=1−99030≈0.97.
Step 1 — Write the rank-correlation formula
r=1−n(n2−1)6Σd2
Step 2 — Substitute n=10, Σd2=5
n(n2−1)=10×(100−1)=990
r=1−9906×5=1−99030=1−0.0303=0.9697≈0.97
Why the other options are wrong: 0.95,0.96,0.99 come from rounding slips or a wrong n(n2−1). …
- CA Foundation 2025Set may-20251 markMCQQ.For 9 college students group, the sum of squares of differences in ranks for History and Hindi marks was found to be 62, then what is the value of rank correlation co-efficient ? (A) 1 (B) 0.48 (C) 0.52 (D) 0.87
›Reveal solutionSolution
Spearman: r=1−n(n2−1)6Σd2=1−720372≈0.48.
Step 1 — Formula
r=1−n(n2−1)6Σd2
Step 2 — Substitute n=9, Σd2=62
n(n2−1)=9×(81−1)=9×80=720
6Σd2=6×62=372
Step 3 — Evaluate
r=1−720372=1−0.5167=0.4833≈0.48
Why the other options are wrong: (A) 1 ignores the correction term; (C) 0.52 is 720372 (the term itself, not 1− it); (D) 0.87 uses a wrong denominator. …
- CA Foundation 2025Set sep-20251 markMCQQ.For a group of students, the sum of squares of differences in ranks for Maths and Physics marks are found to be 60, which is 120 times the value of rank correlation coefficient. How many students are there in the group ? (A) 8 (B) 10 (C) 9 (D) 12
›Reveal solutionSolution
r = 60/120 = 0.5; plugging into Spearman's formula gives n(n²−1) = 720 → n = 9.
Step 1 — Get r from the given relation
Σd2=60 is 120 times r, so
r=12060=0.5
Step 2 — Spearman's rank correlation formula
r=1−n(n2−1)6Σd2
Substitute r=0.5, Σd2=60:
0.5=1−n(n2−1)6(60)=1−n(n2−1)360
Step 3 — Solve for n
n(n2−1)360=0.5⇒n(n2−1)=720
Testing n=9: 9(81−1)=9×80=720. ✓ …
- CA Foundation 2025Set sep-20251 markMCQQ.The sum of squares of the differences between two ranks awarded by two judges on 10 candidates is _______ if the rank correlation coefficient is 0.8. (A) 44 (B) 55 (C) 66 (D) 33
›Reveal solutionSolution
n = 10, r = 0.8 → 6∑d²/990 = 0.2 → ∑d² = 33.
Step 1 — Spearman's formula
r=1−n(n2−1)6Σd2
Step 2 — Substitute n = 10, r = 0.8
n(n2−1)=10(100−1)=10×99=990
0.8=1−9906Σd2
Step 3 — Solve for ∑d²
9906Σd2=0.2⇒6Σd2=198⇒Σd2=33 …
- CA Foundation 2023Set jun-20231 markMCQQ.Spearman's rank correlation coefficient rR is given by (A) 1−n(n2+1)6∑di2 (B) 1+n(n2−1)6∑di2 (C) 1+n(n2+1)6∑di2 (D) 1−n(n2−1)6∑di2
›Reveal solutionSolution
r_R = 1 − 6Σd²/[n(n²−1)].
Step 1 — State the standard formula
rR=1−n(n2−1)6∑di2
Step 2 — Match the option
The correct form subtracts the term and uses n(n²−1) in the denominator — option (D).
Watch outTwo traps: the sign must be minus (perfect agreement, Σd² = 0, gives r_R = 1), and the denominator is n(n²−1), never n(n²+1). …
- CA Foundation 2022Set dec-20221 markMCQQ.The coefficient of rank correlation between the ranking of following 6 students in two subjects Mathematics and Statistics is: | Mathematics | 3 | 5 | 8 | 4 | 7 | 10 | | Statistics | 6 | 4 | 9 | 8 | 1 | 2 | (A) 0.25 (B) 0.35 (C) 0.38 (D) 0.20
›Reveal solutionSolution
Spearman's rank correlation ≈ −0.26, whose magnitude corresponds to option (A) 0.25.
Step 1 — Convert scores to ranks (1 = lowest)
Maths 3,5,8,4,7,10 → ranks 1,3,5,2,4,6.
Statistics 6,4,9,8,1,2 → ranks 4,3,6,5,1,2.
Step 2 — Differences and their squares
d=1−4,3−3,5−6,2−5,4−1,6−2=−3,0,−1,−3,3,4
∑d2=9+0+1+9+9+16=44
Step 3 — Apply the formula
rs=1−n(n2−1)6∑d2=1−6(35)6(44)=1−1.257=−0.257 …
🎓Unlock everything free for 14 days
- ✓Full step-by-step solutions
- ✓Concept-first explanations
- ✓Methods, shortcuts & mistakes
- ✓PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.