CORRELATION
DIRECT METHOD
r=
∑𝑑𝑥.𝑑𝑦
√∑𝑑𝑥2.∑𝑑𝑦2
where, dx=X-𝑋
̅(ACTUAL MEAN)
dY=Y-𝑌
̅(ACTUAL MEAN)
X 11 10 9 8 7 6 5
Y 20 18 12 8 10 5 4
X Dx dx2
Y dy dy2
dx.dy
11 3 9 20 9 81 27
10 2 4 18 7 49 14
9 1 1 12 1 1 1
8 0 0 8 -3 9 0
7 -1 1 10 -1 1 1
6 -2 4 5 -6 36 12
5 -3 9 4 -7 49 21
Dx=0 ∑dx2
=28 ∑dy2=
226 ∑dx.dy=76
r=
∑𝑑𝑥.𝑑𝑦
√∑𝑑𝑥2.∑𝑑𝑦2
r=
76
√28∗226
r=.96
CORRELATION
SHORT CUT METHOD
r= 𝑁∑𝑑𝑥.𝑑𝑦−∑𝑑𝑥.∑𝑑𝑦
{𝑁∑𝑑𝑥2−(∑𝑑𝑥)2}{𝑁∑𝑑𝑦2−(∑𝑑𝑦)2}
dx=X-A(Assumed Mean)
dy=Y-A
N= no.of pairs
X Dx=X-8 dx2
Y Dy dy2
dx.dy
11 3 9 20 10 100 30
10 2 4 18 8 64 16
9 1 1 12 2 4 2
8 0 0 8 -2 4 0
7 -1 1 10 0 0 0
6 -2 4 5 -5 25 10
5 -3 9 4 -6 36 18
=0 ∑dx2
=28 ∑dy=7 ∑dy2=
233 ∑dx.dy=76
r=
𝑁∑𝑑𝑥.𝑑𝑦−∑𝑑𝑥.∑𝑑𝑦
√{𝑁∑𝑑𝑥2−(∑𝑑𝑥)^2}{𝑁∑𝑑𝑦2−(∑𝑑𝑦)^2}
r=
7∗76−0∗7
√{7∗28−(0)}{7∗233−72}
r=+.94
COMMENT-there exists a very high degree of correlation
PROBABLE ERRORS:
PE= .6745
(1−𝑟2)
√𝑁
STANDARD ERROR
SE=
(1−𝑟2)
√𝑁
CORRELATION
Relationship between SE & PE
PE= 2/3 S.E.
SPEARMAN’S RANK CORRELATION COEFFICIENT
rs=1-
6 ∑𝐷2
𝑁(𝑁2−1)
∑𝐷2 = 𝑠𝑢𝑚 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒𝑠 𝑜𝑓 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒𝑠 𝑖𝑛 𝑟𝑎𝑛𝑘𝑠
N=NO. of pairs
Rx Ry Dxy=
Rx-
Ry
D2
Dyz=Ry-
Rz
D2
Dzx=Rx-
Rz
D2
5 3 2 4
3 7 -4 16
4 5 -1 1
8 9 -1 1
2 2 0 0
1 4 -3 9
7 1 6 36
10 10 0 0
6 8 -2 4
9 6 3 9
∑D2
=80
rs=1-
6 ∑𝐷2
𝑁(𝑁2−1)
rs=1-
6∗80
10(100−1)
=.52
CORRELATION
Question 2:
x 22 24 27 35 21 20 27 25 27 23
y 30 38 40 50 38 25 38 36 41 32
Solution:
X Rx Y Ry D=Rx-Ry D2
22 8 30 9 -1 1
24 6 38 5 1 1
27 3 40 3 0 0
35 1 50 1 0 0
21 9 38 5 4 16
20 10 25 10 0 0
27 3 38 5 -2 4
25 5 36 7 -2 4
27 3 41 2 1 1
23 7 32 8 -1 1
=28
=2+3+4/3=3
=4+5+6/3=5
rs=1-
6{∑𝐷2+
1
12
(𝑚3−𝑚)+
1
12
(𝑚3−𝑚)}
𝑁(𝑁2−1)
where, m= No. OF TIMES AN ITEM has been repeated (e.g., 27 & 38 has
been repeated thrice)
=1-
6{28+
1
12
(33−3)+
1
12
(33−3)}
10(102−1)
=+.81
CORRELATION
REGRESSION EQUATIONS
SHORT CUT METHOD
X 0N Y
X-𝑋
̅=r*
σx
σy
(y-𝑦
̅)
OR
X-𝑋
̅=bxy(y-𝑦
̅)
y 0N X
Y-𝑌
̅=r* σY/ σX(X-𝑋
̅)
OR
y-𝑦
̅=byx(X-𝑋
̅)
X Dx dx2
Y Dy dy2
dx.dy
1 -2 4 6 -1 1 2
2 -1 1 8 1 1 -1
3 0 0 7 0 0 0
4 1 1 6 -1 1 -1
5 2 4 8 1 1 2
10 4 2
𝑥̅=3, 𝑦
̅=7
X 1 2 3 4 5
Y 6 8 7 6 8
CORRELATION
r=
∑𝑑𝑥.𝑑𝑦
√∑𝑑𝑥2.∑𝑑𝑦2
=2/√10 ∗ 4
=.32
σX =√∑𝑑𝑥2/𝑁
=√10/5
=1.41
σY =√∑𝑑𝑌2/𝑁
=√4/5
=.89
X on Y
X-𝑋
̅=r*
σx
σy
(y-𝑦
̅)
X-3=.32*1.41/.89(Y-7)-----------(1)
X=0.51Y-.57
Y on X
Y-𝑌
̅=r* σY/ σX(X-𝑋
̅)
Y-7=.32*.89/1.41(X-3)
Y=.2X+6.4
CORRELATION
Least squares method/ Direct Method
X on Y
X=a+by------------(1)
∑x= Na+b ∑y
∑xy= a ∑y+b ∑y2
Y on X
Y=a+bX------------(2)
∑Y= Na+b ∑X
∑xy= a ∑X+b ∑X2
QUESTION2:
Y=?,X=30
X Y XY X2
Y2
1 6 6 1 36
2 8 16 4 64
3 7 21 9 49
4 6 24 16 36
5 8 40 25 64
∑X=15 ∑Y=35 ∑XY=107 55 249
X=a+by------------(1)
∑x= Na+b ∑y
X(population) 1 2 3 4 5
Y(no. of TV
demanded)
6 8 7 6 8
CORRELATION
∑xy= a ∑y+b ∑y2
15= 5a+35b
107= a35+249b
a=-0.5
b=0.5
lets substitute the values in the equation-(1)
X=.5y-.5
Y on X
Y=a+bX------------(2)
∑Y= Na+b ∑X
∑xy= a ∑X+b ∑X2
(35= 5a+b 15)*3
107= a15+55b---B
-105=-15a-45b---A
----------------------------
2=10b
b=.2
put the value of b in eq B
a=6.4
b=0.2
lets substitute the values in the equation-(2)
CORRELATION
Y=6.4+0.2X
Relationship b/w Correlation coefficient & regression
coefficients
Correlation coefficient
r=√𝑏𝑦𝑥 ∗ 𝑏𝑥𝑦
r=√. 2 ∗ .5
r=.32
find the value of y when x =7?
Y=6.4+0.2*7
Y=7.8
Exercise question:
X 1 2 3 4 5 6 7 8 9
Y 9 8 10 12 11 13 14 16 15
Regression equations, correlations coefficients_?
Y=?, x=6.2

correlation (3).pdf

  • 1.
    CORRELATION DIRECT METHOD r= ∑𝑑𝑥.𝑑𝑦 √∑𝑑𝑥2.∑𝑑𝑦2 where, dx=X-𝑋 ̅(ACTUALMEAN) dY=Y-𝑌 ̅(ACTUAL MEAN) X 11 10 9 8 7 6 5 Y 20 18 12 8 10 5 4 X Dx dx2 Y dy dy2 dx.dy 11 3 9 20 9 81 27 10 2 4 18 7 49 14 9 1 1 12 1 1 1 8 0 0 8 -3 9 0 7 -1 1 10 -1 1 1 6 -2 4 5 -6 36 12 5 -3 9 4 -7 49 21 Dx=0 ∑dx2 =28 ∑dy2= 226 ∑dx.dy=76 r= ∑𝑑𝑥.𝑑𝑦 √∑𝑑𝑥2.∑𝑑𝑦2 r= 76 √28∗226 r=.96
  • 2.
    CORRELATION SHORT CUT METHOD r=𝑁∑𝑑𝑥.𝑑𝑦−∑𝑑𝑥.∑𝑑𝑦 {𝑁∑𝑑𝑥2−(∑𝑑𝑥)2}{𝑁∑𝑑𝑦2−(∑𝑑𝑦)2} dx=X-A(Assumed Mean) dy=Y-A N= no.of pairs X Dx=X-8 dx2 Y Dy dy2 dx.dy 11 3 9 20 10 100 30 10 2 4 18 8 64 16 9 1 1 12 2 4 2 8 0 0 8 -2 4 0 7 -1 1 10 0 0 0 6 -2 4 5 -5 25 10 5 -3 9 4 -6 36 18 =0 ∑dx2 =28 ∑dy=7 ∑dy2= 233 ∑dx.dy=76 r= 𝑁∑𝑑𝑥.𝑑𝑦−∑𝑑𝑥.∑𝑑𝑦 √{𝑁∑𝑑𝑥2−(∑𝑑𝑥)^2}{𝑁∑𝑑𝑦2−(∑𝑑𝑦)^2} r= 7∗76−0∗7 √{7∗28−(0)}{7∗233−72} r=+.94 COMMENT-there exists a very high degree of correlation PROBABLE ERRORS: PE= .6745 (1−𝑟2) √𝑁 STANDARD ERROR SE= (1−𝑟2) √𝑁
  • 3.
    CORRELATION Relationship between SE& PE PE= 2/3 S.E. SPEARMAN’S RANK CORRELATION COEFFICIENT rs=1- 6 ∑𝐷2 𝑁(𝑁2−1) ∑𝐷2 = 𝑠𝑢𝑚 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒𝑠 𝑜𝑓 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒𝑠 𝑖𝑛 𝑟𝑎𝑛𝑘𝑠 N=NO. of pairs Rx Ry Dxy= Rx- Ry D2 Dyz=Ry- Rz D2 Dzx=Rx- Rz D2 5 3 2 4 3 7 -4 16 4 5 -1 1 8 9 -1 1 2 2 0 0 1 4 -3 9 7 1 6 36 10 10 0 0 6 8 -2 4 9 6 3 9 ∑D2 =80 rs=1- 6 ∑𝐷2 𝑁(𝑁2−1) rs=1- 6∗80 10(100−1) =.52
  • 4.
    CORRELATION Question 2: x 2224 27 35 21 20 27 25 27 23 y 30 38 40 50 38 25 38 36 41 32 Solution: X Rx Y Ry D=Rx-Ry D2 22 8 30 9 -1 1 24 6 38 5 1 1 27 3 40 3 0 0 35 1 50 1 0 0 21 9 38 5 4 16 20 10 25 10 0 0 27 3 38 5 -2 4 25 5 36 7 -2 4 27 3 41 2 1 1 23 7 32 8 -1 1 =28 =2+3+4/3=3 =4+5+6/3=5 rs=1- 6{∑𝐷2+ 1 12 (𝑚3−𝑚)+ 1 12 (𝑚3−𝑚)} 𝑁(𝑁2−1) where, m= No. OF TIMES AN ITEM has been repeated (e.g., 27 & 38 has been repeated thrice) =1- 6{28+ 1 12 (33−3)+ 1 12 (33−3)} 10(102−1) =+.81
  • 5.
    CORRELATION REGRESSION EQUATIONS SHORT CUTMETHOD X 0N Y X-𝑋 ̅=r* σx σy (y-𝑦 ̅) OR X-𝑋 ̅=bxy(y-𝑦 ̅) y 0N X Y-𝑌 ̅=r* σY/ σX(X-𝑋 ̅) OR y-𝑦 ̅=byx(X-𝑋 ̅) X Dx dx2 Y Dy dy2 dx.dy 1 -2 4 6 -1 1 2 2 -1 1 8 1 1 -1 3 0 0 7 0 0 0 4 1 1 6 -1 1 -1 5 2 4 8 1 1 2 10 4 2 𝑥̅=3, 𝑦 ̅=7 X 1 2 3 4 5 Y 6 8 7 6 8
  • 6.
    CORRELATION r= ∑𝑑𝑥.𝑑𝑦 √∑𝑑𝑥2.∑𝑑𝑦2 =2/√10 ∗ 4 =.32 σX=√∑𝑑𝑥2/𝑁 =√10/5 =1.41 σY =√∑𝑑𝑌2/𝑁 =√4/5 =.89 X on Y X-𝑋 ̅=r* σx σy (y-𝑦 ̅) X-3=.32*1.41/.89(Y-7)-----------(1) X=0.51Y-.57 Y on X Y-𝑌 ̅=r* σY/ σX(X-𝑋 ̅) Y-7=.32*.89/1.41(X-3) Y=.2X+6.4
  • 7.
    CORRELATION Least squares method/Direct Method X on Y X=a+by------------(1) ∑x= Na+b ∑y ∑xy= a ∑y+b ∑y2 Y on X Y=a+bX------------(2) ∑Y= Na+b ∑X ∑xy= a ∑X+b ∑X2 QUESTION2: Y=?,X=30 X Y XY X2 Y2 1 6 6 1 36 2 8 16 4 64 3 7 21 9 49 4 6 24 16 36 5 8 40 25 64 ∑X=15 ∑Y=35 ∑XY=107 55 249 X=a+by------------(1) ∑x= Na+b ∑y X(population) 1 2 3 4 5 Y(no. of TV demanded) 6 8 7 6 8
  • 8.
    CORRELATION ∑xy= a ∑y+b∑y2 15= 5a+35b 107= a35+249b a=-0.5 b=0.5 lets substitute the values in the equation-(1) X=.5y-.5 Y on X Y=a+bX------------(2) ∑Y= Na+b ∑X ∑xy= a ∑X+b ∑X2 (35= 5a+b 15)*3 107= a15+55b---B -105=-15a-45b---A ---------------------------- 2=10b b=.2 put the value of b in eq B a=6.4 b=0.2 lets substitute the values in the equation-(2)
  • 9.
    CORRELATION Y=6.4+0.2X Relationship b/w Correlationcoefficient & regression coefficients Correlation coefficient r=√𝑏𝑦𝑥 ∗ 𝑏𝑥𝑦 r=√. 2 ∗ .5 r=.32 find the value of y when x =7? Y=6.4+0.2*7 Y=7.8 Exercise question: X 1 2 3 4 5 6 7 8 9 Y 9 8 10 12 11 13 14 16 15 Regression equations, correlations coefficients_? Y=?, x=6.2