Chapetr 14-Intro Multiple Regression-MyLO 2020S1
Chapetr 14-Intro Multiple Regression-MyLO 2020S1
Objectives
In this chapter, you learn:
◼ How to develop a multiple regression model.
◼ How to interpret the regression coefficients.
◼ How to determine which independent variables to
include in the regression model.
◼ How to determine which independent variables are most
important in predicting a dependent variable.
◼ How to use categorical independent variables in a
regression model.
◼ How to use logistic regression to predict a categorical
dependent variable.
Yi = β 0 + β1X1i + β 2 X 2i + + β k X ki + ε i
Where:
β0 = Y intercept.
β1 = slope of Y with variable X1, holding X2, X3, X4, . . . , Xk constant.
β2 = slope of Y with variable X2, holding X1, X3, X4, . . . , Xk constant.
β3 = slope of Y with variable X3, holding X1, X2, X4,. . . , Xk constant.
.
.
βk = slope of Y with variable Xk, holding X1, X2, X3,. . . , Xk-1 constant.
εi = random error in Y for observation i.
3
Multiple Regression Model With
2 Independent Variables
Yi = β0 + β1X1i + β2X2i + εi
Where:
β0 = Y intercept.
β1 = slope of Y with variable X1, holding X2 constant.
β2 = slope of Y with variable X2, holding X1 constant.
εi = random error in Y for observation i.
ˆ = b + b X + b X + + b X
Yi 0 1 1i 2 2i k ki
X2
X1
Copyright © 2017 Pearson Education, Ltd. Chapter 14 - 6
6
Example:
2 Independent Variables
◼ A distributor of frozen dessert pies wants to
evaluate factors thought to influence demand.
R Square 0.52148
Adjusted R Square 0.44172
Standard Error 47.46341
Observations 15 Sales = 306.526 - 24.975(Price) + 74.131(Advertising)
ANOVA df SS MS F Significance F
Regression 2 29460.027 14730.013 6.53861 0.01201
Residual 12 27033.306 2252.776
Total 14 56493.333
9
The Multiple Regression Equation
10
11
12
Multiple Coefficient of Determination
In Excel
Regression Statistics
SSR 29,460.027
Multiple R 0.72213
r2 = = = .52148
R Square 0.52148 SST 56,493.306
Adjusted R Square 0.44172
52.1% of the variation in pie sales
Standard Error 47.46341
is explained by the variation in
Observations 15
price and advertising.
ANOVA df SS MS F Significance F
Regression 2 29460.027 14730.013 6.53861 0.01201
Residual 12 27033.306 2252.776
Total 14 56493.333
13
Adjusted r2
◼ r2 never decreases when a new X variable is
added to the model.
◼ This can be a disadvantage when comparing
models.
◼ What is the net effect of adding a new variable?
◼ We lose a degree of freedom when a new X
variable is added.
◼ Did the new X variable add enough
14
Adjusted r2 (continued)
15
Adjusted r2 in Excel
= .44172
Regression Statistics 2
Multiple R 0.72213 radj
R Square 0.52148
Adjusted R Square 0.44172
44.2% of the variation in pie sales is explained by the
Standard Error 47.46341 variation in price and advertising, taking into account
Observations 15 the sample size and number of independent variables.
ANOVA df SS MS F Significance F
Regression 2 29460.027 14730.013 6.53861 0.01201
Residual 12 27033.306 2252.776
Total 14 56493.333
16
17
18
F-Test for Overall Significance In Excel (continued)
Regression Statistics
Multiple R 0.72213
MSR 14,730.013
R Square 0.52148 FSTAT = = = 6.5386
Adjusted R Square 0.44172 MSE 2,252.776
Standard Error 47.46341
With 2 and 12 degrees P-value for
Observations 15 of freedom the F Test
ANOVA df SS MS F Significance F
Regression 2 29460.027 14730.013 6.53861 0.01201
Residual 12 27033.306 2252.776
Total 14 56493.333
19
20
ei = (Yi – Yi)
Assumptions:
◼ The errors are normally distributed.
21
Residual Plots Used
in Multiple Regression
◼ These residual plots are used in multiple
regression:
<
22
100 100
Residuals
Residuals
50 50
0 0
-50 -50
-100300 -100 4 5 6 7 8 9
350 400 450 500
Predicted Pie Sales Price
50
0 multiple regression
-50
-100 2.5
model is appropriate for
3 3.5 4 4.5 5
Advertising predicting pie sales.
23
◼ Hypotheses:
◼ H0: βj = 0 (no linear relationship between Xj and Y.)
◼ H1: βj ≠ 0 (linear relationship does exist between Xj and Y.)
24
Are Individual Variables Significant? (continued)
Test Statistic:
bj − 0
t STAT = (df = n – k – 1)
Sb
j
25
Regression Statistics
t Stat for Price is tSTAT = -2.306, with
Multiple R 0.72213
R Square 0.52148
p-value .0398.
Adjusted R Square 0.44172
Standard Error 47.46341 t Stat for Advertising is tSTAT = 2.855,
Observations 15 with p-value .0145.
ANOVA df SS MS F Significance F
Regression 2 29460.027 14730.013 6.53861 0.01201
Residual 12 27033.306 2252.776
Total 14 56493.333
26
27
Confidence Interval Estimate
for the Slope
Confidence interval for the population slope βj
b j tα / 2 Sb where t has
(n – k – 1) d.f.
j
28
29
30
Testing Portions of the
Multiple Regression Model (continued)
SSR(X1 | X2)
= SSR (all variables) – SSR(X2)
31
32
33
Testing Portions of Model (continued)
Example:
H0: X1 (price) does not improve the model
with X2 (advertising) included.
H1: X1 (price) does improve the model.
= .05, df = 1 and 12
F0.05 = 4.75
(For X1 and X2) (For X2 only)
ANOVA ANOVA
df SS MS df SS
Regression 2 29460.02687 14730.01343 Regression 1 17484.22249
Residual 12 27033.30647 2252.775539 Residual 13 39009.11085
Total 14 56493.33333 Total 14 56493.33333
34
35
= .05, df = 1 and 12
F0.05 = 4.75
(For X1 and X2) (For X1 only)
ANOVA ANOVA
df SS MS df SS
Regression 2 29460.02687 14730.01343 Regression 1 11100.43803
Residual 12 27033.30647 2252.775539 Residual 13 45392.8953
Total 14 56493.33333 Total 14 56493.33333
36
Testing Portions of Model (continued)
Example:
(For X1 and X2) (For X1 only)
ANOVA ANOVA
df SS MS df SS
Regression 2 29460.02687 14730.01343 Regression 1 11100.43803
Residual 12 27033.30647 2252.775539 Residual 13 45392.8953
Total 14 56493.33333 Total 14 56493.33333
37
38
Chapter Summary
In this chapter we discussed:
◼ How to develop a multiple regression model.
◼ How to interpret the regression coefficients.
◼ How to determine which independent variables to
include in the regression model.
39
Week 13 Tutorial
Selected Practice Questions (see Levine et. al. 8th edition):
Page 504: 14.1a-b and 14.3a-c.
Page 507: 14.9a-e.
Page 513: 14.25a-b.
Page 518: 14.31a and 14.32a.
40
Week 13 Tutorial
Additional Practice Questions (Levine et. al. 7th edition):
41