bus-stat-book1

X 1 2 3 4 5 6 7 8 y 9 8 10 12 11 13 14 16 x 1 2 3 4 5

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x,y) = ∑( x − x)( y − n y) = Σ( xy + x y − yx − x y ) n 197 yΣx xΣy Σxy Σx y + n n n n Σxy Σxy Cov(x,y) = = − yx - x y + x y − xy n n 2 2 Σx 2 Σy 2 22 22 σx = σx -x ,σy = σ -y n n C ov( x, y ) Now r = σ x .σ y = Σxy − xy n r= 2 2 Σx 2 Σy 2 -x. -y n n nΣxy - (Σx) (Σy ) r= [nΣx 2 − (Σx ) 2 ][nΣy 2 - (Σy )2 ] Note: In the above method we need not find mean or standard deviation of variables separately. Example 2: Calculate coefficient of correlation from the following data. X 1 2 3 4 5 6 7 8 Y 9 8 10 12 11 13 14 16 x 1 2 3 4 5 6 7 8 9 45 y 9 8 10 12 11 13 14 16 15 108 x2 1 4 9 16 25 36 49 64 81 285 198 y2 81 64 100 144 121 169 196 256 225 1356 xy 9 16 30 48 55 78 98 128 135 597 9 15 r= r= nΣxy - (Σx) (Σy ) [nΣx 2 − (Σx ) 2 ][nΣy 2 - (Σy )2 ] 9 × 597 - 45 × 108 (9 × 285 − (45) ) .(9 × 1356 − (108) ) 2 r= = 2 5373 - 4860 (2565 − 2025). 12204 − 11664) ( 513 513 = = 0.95 540 540 × 540 Working rule (ii) (shortcut method) C ov( x, y ) We have r = σ x .σ y where Cov( x,y) = ∑( x − x)( y − y) n Take the deviation from x as x – A and the deviation from y as y−B Σ [( x - A) - ( x − A)] [( y - B) - ( y − B)] Cov(x,y) = n 1 = Σ [( x - A) ( y - B) - ( x - A) ( y - B) n - ( x − A)( y − B) + ( x − A)( y − B)] = = 1 Σ( x - A) Σ [( x - A) ( y - B) - ( y - B) n n Σ( y - B ) Σ( x - A)( y − B) − ( x − A) + n n Σ( x - A)( y - B) nA ) − ( y − B) ( x − n n nB ) + ( x − A) ( y − B) − ( x − A) ( y − n 199 = Σ( x - A)( y - B) − ( y − B) ( x − A) n − ( x − A) ( y − B ) + ( x − A) ( y − B) Σ( x - A)( y - B) − ( x − A) ( y − B) n Let x- A = u ; y - B = v; x− A=u ; y−B =v Σuv − uv ∴Cov (x,y) = n 2 Σu 2 x σσ x2 = − u = σ u2 n 2 Σv 2 yy σσ 2 = − v = σ v2 n nΣuv − (Σu )(Σv) ∴r = nΣu 2 − (Σu )2 . (nΣv 2 ) − (Σv)2 Example 3: Calculate Pearson’ s Coefficient of correlation. X 45 55 56 58 60 65 68 70 75 Y 56 50 48 60 62 64 65 70 74 = X 45 55...
View Full Document

Ask a homework question - tutors are online