Professional Documents
Culture Documents
211MAT1302 Unit-3
211MAT1302 Unit-3
211MAT1302 Unit-3
1
P 1
P
x= n
x and y = n
y
Properties:
1. −1 ≤ r(X, Y ) ≤ 1
2. Correlation coefficient is independent of change of origin,
i.e. r(X + a, Y + b) = r(X, Y ) where a and b are constants.
3. Correlation coefficient is independent of scale,
i.e., r(aX, bY ) = r(X, Y ) where a > 0 and b > 0 are constants.
O X O X O X
r>0 r<0 r=0
Y Y
``
`
`` ``
` ``
`
` ``
` `
`` ` `
O X O
r = +1 r = −1 X
1. E(a) = a.
4. V ar(a) = 0.
5. V ar(aX) = a2 V ar(X).
8. Cov(X + a, Y + b) = Cov(X, Y ).
9. Cov(aX, bY ) = abCov(X, Y ).
= k + k = 2k
Cov(U, V ) 0
Now r(U, V ) = = √ √ =0
σU σV 2k. 2k
Problem: Two random variables X and Y are related as Y = 4X + 9. Find
the correlation coefficient between X and Y .
Solution: Given Y = 4X + 9.
Now Cov(X, Y ) = E(XY ) − E(X)E(Y )
= E {X(4X + 9)} − E(X)E(4X + 9)
= E {4X 2 + 9X} − E(X) {4E(X) + 9}
= 4E(X
2
) + 9E(X) − 4 {E(X)}2 − 9E(X)
= 4 E(X 2 ) − {E(X)}2
2
= 4Var(X) = 4σX
Cov(U, V ) 144 48
Now, r(U, V ) = = 13×15
= 65
σU σV
Problem: Compute the coefficient of correlation between x and y, from the
following data.
x 1 3 5 7 8 10
y 8 12 15 17 18 20
Solution:
x y xy x2 y2
1 8 8 1 64
3 12 36 9 144
5 15 75 25 225
7 17 119 49 289
8 18 144 64 324
10 20 200 100 400
34 90 582 248 1446
1
P 34 17 1
P 90
x= 6
x= 6
= 3
; y= 6
y= 6
= 15
P P
σx2 = 1
6
x2 − x2 = 248
6
− ( 17
3
)2 = 83
9
; σy2 = 1
6
y2 − y2 = 1446
6
− 152 = 16
P
Cov(x, y) = 16 xy − x.y = 582
6
− ( 17
3
).15 = 12
Cov(x, y) 12
r= = q √ = 0.9879
σx .σy 83
16 9
x 65 67 66 71 67 70 68 69
y 67 68 68 70 64 67 72 70
Solution:
x y xy x2 y2
65 67 4355 4225 4489
67 68 4556 4489 4624
66 68 4488 4356 4624
71 70 4970 5041 4900
67 64 4288 4489 4096
70 67 4690 4900 4489
68 72 4896 4624 5184
69 79 5451 4761 6241
543 555 37694 36885 38647
1
P 543 1
P 555
x= 8
x= 8
= 67.875; y = 8
y= 8
= 69.375
P
σx2 = 1
8
x2 − x2 = 36885
8
− (67.875)2 = 231
64
;
P
σy2 = 1
8
y2 − y2 = 38647
8
− 69.3752 = 1151
64
P
Cov(x, y) = 18 xy − x.y = 37694
8
− (67.875).(69.375) = 187
64
187
Cov(x, y)
r= = q 64 q = 0.3627
σx .σy 231 1151
64 64
1
P 410 1
P 280
x= 7
x= 7
; y= 7
y= 7
= 40
P
σx2 = 1
7
x2 − x2 = 24050
7
− ( 410
7
)2 = 5.1020;
P
σy2 = 1
7
y2 − y2 = 11280
7
− 402 = 80
7
P
Cov(x, y) = 17 xy − x.y = 16448
7
− ( 410
7
).(40) = 6.8571
Cov(x, y) 6.8571
r= =√ q = 0.8980
σx .σy 5.1020 807
X Y Rank in X Rank in Y d = x − y d2
(x) (y)
78 84 4 3 1 1
36 51 9 9 0 0
98 91 1 1 0 0
25 60 10 7 3 9
75 68 5 4 1 1
82 62 3 6 −3 9
90 86 2 2 0 0
62 58 7 8 −1 1
65 63 6 5 1 1
39 47 8 10 −2 4
26
P
Here n = 10, d2 = 26
P
6 d2 6 × 26
Rank Correlation, ρ = 1 − =1− = 0.8424
n(n − 1)
2 10(102 − 1)
Problem: Obtain the rank correlation for 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:
X Y Rank in X Rank in Y d = x − y d2
(x) (y)
68 62 4 5 −1 1
64 58 6 7 −1 1
75 68 2.5 3.5 −1 1
50 45 9 10 −1 1
64 81 6 1 5 25
80 60 1 6 −5 25
75 68 2.5 3.5 −1 1
40 48 10 9 1 1
55 50 8 8 0 0
64 70 6 2 4 16
72
P
Here n = 10, d = 72
m(m2 − 1) 2(22 − 1)
CF for X = 75 : = = 0.5
12 12
m(m − 1)
2
3(3 − 1)
2
CF for X = 64 : = =2
12 12
Compiled by: Dr. K. Karuppasamy, www.drkk.in, KARE Page: 8
211MAT1302- Statistics for Engineers Course Material
m(m2 − 1) 2(22 − 1)
CF for Y = 68 : = = 0.5
12 12
∴ Total CF = 0.5 + 2 + 0.5 = 3
P
6( d2 + CF ) 6 × (72 + 3)
Rank Correlation, ρ = 1 − =1− = 0.5455
n(n − 1)
2 10(102 − 1)
Problem: Ten competitors in a musical contest were ranked by three judges
A, B and C as follows:
Competitors: 1 2 3 4 5 6 7 8 9 10
Rank by A: 1 6 5 10 3 2 4 9 7 8
Rank by B: 3 5 8 4 7 10 2 1 6 9
Rank by C: 6 4 9 8 1 2 3 10 5 7
Using rank correlation technique, find which pair of judges have more or less
the same taste in music.
Solution:
Rank Rank Rank
by A by A by A d1 = d2 = d3 = d21 d22 d23
(x) (y) (z) x − y y − z x − z
1 3 6 −2 −3 −5 4 9 25
6 5 4 1 1 2 1 1 4
5 8 9 −3 −1 −4 9 1 16
10 4 8 6 −4 2 36 16 4
3 7 1 −4 6 2 16 36 4
2 10 2 −8 8 0 64 64 0
4 2 3 2 −1 1 4 1 1
9 1 10 8 −9 −1 64 81 1
7 6 5 1 1 2 1 1 4
8 9 7 −1 2 1 1 4 1
200 214 60
P P P
Here n = 10, d21 = 200, d22 = 214, d23 = 60
P
6 d21 6 × 200
ρ(A, B) = 1 − =1− = −0.2121
n(n − 1)
2 10(102 − 1)
P
6 d22 6 × 214
ρ(B, C) = 1 − =1− = −0.2970
n(n − 1)
2 10(102 − 1)
P
6 d23 6 × 60
ρ(A, C) = 1 − =1− = 0.6364
n(n − 1)
2 10(102 − 1)
Since ρ(A, C) > ρ(B, C) > ρ(A, B), judges A and C have more or less the
same taste in music.
Regression Analysis
(1 − r2 ) σx σy
tan θ =
|r| σx2 + σy2
⇒ y − 18 = 0.0316(x − 970)
⇒ y = 0.0316x − 12.652
Problem: Find the correlation coefficient and the regression lines from the
following data:
x 62 64 65 69 70 71 72 74
y 126 125 139 145 165 152 180 208
Solution:
x y xy x2 y2
62 126 7812 3844 15876
64 125 8000 4096 15625
65 139 9035 4225 19321
69 145 10005 4761 21025
70 165 11550 4900 27225
71 152 10792 5041 23104
72 180 12960 5184 32400
74 208 15392 5476 43264
547 1240 85546 37527 197840
1
P 547
P
x= 8
x= 8
= 68.375; y = 18 y = 1240
8
= 155
P
σx2 = 1
8
x2 − x2 = 37527
8
− 68.3752 = 15.7344;
P
σy2 = 1
8
y2 − y2 = 197840
8
− 1552 = 705
P
Cov(x, y) = 1
8
xy − x.y = 85546
8
− (68.375).(155) = 95.125
Cov(x, y) 95.125
r= =√ √ = 0.9032
σx .σy 15.7344 705
Cov(x, y) 95.125
Now byx = 2
= = 6.0457
σx 15.7344
Cov(x, y) 95.125
bxy = 2
= = 0.1349
σy 705
⇒ y = 6.0457x − 258.3747
⇒ x = 0.1349y + 47.4655.
(2) ⇒ x = 9
20
y + 107
20
⇒ byx = 4
5
and bxy = 9
20
p q
We have r = ± byx .bxy = 4 9
.
5 20
= ± 35