Professional Documents
Culture Documents
Unit - IV :
Spearmans rank correlation coefficient
Dr. E. Suresh,
Assistant Professor, Department of Mathematics,
SRM Institute of Science and Technology,
Kattankulathur - 603203.
Spearman Rank Correlation
Definition:
The rank correlation co-efficient between the variables X and Y is
defined as
6 d2
P
r =1− 3
(n − n)
where di is the difference between ranks xi & yi and n is the
number of items.
Note:
(i) The rank correlation coefficient lies between - 1 and 1. (or)
−1 ≤ r ≤ 1
m3 − m
X
C .F . = to d2
12
where m is the number of times an item is repeated. This
correction factor (C.F) is to be added for each repeated ranks in
both the X series and Y series. That is
P 2
6 d + C F1 + C F2 + C F3 + ....
r =1−
(n3 − n)
Statistics : 1 2 3 4 5 6 7 8 9 10
Maths : 2 4 1 5 3 9 7 10 6 8
Solution:
The rank correlation co-efficient between the variables X and Y is
defined as
6 d2
P
r =1− 3
(n − n)
where di is the difference between ranks xi & yi and n is the
number of items.
Dr. E.Suresh 18MAB301T - Probability and Statistics
Problem No. 1
Rank in Rank in d =x −y d2
statistics(x) mathematics(y)
1 2
2 4
3 1
4 5
5 3
6 9
7 7
8 10
9 6
10 8
Total
Rank in Rank in d =x −y d2
statistics(x) mathematics(y)
1 2 -1
2 4 -2
3 1 2
4 5 -1
5 3 2
6 9 -3
7 7 0
8 10 -2
9 6 3
10 8 2
d 2 = 40
P
Total
Rank in Rank in d =x −y d2
statistics(x) mathematics(y)
1 2 -1 1
2 4 -2 4
3 1 2 4
4 5 -1 1
5 3 2 4
6 9 -3 9
7 7 0 0
8 10 -2 4
9 6 3 9
10 8 2 4
P 2
Total d = 40
Here n = 10
The rank correlation coefficient between X and Y is
6 d2
P
6 × 40
r =1− 3 =1−
103 − 10
(n − n)
240 240
=1− =1− = 1 − 0.2424 = 0.76
10 × 99 990
r = 0.76.
Problem No. 2
Find the rank correlation coefficient from the following data:
Rank in X : 1 2 3 4 5 6 7
Rank in Y : 4 3 1 2 6 5 7
Solution:
The rank correlation co-efficient between the variables X and Y is
defined as
6 d2
P
r =1− 3
(n − n)
where di is the difference between ranks xi & yi and n is the
number of items.
Rank in Rank in d =x −y d2
(x) (y)
1 4 -3 9
2 3 -1 1
3 1 2 4
4 2 2 4
5 6 -1 1
6 5 1 1
7 7 0 0
Total 20
Here n = 7
The rank correlation coefficient between X and Y is
6 d2
P
6 × 20
r =1− 3 =1− 3
(n − n) (7 − 7)
120 120
=1− =1− = 1 − 0.357 = 0.643
7 × 48 336
r = 0.643.
Problem No. 3
Find the rank correlation coefficient from the following data:
X : 53 98 95 81 75 61 59 55
Y : 47 25 32 37 30 40 39 45
Here n = 8
The rank correlation coefficient between X and Y is
6 d2
P
6 × 160
r =1− 3 =1− 3
(n − n) (8 − 8)
960 960
=1− =1− = 1 − 1.9048 = −0.9048
8 × 63 504
r = −0.9048.
Marks in Computer : 15 20 28 12 40 60 20 80
Marks in Statistics : 40 30 50 30 20 10 30 60
Solution:
The data is repeated in
Marks in Computer and Marks in Statistics
The rank correlation co-efficient between the variables X and Y is
defined as
P 2
6 d + C .F1 + C .F2 + · · ·
r =1−
(n3 − n)
where di is the difference between ranks xi & yi and n is the
number of items.
Dr. E.Suresh 18MAB301T - Probability and Statistics
Problem No. 1
Here n = 8
Correction factor for X - series:
The item 20 is repeated 2 times, m1 = 2
m13 − m1
6
C .F1 = = = 0.5
12 12
Correction factor for Y - series:
The item 30 is repeated 3 times, m2 = 3
m23 − m2
24
C .F2 = = =2
12 12
504
=1− =1−1=0
504
r = 0.
Problem No. 2
Find the rank correlation coefficient from the following data
X : 68 64 75 50 64 80 75 40 55 64
Y : 62 58 68 45 81 60 68 48 50 70
Solution:
The data is repeated in X and Y Series.
The rank correlation co-efficient between the variables X and Y is
defined as
P 2
6 d + C .F1 + C .F2 + · · ·
r =1−
(n3 − n)
m13 − m1
6
C .F1 = = = 0.5
12 12
The item 64 is repeated 3 times, m2 = 3
m23 − m2
24
C .F2 = = =2
12 12
Correction factor for Y - series:
The item 68 is repeated 2 times, m3 = 2
m33 − m3
6
C .F3 = = = 0.5
12 12
= 1 − 0.4545 = 0.5455
r = 0.5455.