Professional Documents
Culture Documents
Rank Correlation
Rank Correlation
Rank Correlation
X X
di2 = [(xi − x̄) − (yi − ȳ )]2
i i
X X X
= (xi − x̄)2 + (yi − ȳ )2 − 2 (xi − x̄)(yi − ȳ )
= n(x̄ − ȳ ) = 0 (∵ x̄ = ȳ ).
Also
X X X X
d2 = (X − Y )2 = [(X − X̄ ) − (Y − Ȳ )]2 = (x − y )2
X X X X
=⇒ d2 = x2 + y2 − 2 xy
X 1 X 2 X 2 X 2
=⇒ xy = ( x + y − d ) ..(iii)
2
...(a)
Similarly suppose that there are t such seats of ranks to be tied with respect
to the other series Y so that sum of squares due to them is:
t t
1 X 1 X 3
mj (mj2 − 1) = (mj − mj ) = TY , (say).
12 12
j=1 j=1
...(b)
P
Remark. If we adjust only the covariance term, i.e., xy and not the
variances σx2 and σy2 for ties, then the formula reduces to
d 2 + TX + TY
P
6
ρ(X , Y ) = 1 − , ...(2)
n(n2 − 1)
Ranks in Maths.(X): 1 2 3 4 5 6 7 8 9 10
Ranks in Physics (Y): 1 10 3 4 5 7 2 6 8 11
d = X −Y: 0 -8 0 0 0 -1 5 2 1 -1
d 2: 0 64 0 0 0 1 25 4 1 1
6 i di2
P
ρ=1−
n(n2 − 1)
6 × 136
=1−
16 × 255
1
= 1 − = 0.8.
5
X 68 64 75 50 64 80 75 40 55 64 T
Y 62 58 68 45 81 60 68 48 50 70
Rank x 4 6 2.5 9 6 1 2.5 10 8 6
Rank y 5 7 3.5 10 1 6 3.5 9 8 2
d =x −y -1 -1 -1 -1 5 -5 -1 1 0 4 0
d2 1 1 1 1 25 25 1 1 0 16 72
Table: Calculations for rank correlation
In the X-series we see that the value 75 occurs 2 times. The common
rank given to them is 2.5 which is average of 2 and 3, the ranks
which these values would have taken if they were different.
The next value 68, then gets the next rank 4. Again we see that value
64 occurs thrice. The common rank given to it is 6 which is the
average of 5,6, and 7.
Similarly in Y-series, the value 68 occurs twice and its common rank
is 3.5 which is the average of 3 and 4.
As a result of these common rankings, the formula for ρ has to be
corrected.
2
d we add m(m12−1) for each value repeated, where m is the
P 2
To
number of times a value occurs.