Fundamentals of Business Mathematics and Statistics · Correlation and Regression
Spearman's Rank Correlation: Formula and Tie Correction
Updated 10 October 2026 · Fact-checked
Spearman's rank correlation measures how closely two sets of ranks agree. Rank both series, find each difference d, then use r = 1 − 6Σd² ÷ n(n² − 1). If ranks repeat, add m(m² − 1) ÷ 12 for each tied group to Σd² before multiplying by 6. The value lies between −1 and +1.
Understand Spearman's Rank Correlation
Sometimes you cannot measure items in numbers. A panel may only rank ten candidates from best to worst. Karl Pearson's method needs actual values, so it does not suit such data. Spearman's rank correlation works on the ranks instead.
The idea is simple. If two judges rank the same items almost identically, the differences between their ranks are small and the correlation is close to +1. If they rank in opposite order, the differences are large and the correlation is close to −1. Squaring the differences removes the sign and punishes big gaps.
You can also use it when you have numerical data. Convert each series to ranks first. Give rank 1 to the highest value in both series, or to the lowest in both. Just be consistent.
When two or more items have the same value, they are tied. Each tied item gets the average of the ranks they would have occupied. Two items tied for 3rd and 4th both get 3.5. This keeps the total of ranks the same, n(n + 1) ÷ 2. Because averaging changes Σd², a tie correction is added.
Pearson vs Spearman: Pearson uses actual values and measures straight-line relationship. Spearman uses only ranks, suits ordinal or qualitative data, and is less affected by extreme values. For the same data, the two values are usually different.
Key formulas to remember
- Spearman's rank correlation (no ties)
- r = 1 − 6Σd² ÷ [n(n² − 1)]
- d = difference between the two ranks of an item; n = number of items (pairs).
- With repeated ranks (tie correction)
- r = 1 − 6[Σd² + Σ m(m² − 1) ÷ 12] ÷ [n(n² − 1)]
- m = number of items in a tied group. Add one correction for every tied group, in both series.
- Rank for tied items
- Average of the ranks the tied items would have taken
- Example: three items tied for 2nd, 3rd and 4th each get 3.
- Range and checks
- −1 ≤ r ≤ +1; Σd = 0
- If Σd is not zero, a rank or difference is wrong. r = +1 means identical ranks; r = −1 means fully reversed ranks.
- Correction value for common ties
- m = 2 gives 0.5; m = 3 gives 2
- Calculated from m(m² − 1) ÷ 12: 2×3÷12 = 0.5 and 3×8÷12 = 2.
How to solve Spearman's Rank Correlation questions
Use this method for any rank correlation question, with or without ties.
- 1Check whether ranks are given. If values are given, rank both series the same way (highest = 1 in both, or lowest = 1 in both).
- 2For tied values, give each the average of the ranks they cover. Note every tied group and its size m.
- 3Find d = R1 − R2 for each item. Check that Σd = 0.
- 4Square each d and add to get Σd².
- 5If there are ties, compute m(m² − 1) ÷ 12 for each tied group in either series and add them all to Σd².
- 6Put the numbers into r = 1 − 6 × (corrected Σd²) ÷ [n(n² − 1)].
- 7Check that your answer is between −1 and +1, then match it with the options.
Quickest way: Fast route for MCQs
When to use it: Use when ranks are already given or values are few, and four options are close in value.
- Write only the d column, not full tables. Check Σd = 0.
- Compute n(n² − 1) first: n = 5 gives 120, n = 6 gives 210, n = 8 gives 504, n = 10 gives 990.
- Estimate: if Σd² is small compared with n(n² − 1) ÷ 6, r is high and positive. Eliminate negative options.
- Remember that Σd² = 0 gives r = 1, and Σd² = n(n² − 1) ÷ 3 gives r = −1. Use these to test options.
- If any rank repeats, do not skip the correction. Options usually include the uncorrected answer as a trap.
Common mistakes in Spearman's Rank Correlation
Ranking one series from highest and the other from lowest
Students rank each column separately without a rule.
Fix: Choose one direction before you start and use it for both series.
Giving tied items the same rank as the first position, such as 3 and 3
Students copy the rule from sports where ties share the top rank.
Fix: Use the average of the positions. Two items tied for 3rd and 4th both get 3.5, and the next item gets 5.
Forgetting the tie correction
The basic formula is memorised and the extra term is ignored.
Fix: Scan both series for repeated values. Add m(m² − 1) ÷ 12 for each tied group inside the bracket.
Multiplying the correction by 6 wrongly or adding it outside the bracket
The bracket in the formula is misread.
Fix: First add corrections to Σd², then multiply that total by 6.
Not squaring d, or leaving Σd ≠ 0 unchecked
Rushing through the table.
Fix: Always check Σd = 0 before squaring, then square each d.
Using n as the number of values in both series together
Two columns of data look like double the count.
Fix: n is the number of pairs, which is the number of items ranked.
Worked examples
Example 1
Six students are ranked in Accountancy and Statistics as follows. Accountancy: 1, 2, 3, 4, 5, 6. Statistics: 2, 1, 4, 3, 6, 5. Find Spearman's rank correlation coefficient.
Show the solution
- n = 6. The differences d = R1 − R2 are −1, 1, −1, 1, −1, 1. Σd = 0, so the ranks are consistent.
- d² = 1 for every student, so Σd² = 6.
- n(n² − 1) = 6 × 35 = 210.
- r = 1 − (6 × 6) ÷ 210 = 1 − 36 ÷ 210 = 1 − 6/35 = 29/35.
- 29/35 is about 0.83.
Answer: r = 29/35 ≈ 0.83, a strong positive agreement between the two rankings.
Example 2
Five employees have these scores. Test X: 40, 50, 50, 60, 70. Test Y: 30, 20, 40, 50, 50. Find the rank correlation using rank 1 for the highest score.
Show the solution
- Rank X: 70 gets 1, 60 gets 2, the two 50s share positions 3 and 4 so each gets 3.5, and 40 gets 5. In order of employees (40, 50, 50, 60, 70): 5, 3.5, 3.5, 2, 1.
- Rank Y: the two 50s share positions 1 and 2 so each gets 1.5, 40 gets 3, 30 gets 4, 20 gets 5. In order of employees (30, 20, 40, 50, 50): 4, 5, 3, 1.5, 1.5.
- d = Rx − Ry: 1, −1.5, 0.5, 0.5, −0.5. Σd = 0.
- d² = 1, 2.25, 0.25, 0.25, 0.25. Σd² = 4.
- Tie corrections: X has one group with m = 2, giving 2 × 3 ÷ 12 = 0.5. Y has one group with m = 2, giving 0.5. Total = 1.
- Corrected Σd² = 4 + 1 = 5.
- n(n² − 1) = 5 × 24 = 120.
- r = 1 − (6 × 5) ÷ 120 = 1 − 30 ÷ 120 = 1 − 0.25 = 0.75.
Answer: r = 0.75. Without the tie correction you would get 1 − 24 ÷ 120 = 0.80, which is wrong.
Exam tips
- Look at the data first. If any value repeats in either series, expect the tie correction to be tested.
- Options often include the uncorrected answer. Complete the correction before choosing.
- Check Σd = 0 in seconds. It catches ranking slips and saves you from a wrong answer.
- Know the limits: r is always between −1 and +1, and reversed ranks give −1. Some questions only test this.
- For Pearson versus Spearman questions, remember: Spearman uses ranks and suits qualitative data; Pearson uses actual values.
Practice questions from Correlation and Regression
- The correlation coefficient between X and Y is 0.8, with standard deviations of 5 for X and 10 for Y. What is the regression coefficient of …
- For a set of paired data, the covariance between X and Y is 12, the standard deviation of X is 4 and the standard deviation of Y is 5. What …
- The correlation coefficient between variables X and Y is 0.6. New variables are defined as U = 2X + 3 and V = 5 - 3Y. What is the correlatio…
- Each value of x is transformed to u = (x − 50)/10 and each value of y to v = (y − 200)/25. If the correlation coefficient between u and v is…
- The regression lines of Y on X and X on Y are Y = 0.8X + 10 and X = 0.45Y + 5 respectively. What is the value of the correlation coefficient…
Spearman's Rank Correlation in other exams
The same ground in other exams, if you are preparing for more than one or want another angle on it.
Spearman's Rank Correlation: frequently asked questions
What is the formula for Spearman's rank correlation?
r = 1 − 6Σd² ÷ [n(n² − 1)], where d is the difference between paired ranks and n is the number of pairs. It is used when there are no tied ranks.
How do you calculate rank correlation with repeated ranks?
Give each tied item the average of the ranks it covers. Then add m(m² − 1) ÷ 12 for every tied group, in both series, to Σd². Multiply the total by 6 and use the usual formula.
What is the difference between Karl Pearson and Spearman correlation?
Pearson's coefficient uses the actual values and measures linear relationship. Spearman's uses only ranks, so it suits ordinal or qualitative data and is less affected by extreme values. The two results for the same data are generally not equal.
Can Spearman's rank correlation be greater than 1?
No. It always lies between −1 and +1. If your answer is outside this range, recheck your d values, Σd² and n(n² − 1).