Two persons taste 10 red Italian wines, grading them by an
ordinal scale between 1 and 5. The results
are as follows:
Grades Grades
Wine No. Person 1 Person 2
1 1 2
2 2 3
3 4 5
4 5 4
5 2 2
6 2 2
7 4 3
8 3 4
9 1 3
10 4 2
(a) Find the Spearman’s rank correlation by
i. the definition;
ii. using the formula
rs = 1 − 6(sum of i to n di^2) / n(n^2-1)
Note that this only gives an approximation when there are tied
data.
(b) Test whether Spearman’s rho is significantly different from
zero.
In order to calculate Spearman's rank correlation coefficient we first have to sort the grades for each person. The resulting rank numbers are averaged for tied observations:
Grades Rank Rank Wine No. Person 1 (ties) 1 1 1 1.5 9 1 2 1.5 6 2 3 4 5 2 4 4 2 2 5 4 8 3 6 6 10 4 7 8 7 4 8 8 3 4 9 8 4 5 10 10 Grades Rank Rank Wine No. Person 2 (ties) 5 2 1 2.5 1 2 2 2.5 10 2 3 2.5 6 2 4 2.5 2 3 5 6 7 3 6 6 9 3 7 6 8 4 8 8.5 4 4 9 8.5 3 5 10 10
The final table of ranks includes the differences of the ranks as well as the squared differences:
Wine No. Person 1 Rank Person 2 Rank Rank squared Difference Diff. 1 1 1.5 2 2.5 -1 1 2 2 4 3 6 -2 4 3 4 8 5 10 -2 4 4 5 10 4 8.5 1.5 2.25 5 2 4 2 2.5 1.5 2.25 6 2 4 2 2.5 1.5 2.25 7 4 8 3 6 2 4 8 3 6 4 8.5 -2.5 6.25 9 1 1.5 3 6 -4.5 20.25 10 4 8 2 2.5 5.5 30.25 ------------------------------------------------------------------------ sum 0.0 76.50
The sum of the squared differences is used to calculate Spearman's rank correlation coefficient as follows:
rs = 1 - (6*76.5/(10*(100-1)) = 0.5364.
Get Answers For Free
Most questions answered within 1 hours.