Académique Documents
Professionnel Documents
Culture Documents
Chapter Eleven
Simple Linear Regression
11-2 of 27
McGraw-Hill/Irwin
11-3 of 27
y|x = + 1x +
when
x.
Average
Hourly
Temperature
Week x (deg F)
1
28.0
2
28.0
3
32.5
4
39.0
5
45.9
6
57.8
7
58.1
8
62.5
Weekly Fuel
Consumption
y (MMcf)
12.4
11.7
12.4
10.8
9.4
9.5
8.0
7.5
11-5 of 27
Estimation/Prediction Equation:
b1
SS xy
SS xx
SS xy ( xi x )( yi y )
SS xx ( xi x ) xi2
2
x y
xy
i
b0 y b1 x
11-6 of 27
y
n
x2
784.00
784.00
1056.25
1521.00
2106.81
3340.84
3375.61
3906.25
16874.76
x
28.0
28.0
32.5
39.0
45.9
57.8
58.1
62.5
351.8
xy
347.20
327.60
403.00
421.20
431.46
549.10
464.80
468.75
3413.11
Slope b1
SS xy
SS xx xi2
b1
SS xy
SS
11-7 of 27 xx
x
i
16874.76
179.6475
0.1279
1404.355
(351.8)
1404.355
8
y-Intercept b0
81.7
10.2125
n
8
xi 351.8 43.98
x
n
8
y
b0 y b1 x
10.2125 (0.1279)(43.98)
15.84
y= y|x = 0 1 x
11-8 of 27
11-9 of 27
(y
s 2 MSE
y i ) 2
SSE
n- 2
y
12.4
11.7
12.4
10.8
9.4
9.5
8.0
7.5
11-10 of 27
x
28.0
28.0
32.5
39.0
45.9
57.8
58.1
62.5
pred
12.2588
12.2588
11.6833
10.8519
9.9694
8.4474
8.4090
7.8463
SSE
n-2
y - pred
0.1412
-0.5588
0.7168
-0.0519
-0.5694
1.0526
-0.4090
-0.3462
SSE
(y - pred)2
0.019937
0.312257
0.513731
0.002694
0.324205
1.108009
0.167289
0.119889
2.568011
s 2 MSE
SSE
n- 2
2.568
0.428
6
s s 2 0.428
0.6542
p-Value
Reject H0 if:
t t
H a : 1 0
t t
H a : 1 0
t t / 2 , that is
H a : 1 0
t t / 2 or t t / 2
Test Statistic
b
s
t= 1 where sb1
sb1
SS xx
t, t/2
11-11 of 27
Reject H0 if:
p-Value
H a : 0 0
t t
H a : 0 0
t t / 2 , that is
H a : 0 0
t t
t t / 2 or t t / 2
Test Statistic
b0
1 x2
t=
where sb0 s
sb0
n SS xx
, t/2
11-12 of t27
Example 11.7
The Fuel Consumption
Case
Excel Output
ANOVA
df
11-13 of 27
SS
22.980816
2.567934
25.548750
MS
22.980816
0.427989
F
Significance F
53.694882 0.000330052
Regression
Residual
Total
1
6
7
Intercept
Temp
Tests
Intercept
Temp
Intervals
Prediction (x = x0)
Distance Value
1 ( x0 x ) 2
n
SS xx
If the regression assumptions hold,
y b0 b1 x0
[y t /2 s Distance value ]
[y t /2 s 1 + Distance value ]
11-14 of 27
11-15 of 27
95.0% CI
10.130, 11.312)
95.0% PI
9.014, 12.428)
Explained variation
r
Total variation
2
r= r 2 if b1 is positive, and
r= r 2 if b1 is negative
Where, b1 is the slope of the least squares line.
ANOVA
df
Regression
Residual
Total
11-17 of 27
1
6
7
SS
22.980816
2.567934
25.548750
MS
22.980816
0.427989
Regression Statistics
Multiple R
0.948413871
R Square
0.899488871
Adjusted R Square
0.882737016
Standard Error
0.654208646
Observations
8
F
Significance F
53.694882 0.000330052
Example 11.15
Fuel
Consumption
Excel Output
22.980816
r
0.899489
25.548750
r 0.899489 0.948414
2
11-18 of 27
F(model)
Explained variation
(Unexplained variation)/(n - 2)
Reject H0 if
F(model) > For
p-value <
Excel Output
ANOVA
df
Regression
Residual
Total
1
6
7
SS
22.980816
2.567934
25.548750
MS
22.980816
0.427989
F
Significance F
53.694882 0.000330052
F-test at = 0.05
level of
significance
Test Statistic:
F(model)
Explained variation
22.980816
53.695
(Unexplained variation)/(n - 2) 2.567904 /(8 2)
11-21 of 27
11-22 of 27
11-23 of 27
11-24 of 27
I Chart of Residuals
500
300
3.0SL=396.3
100
Residual
Residual
200
0
-100
2
2
X=0.000
-200
-3.0SL=-396.3
-300
-500
-2
-1
Normal Score
30
40
Residual
11-25 of 27
20
300
Residual
Frequency
Histogram of Residuals
9
8
7
6
5
4
3
2
1
0
10
Observation Number
0 2004006008001000
1 200
1400
1600
1 800
Fit
SS xy2
SS xx
SS xy ( xi x )( yi y )
11-26 of 27
SS yy ( yi y ) yi2
SS xx ( xi x ) xi2
2
SS xx
x y
xy
SS xy2