12 Correlation and Rank Correlation 05-02-2024
12 Correlation and Rank Correlation 05-02-2024
by
Dr. Rajesh Moharana
Department of Mathematics
School of Advanced Sciences
Vellore Institute of Technology
Vellore, India
Definition
The relationship between two variables such that a change in one
variable results in the positive or negative change in the other is called
correlation. A greater change in one variable resulting in a
corresponding greater or smaller change in the other variable is also
known as correlation.
Cov (X , Y )
r =
σX σY
E ((X − µX )(Y − µY ))
=
σx σy
E (XY ) − E (X )E (Y )
=
σx σy
where σX and σY are the standard deviations, and µX and µY are the
means of X and Y , respectively.
where x = n1 1
P P
xi and y = n yi are the means of the variables x and
y , respectively.
Fertilisers used: 15 18 20 24 30 35 40 50
Productivity: 85 93 95 105 120 130 150 160
Solution 3: Let X denote the fertiliser used and Y denote the produc-
tivity. Computation of coefficient correlation:
1X 1X
x= xi = 29 and y = yi = 119
8 8
P
(xi − x)(yi − y )
∴r = = 0.99
nσx σy
There is a high degree of correlation between fertiliser used and produc-
tivity.
Mathematics: 85 60 73 40 90
Statistics: 93 75 65 50 80
Marks in Math ‘X’ Ranks of X Marks in Stat ‘Y’ Ranks of Y Rank difference ‘d’ d2
85 2 93 1 1 1
60 4 75 3 1 1
73 3 65 4 -1 1
40 5 50 5 0 0
90 1 80 2 -1 1
6 d2
P 6×5 4
r =1− = 1 − = = 0.8.
n(n2 − 1) 5(52 − 1) 5
When two or more values are equal it is customary that values are given
the average of the ranks they would have received. In this case the
formula for computing rank correlation coefficient takes the form
6( d 2 + Tx + Ty )
P
r =1− ,
n(n2 − 1)
P ti3 −ti
where Tx = ; (i denotes the ith tie, ti denotes the number of
12
P tj3 −tj
ranks tied in the ith tie in the variable X ) and Ty = 12 ; (j denotes
the jth tie, tj denotes the number of ranks tied in the jth tie in the
variable Y ).
In the first ranking there are two sets of ties, and in the second ranking,
there is one set of ties.
X Rank of X Y Rank of Y d d2
68 4 62 5 -1 1
64 6 58 7 -1 1
75 2.5 68 3.5 -1 1
50 9 45 10 -1 1
64 6 81 1 5 25
80 1 60 6 -5 25
75 2.5 68 3.5 -1 1
40 10 48 9 1 1
55 8 50 8 0 0
64 6 70 2 4 16
Therefore,
1
Tx = {(23 − 2) + (33 − 3)} = 2.5,
12
1
{(23 − 2)} = 0.5,
Ty =
12
6(72 + 2.5 + 0.5)
r =1− = 0.545.
990