Calculate the Spearman's rank correlation coefficient for the following data and interpret the result:
| X | 35 | 54 | 80 | 95 | 73 | 73 | 35 | 91 | 83 | 81 |
|---|---|---|---|---|---|---|---|---|---|---|
| Y | 40 | 60 | 75 | 90 | 70 | 75 | 38 | 95 | 75 | 70 |
Confirming your payment
Sign up now and get 250 free tokens.
Previous Year Questions · Question 28 of 36
Calculate the Spearman's rank correlation coefficient for the following data and interpret the result:
| X | 35 | 54 | 80 | 95 | 73 | 73 | 35 | 91 | 83 | 81 |
|---|---|---|---|---|---|---|---|---|---|---|
| Y | 40 | 60 | 75 | 90 | 70 | 75 | 38 | 95 | 75 | 70 |
Solution:
This past paper question is beyond the current ISC syllabus; it is included for extra practice.
Concept: Spearman's rank correlation coefficient is
Here is the difference between the two ranks of each pair and is the number of pairs. Tied values share the average of the ranks they occupy, and each group of tied values adds a correction to .
Step 1 — Rank the values.
We give rank to the largest value. The two values would take ranks and , so each gets ; the two values would take ranks and , so each gets .
Step 2 — Rank the values.
The largest value gets rank and gets rank . The three values take ranks , and , so each gets . The two values take ranks and , so each gets . Then gets , gets and gets .
Step 3 — Tabulate the ranks and the differences.
We write for the rank of , for the rank of and :
| 35 | 40 | 9.5 | 9 | 0.5 | 0.25 |
| 54 | 60 | 8 | 8 | 0 | 0 |
| 80 | 75 | 5 | 4 | 1 | 1 |
| 95 | 90 | 1 | 2 | −1 | 1 |
| 73 | 70 | 6.5 | 6.5 | 0 | 0 |
| 73 | 75 | 6.5 | 4 | 2.5 | 6.25 |
| 35 | 38 | 9.5 | 10 | −0.5 | 0.25 |
| 91 | 95 | 2 | 1 | 1 | 1 |
| 83 | 75 | 3 | 4 | −1 | 1 |
| 81 | 70 | 4 | 6.5 | −2.5 | 6.25 |
The differences add up to , which is a useful check, and the last column gives .
Step 4 — Work out the correction for ties.
There are four tied groups: twice and twice in , three times and twice in .
For a group of values the correction is
For a group of values the correction is
We add the four corrections:
Step 5 — Substitute into the formula.
Here , so the denominator is
We substitute and :
Step 6 — Interpret the result.
The value is positive and close to , so the two rankings agree closely: a high rank in usually goes with a high rank in .
Watch out: Without the tie correction the value would be ; when ranks are tied, always add for every tied group.
Therefore, , which shows a high positive correlation between and .