Page 301 - DMTH404_STATISTICS
P. 301
Unit 22: Correlation
X Y Notes
X Y i i
i
i
2 n 2 .... (5)
X Y
2
2
X i Y i
i
n i n
On multiplication of numerator and denominator by n, we can write
n X Y X i Y i
i
i
r .... (6)
XY 2 2
2
2
n X X i n Y Y i
i
i
Further, if we assume x = X - X and y =Y - Y , equation (2), given above, can be written as
i i i i
1
x y i
i
r XY n .... (7)
1 x 2 1 y 2
n i n i
x y
or r XY i i .... (8)
2
x i y 2 i
1 x y
or r i i .... (9)
XY
n y
x
Equations (5) or (6) are often used for the calculation of correlation from raw data, while the use
of the remaining equations depends upon the forms in which the data are available. For example,
if standard deviations of X and Y are given, equation (9) may be appropriate.
Example 1: Calculate the Karl Pearson's coefficient of correlation from the following
pairs of values :
Values of X : 12 9 8 10 11 13 7
Values of Y : 14 8 6 9 11 12 3
Solution.
The formula for Karl Pearson's coefficient of correlation is
n X Y X i Y i
i
i
r
XY 2 2
2
2
n X X i n Y Y i
i
i
LOVELY PROFESSIONAL UNIVERSITY 293