4.4 Correlation and Simple Linear Regression
4.4 Correlation and Simple Linear Regression
Correlation &
Simple Linear Regression
Prepared by:
Asst. Prof. Xandro Alexi A. Nieto
Correlation
𝑛 σ 𝑥𝑦 − σ 𝑥 σ 𝑦
𝑟=
2 2 2 2
𝑛 σ𝑥 − σ𝑥 𝑛 σ𝑦 − σ𝑦
=PEARSON(X:Y) or =CORREL(X:Y)
Correlation
Height, X Weight, Y X2 Y2 XY
77 230 5929 52900 17710 n σ xy − σ x σ y
76 225 5776 50625 17100 r=
2 2 2 2
77 241 5929 58081 18557 n σx − σx n σy − σy
72 209 5184 43681 15048
76 225 5776 50625 17100
77 235 5929 55225 18095 14 239135 − (1055)(3172)
r=
77 228 5929 51984 17556 [14 79533 − 1055 2 ][14 719740 − 3172 2 ]
74 214 5476 45796 15836
74 240 5476 57600 17760 r = 0.563
75 233 5625 54289 17475
74 225 5476 50625 16650
76 220 5776 48400 16720
74 222 5476 49284 16428
76 225 5776 50625 17100
Sums: 1055 3172 79533 719740 239135
10
Simple Linear Regression
n σ xy − σ x σ y
b= SLOPE =SLOPE(Y:X)
2 2
n x − σx
σ
Y-INTERCEPT
σy σx =INTERCEPT(Y:X)
a= −b
n n
11
Simple Linear Regression
12
Simple Linear Regression
Height, X Weight, Y X2 Y2 XY
77 230 5929 52900 17710 n σ xy − σ x σ y
76 225 5776 50625 17100 b= 2
n σx − σx 2
77 241 5929 58081 18557
72 209 5184 43681 15048 14 239135 − (1055)(3172)
76 225 5776 50625 17100 b=
77 235 5929 55225 18095
14 79533 − 1055 2
77 228 5929 51984 17556 b = 3.272
74 214 5476 45796 15836
74 240 5476 57600 17760
75 233 5625 54289 17475
σy σx
74 225 5476 50625 16650 a= −b
76 220 5776 48400 16720 n n
74 222 5476 49284 16428 3172 1055
76 225 5776 50625 17100 a= − (3.272)
1055 3172 79533 719740 239135
14 14
a = −20.02
13
13
Simple Linear Regression
Y = − 20.02 + 3.272X,
14
14
Simple Linear Regression
Y = -20.02+3.272X
Y = -20.02 +3.272(71)
Y = 212.292
15
15
Simple Linear Regression
16
Correlation and SLR
CORRELATION DOES
NOT IMPLY
CAUSATION!
17
Correlation and SLR
https://youtu.be/8HLtFv_KqoE
18
END OF UNIT 4.4