Find the rank correlation x: 21 36 42 37 25 y: 47 40 37 42 43
Answers
Given:
n = 5
To find Spearman's rank correlation:
Solution:
Calculate the rank for each variable X and Y by ranking 1 for the highest variable, 2 for the next higher variable, and so on. Then, calculate the difference (d) between rank and square of d.
X Rank Y Rank d di²
21 5 47 1 4 16
36 3 40 4 1 1
42 1 37 5 4 16
37 2 42 3 1 1
25 4 43 2 2 4
∑di²=38
Using rank correlation coefficient formula
р = 1 - (6 ∑di²)/ n(n²-1)
= 1 - (6×38)/ 5(25-1)
= 1 - 228 / 120
= 1 - 1.9
= - 0.9
∴The Spearman Rank Correlation for this set of data is - 0.9.