Correlation
Correlation
Correlation
Reliability
Age of Car
No relation
Example:
COV ( x, y )
r
V ( x)V ( y )
SPxy
SS x SS y
n
( x x )( y
i 1
i i y)
n n
i
( x
i 1
x ) 2
i
( y
i 1
y ) 2
How to compute the simple correlation
coefficient (r)
xi yi x y
i i
r n
( xi ) 2
( yi )
2
xi
2
. yi
2
n n
Correlation
perfect perfect
correlation correlation
no
relation
Correlation
If r = l = perfect correlation.
Example:
xi yi x yi i
r n
xi 2 i . yi 2 i
( x ) 2
( y ) 2
n n
Weight Age
Serial
Y2 X2 xy (Kg) (years)
.n
(y) (x)
144 49 84 12 7 1
64 36 48 8 6 2
144 64 96 12 8 3
100 25 50 10 5 4
121 36 66 11 6 5
169 81 117 13 9 6
291 6 . 742
6
r = 0.759
strong direct correlation
EXAMPLE: Relationship between Anxiety and Test
Scores
Anxiety Test X2 Y2 XY
)X( score (Y)
10 2 100 4 20
8 3 64 9 24
2 9 4 81 18
1 7 1 49 7
5 6 25 36 30
6 5 36 25 30
X = 32∑ Y = 32∑ X2 = 230∑ Y2 = 204∑ XY=129∑
Calculating Correlation Coefficient
(6)(129) (32)(32) 774 1024
r .94
6(230) 32 6(204) 32
2 2
(356)(200)
r = - 0.94
6 (di) 2
rs 1
n(n 2 1)
∑
di2=64
6 64
rs 1 0.1
7(48)
Comment:
There is an indirect weak correlation between level of
education and income.
Exercise 2 B.P Age B.P Age
(y) (x) (y) (x)
128 46 120 20
The following are the 136 53 128 43
age (in years) and 146 60 141 63
systolic blood
pressure of 20 124 20 126 26
apparently healthy 143 63 134 53
adults. 130 43 128 31
124 26 136 58
121 19 132 46
126 31 140 58
123 23 144 70
Find the correlation between age
and blood pressure using simple
and Spearman's correlation
coefficients, and comment.
x2 xy y x Serial
400 2400 120 20 1
1849 5504 128 43 2
3969 8883 141 63 3
676 3276 126 26 4
2809 7102 134 53 5
961 3968 128 31 6
3364 7888 136 58 7
2116 6072 132 46 8
3364 8120 140 58 9
4900 10080 144 70 10
x2 xy y x Serial
2116 5888 128 46 11
2809 7208 136 53 12
3600 8760 146 60 13
400 2480 124 20 14
3969 9009 143 63 15
1849 5590 130 43 16
676 3224 124 26 17
361 2299 121 19 18
961 3906 126 31 19
529 2829 123 23 20
41678 114486 2630 852 Total