Materi 5.1-Inference in Simple Linear Regression
Materi 5.1-Inference in Simple Linear Regression
Materi 5.1-Inference in Simple Linear Regression
Y 0 1 x ~ N (0, )
• 1 > 0 Positive Association
• 1 < 0 Negative Association
• 1 = 0 No Association
Least Squares Estimation of 0, 1
0 Mean response when x=0 (y-intercept)
1 Change in mean response when x
increases by 1 unit (slope)
0, 1 are unknown parameters (like m)
0+1x Mean response when explanatory
variable takes on the value x
Goal: Choose values (estimates) that
minimize the sum of squared errors (SSE) of
observed values to the straight-line:
2
n
2
^ ^ ^
^
^ ^
y 0 1 x SSE i 1 yi y i i 1 yi 0 1 xi
n
Example - Pharmacodynamics of LSD
70
60
Score (y) LSD Conc (x)
78.93 1.17 50
58.20 2.97
67.47 3.26 40
37.47 4.69
45.65 5.83 30
SCORE
32.92 6.00
20
29.97 6.41 1 2 3 4 5 6 7
LSD_CONC
Source: Wagner, et al (1968)
Least Squares Computations
x x
2
S xx
S xy x x y y
y y
2
S yy
^
1 x x y y S xy
x x
2
S xx
^ ^
0 y 1 x
2
^
y y
SSE
s2
n2 n2
Example - Pharmacodynamics of LSD
Score (y) LSD Conc (x) x-xbar y-ybar Sxx Sxy Syy
78.93 1.17 -3.163 28.843 10.004569 -91.230409 831.918649
58.20 2.97 -1.363 8.113 1.857769 -11.058019 65.820769
67.47 3.26 -1.073 17.383 1.151329 -18.651959 302.168689
37.47 4.69 0.357 -12.617 0.127449 -4.504269 159.188689
45.65 5.83 1.497 -4.437 2.241009 -6.642189 19.686969
32.92 6.00 1.667 -17.167 2.778889 -28.617389 294.705889
29.97 6.41 2.077 -20.117 4.313929 -41.783009 404.693689
350.61 30.33 -0.001 0.001 22.474943 -202.487243 2078.183343
350.61 30.33
y 50.087 x 4.333
7 7
^ 202.4872 ^ ^
1 9.01 0 y 1 x 50.09 (9.01)(4.33) 89.10
22.4749
^
y 89.10 9.01x s 2 50.72
SPSS Output and Plot of Equation
i a
c
d
a
i
i c
c
Bei
Mt
Eg
4
8
6
0 1(
9
3
7
4
2 L
a
D
80.00
Linear Regress ion
70.00
60.00
score
50.00
40.00
30.00
scor e = 89.12 + -9.01 * ls d_conc
1.00 2.00 R-Sq uare
3.00 = 0.88 5.00
4.00 6.00
lsd_conc
Inference Concerning the Slope (1)
^
n 7 1 9.01 s 50.72 7.12 S xx 22.475
^ 7.12
^
1
1.50
22.475
9.01
T .S . : tobs 6.01 R.R. :| tobs | t.025,5 2.571
1.50
• 95% Confidence Interval for 1 :
^ ^
( yi y ) ( yi y i ) ( y i y )
^ 2 ^ 2
( y y) ( y y ) ( y y)
2
i i i i
MSR
T .S . : Fobs 35.93
MSE
R.R. : Fobs F.05,1, 5 6.61
P val : P ( F 35.93)
Example - SPSS Output
Ob
m
dF
S
M
iag
f
2
1
2
8
21Ra
1
5
6 R
3
6 T
a
P
b
D