Professional Documents
Culture Documents
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
𝑛 𝑥 − 𝑥 𝑛 𝑦 − 𝑦
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
74
220
222
5776
5476
48400
49284
16720
16428
=PEARSON(X:Y) or
76
Sums: 1055
225
3172
5776
79533
50625
719740
17100
239135
=CORREL(X:Y)
8
Simple Linear Regression
n xy − x y
b= 2
n x − x 2
y x
a= −b
n n
9
Simple Linear Regression
10
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 =SLOPE(Y:X)
75 233 5625 54289 17475
74 225 5476 50625 16650
y x
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
=INTERCEPT(Y:X)
11
11
Simple Linear Regression
Y = − 20.02 + 3.272X,
12
12
Simple Linear Regression
Y = -20.02+3.272X
Y = -20.02 +3.272(71)
Y = 212.292
=FORECAST(x,Y,X)
13
13
END OF UNIT 4.4