Correlation
Correlation
variables
Correlation indicates the relationship between two variables of a series so that changes
othero sin the
values of one variable are associated with changes in the values of the
(either in: same or in
In other words, when two variables vary simultaneously opposite direction)
and change in value of one variable is accompanied by a change in fother variable, then
these two variables are said to be correlated. For example, relationship between
height and
weight,income and expenditure, price and demand, etc.
TYPES OF CORRELATION
X X X X
2 Negative Correlation: When all the points of a scatter diagram cluster around a straight line
With negative slope, the correlation is said to be negative as shown in (Fig. 10.7 and 10.8).
zero
D NoCorrelation: If the points are scattered in a haphazard manner, then it is a case of
Or no correlation (see Fig. 10.9 and 10.10).
No Correlation
No Correlation
High Degree of Low Degree of
YNegative Correlation Y Negative Correlation
X
X
X Fig. 10.10
X Fig.10.9
Fig. 10.7 Fig. 10.8
Practicals on Scatter Diagram
diagram for the following data and state h
Example 1. Make
between X and Y.
a scatter type of corelatc,
20 30 40 50 Y
X 10
140 210 280 350
70 Series
Y 350
Solution: 280
of Series X on
The scatter diagram is obtained by plotting the values 210
the X-axis and values of Series Yon the Y-axis. Plotting the values (10, 140
70), (20, 140),....(50, 350) on the graph paper, we get the scatter 70
diagram (See Fig. 10.11): o 10 20 30
It is obvious from the scatter diagram that there is perfect positive 40 50
Series X
correlation between the values of Series X and Series Y.
Fig. 10.11
Example 2. Draw a scatter diagram to represent the following
Y
values of Xand Y variables. Comment on the type and degree
of correlation.
25
X 15 20 25 27 30
20
Y 7 10 12 16 18 15
Solution: 10
Plot the values of variable >X on the X-axis and variable Y on the Y-axis. 5
EY 84
Y = = 12
N 7
Exy
Coefficient of Correlation (r) =
X
Y y2 XY
144 6 36 72
12
225 64 120
15
324 10 100 180
18
441 12 144 252
21
14 196 336
24 576
16 256 432
27 729
18 324 540
30 900
EY = 84 EY²=1,120 EXY =1,932
EX = 147 EX' =3,339
NEXY-EX.EY
Coefficient of Correlation () =
NEX2-(EX) xNEY2-(EY2
and N=7
Here,EX = 147; EY=84;EX2=3,339; Ey² =1,120; EXY =1,932
7x1,932-147 x84
J7x3,339-(147)2 xJ7x1,120-(84)°
13,524 - 12,348
J23,373 -21,609 x, 7,840 -7,056
1,176 1,176 1,176
= 1
J1,764 xJ 784 42 x 28 1,176
Series
perfect positive correlation between the values of
AIS. COeficient of Correlation = 1. There is
Xand Series Y.
Where:
N= Number of pair of observations.
Ldx' = Sum of step deviations of X values from assumed mean.
Edy' = Sum of step deviationsof Yvalues from assumed mean.
Sdx'2 = Sum of squared step deviations of Xvalues from assumed mean.
Zdy? = Sum of squared step deviations of Yvalues from assumed mean.
Ldx'dy' = Sum of the products of step deviations dx' and dy'.
Example 12. Calculate the coefficient of correlation of the data given in Example 6by the Step
Deviation Method.
Solution: Calculation of Coefficient of Correlation (Step Deviation Method)
X-Series Y-Series
X dx = X-A dx dx'2 Y dy = Y-A dy dy? d°'dy
dx'= A= 10 dy'=
A= 18 C C
C=3 C=2
12 -6 -2 4 6 -4 -2
15 -3 -1 1 -2 -1 1 1
18 (A) 10 (A)
21 +3 +1 1 12 +2 +1 1
4 14 +4 +2 4
24 +6 +2
16 +6 +3 9
27 +9 +3
18 +8 +4 16 16
30 + 12 +4 16
Zdx' =7 Zdx'² =35 Edy' =7Zdy'2 =35 Zdx'dy =35
N~dx'dy' - Zdx' x Zdy'
NZdx'e-(Zdx')² xJ NEdy'2 -(Edy')?
Here, Zdx'dy' =35;Zdx' =7;Edy' = 7;N=7; Edx'? =35; Zdy'? =35
7x35-(7) x (7)
J7x35-(7)² x7x 35 -(7)2
245 49 196
-= 1
196 x196 196
Series X
Ans. Coefficient of Correlation = 1.There is perfect positive correlation between values of
and Series Y.
CORRELATION
SUMMARY OF KARL PEARSON'S COEFFICIENT OF
different methods.
Example:Calculate the Coefficient of Correlation (r) from the following data by
4 6 8 10
X 12
18 24 30
6 12 36
1t Method: Actual Mean Method 2nd Method: Direct Method
X-Series YSeries X-Series Y-Series
X X= Y y xy Y
X-X ý-y XY
2 4 6 36
-5 25 6 -15 225 75 16 12 144 12
-3 12 -9 81 27 6 36 18 324
6 -1 1 18 -3 8 64 24 576 108
1 24 9 3 10 100 30 900 192
10 30 81 27 12 144 36 1296 300
12 5 25 36 15 225 75 432
EX = 42 EX²=364 EY =126 Ey2 =3,276
ZX= Ex? = EY = Ey² = 630 Exy = 210 ZXY =1,092
42 70 126 NEXY -X.EY
r=
VNEX-(EXY x NEY-(2Y
X==- 7 Y-==21 6x 1092 42 x 126
Exy 210 210 /6x364-(42) xV6x 3,276-(126)2
-=1
Vix'x ~y W70x 630 210 6,552 - 5292
V2,184-1,764 x\19,656 15,876
1,260 1,260
=1
V420 x 3,780 1,260
3rd Method: Short-Cut Method or Assumed 4th Method:
Mean Method Step Deviation Method
X-Series Y-Series X-Series Y-Series
X dx = dy2 dy = dy² dxdy X dx = dx dx2Y dy = dy² dáy
X-A Y-A X-A dx Y-A dy'
A=8 A= 24 A=8 C=2 A= 24 C=6
2 -6 36 6 -18 324 108 2 -6 9 6 -18 -3
4 -4 16 12 -12 144 48 4 -4 12 -12 -2 4 4
-2
6 -2 4 18 -6 36 12 1
6 -2 -1 18 -6 -1 1
8 24 8 24 0
10 2 4 30 6 36 12 10 2 1 30 6 1 1
12 16 36 12 144 48 12 4 2 4 36 12 4
Zdx Zdy² = Edy Zdy? Zdxdy Zdx' Edx'2 Zdy' Zdy'² Edx'dy
=-6 76 =-18 = 684 = 228 =-3 =-3 = 19 = 19
= 19
r=
NEdxdy - Zdx x Zdy NEdx'dy'- Zdx' x Zdy'
VNZdy?-(Zdx xNZdy'-(Zdy) r=
VNZdx2-(Zdx xNZdy'- (Zdy'
{6 x 228)--6x-18)
(6x 19}--3x-3)
V6x 76(-6 x6x 684 -(-18)2 V6x 19-(-3) x\6 x19-(-3)
1,368 108
114-9
V456-36 x V4,104-324
V114 -9 x114-9
1,260 1,260
=1 105 105
420 x 3,780 1,260 V105x 105 105=1
SUMMARY OF SPEARMAN'S RANK
qst Case: When Ranks are
Glven
2nd
CORRELATION
Example1.Ina competition, two judges rankthe 5contestants| Example 2.Case:When Ranks are NOT
Calculate Spearman's RankG0ven
correlation of
asfollows: Coefficient from the following data:
2 3 5
Judge1 87 22 33
1 3 5 75 37
4 2
29 63
Judge2 correlation 52 46 48
coefficient of rank Solution: It is necessary to assign ranks. Assigning rank from
Calculate
the highest to the lowest.
Solution:
Ranks by D=R-Rz D2 X Ranks
Ranksby Ranks D= D
Judge 1(R) (R) (A) R,-Rz
Judge 1(F) -3 87 1
4 29 5 -4 16
1 22 5
2 63 1 16
2 1 2 4 33 4 52 2 2 4
3 3 1 1 75 2 46 4 -2 4
4 37 3
5 48
5
ED² = 14 ZD² = 40
6D2 6ZD2
Rank Correlation (r)=1 Rank Correlation(r) =1-:
N3-N NO-N
6x 14 84 6x 40 240
=1 = 0.3 7=1-. =1- -=-1
(5)-5 120 (5)3-5 120
in Y, m=3.
and 34 is repeated thrice in series Y. Therefore, in X, m =2 and
o1S repeated twice in series X
1 1
6 ED2+ (m-m) + 12-(m-m)
12
k =1 -
N3-N
1 1
6 159.5 + (23-2) + 12 (39-3)
12
=1
83-8
6x 162
6(159.5 +0.5 +2) -0.93
512-8 504