chap 3 Multiple regression
chap 3 Multiple regression
Econometrics
Chapter 3
Multiple Regression
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-1
Chapter Goals
After completing this chapter, you should be able to:
Apply multiple regression analysis to business decision-
making situations
Analyze and interpret the computer output for a multiple
regression model
Perform a hypothesis test for all regression coefficients
or for a subset of coefficients
Fit and interpret nonlinear regression models
Incorporate qualitative variables into the regression
model by using dummy variables
Discuss model specification and analyze residuals
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-2
Y β0 β1X1 β2 X2 βk Xk ε
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-3
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-2
yˆ i b0 b1x1i b2 x 2i bk xki
In this chapter we will always use a computer to obtain the
regression slope coefficients and other regression
summary measures.
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-4
x2
x1
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-5
Multiple Regression
Motivation for multiple regression
Incorporate more explanatory factors into the model
Explicitly hold fixed other factors that otherwise
would be in
Allow for more flexible functional forms
Example: Wage equation
Now measures effect of education explicitly holding experience fixed
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-3
Multiple Regression
Example: Family income and family consumption
Other factors
c 0 c1x1i c 2 x 2i cK xKi 0
(This is the property of no perfect multicollinearity of
Xj’s)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-9
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-4
Example:
2 Independent Variables
A distributor of frozen desert pies wants to
evaluate factors thought to influence demand
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-12
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-5
Excel:
Tools / Data Analysis... / Regression
PHStat:
PHStat / Regression / Multiple Regression…
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-14
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
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-15
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-6
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-16
Coefficient of Determination, R2
Coefficient of Determination, R2
(continued)
Regression Statistics
SSR 29460.0
Multiple R 0.72213
R 2
.52148
R Square 0.52148 SST 56493.3
Adjusted R Square 0.44172
Standard Error 47.46341 52.1% of the variation in pie sales
Observations 15 is explained by the variation in
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
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-18
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-7
e 2
i
SSE
s 2 i1
n K 1 n K 1
e
where ei yi yˆ i
Standard Error, se
Regression Statistics
Multiple R 0.72213
R Square 0.52148
s e 47.463
Adjusted R Square 0.44172
The magnitude of this
Standard Error 47.46341
value can be compared to
Observations 15
the average y value
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
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-20
Adjusted Coefficient of
Determination, R 2
R2 never decreases when a new X variable is
added to the model, even if the new variable is
not an important predictor variable
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
explanatory power to offset the loss of one
degree of freedom?
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-21
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-8
Adjusted Coefficient of
Determination, R 2
(continued)
Used to correct for the fact that adding non-relevant
independent variables will still reduce the error sum of
squares
SSE / (n K 1)
R 2 1
SST / (n 1)
(where n = sample size, K = number of independent variables)
R2
Regression Statistics
Multiple R 0.72213 R 2 .44172
R Square 0.52148
Adjusted R Square 0.44172
44.2% of the variation in pie sales is
Standard Error 47.46341
explained by the variation in price and
Observations 15 advertising, taking into account 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
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-23
Coefficient of Multiple
Correlation
The coefficient of multiple correlation is the correlation
between the predicted value and the observed value of
the dependent variable
R r(yˆ , y) R 2
Is the square root of the multiple coefficient of
determination
Used as another measure of the strength of the linear
relationship between the dependent variable and the
independent variables
Comparable to the correlation between Y and X in
simple regression
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-24
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-9
Evaluating Individual
Regression Coefficients
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-25
Evaluating Individual
Regression Coefficients
(continued)
Test Statistic:
bj 0
t (df = n – k – 1)
Sb j
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-26
Evaluating Individual
Regression Coefficients
(continued)
Regression Statistics
Multiple R 0.72213
t-value for Price is t = -2.306, with
R Square 0.52148
p-value .0398
Adjusted R Square 0.44172
Standard Error 47.46341 t-value for Advertising is t = 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
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-27
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-10
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-30
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-11
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-31
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
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-33
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-12
Tests on a Subset of
Regression Coefficients
H0 : α1 α2 αr 0
H1 : at least one of α j 0 (j 1,...,r)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-35
Tests on a Subset of
Regression Coefficients
(continued)
( SSE(r) SSE ) / r
Reject H0 if F Fr,nK r 1,α
s2e
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-36
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-13
Prediction
Given a population regression model
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-37
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-38
Predictions in PHStat
PHStat | regression | multiple regression …
Check the
“confidence and
prediction interval
estimates” box
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-39
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-14
Predictions in PHStat
(continued)
Input values
<
Predicted y value
Confidence interval for the
<
mean y value, given
these x’s
ei = (yi – yi)
<
yi
x2i
x2
x1i
x1
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-41
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-42
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-15
Yi β0 β1X1i β 2 X1i2 ε i
where:
β0 = Y intercept
β1 = regression coefficient for linear effect of X on Y
β2 = regression coefficient for quadratic effect on Y
εi = random error in Y for observation i
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-43
Y Y
X X
residuals
residuals
X X
X1 X1 X1 X1
β1 < 0 β1 > 0 β1 < 0 β1 > 0
β2 > 0 β2 > 0 β2 < 0 β2 < 0
β1 = the coefficient of the linear term
β2 = the coefficient of the squared term
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-45
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-16
Hypotheses
H0: β2 = 0 (The quadratic term does not improve the model)
H1: β2 0 (The quadratic term improves the model)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-46
b2 β2
where:
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-47
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-48
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-17
Purity
Filter
Time
Purity increases as filter time
3 1 increases:
7 2 Purity vs. Time
8 3
100
15 5
22 7 80
33 8
40 10 60
Purity
54 12
40
67 13
70 14
20
78 15
85 15 0
87 16 0 5 10 15 20
99 17 Time
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-49
Standard
Coefficients Error t Stat P-value
t statistic, F statistic, and
Intercept -11.28267 3.46805 -3.25332 0.00691 R2 are all high, but the
Time 5.98520 0.30966 19.32819 2.078E-10 residuals are not random:
Regression Statistics Time Residual Plot
F Significance F
R Square 0.96888
373.57904 2.0778E-10
10
Adjusted R Square 0.96628
Residuals
5
Time 1.56496 0.60179 2.60052 0.02467
Time-squared 0.24516 0.03258 7.52406 1.165E-05 0
0 5 10 15 20
-5
Regression Statistics Time
F Significance F
R Square 0.99494
1080.7330 2.368E-13 Time-squared Residual Plot
Adjusted R Square 0.99402
10
Standard Error 2.59513
Residuals
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-18
Y β0 X1β1 Xβ22 ε
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-52
Interpretation of coefficients
For the multiplicative model:
log Yi log β0 β1 log X1i log εi
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-53
Dummy Variables
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-54
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-19
yˆ b0 b1x1 b2 x 2
Let:
y = Pie Sales
x1 = Price
x2 = Holiday (X2 = 1 if a holiday occurred during the week)
(X2 = 0 if there was no holiday that week)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-55
Different Same
intercept slope
y (sales)
If H0: β2 = 0 is
b0 + b2 rejected, then
b0 “Holiday” has a
significant effect
on pie sales
Interpreting the
Dummy Variable Coefficient
Example: Sales 300 - 30(Price) 15(Holiday)
Sales: number of pies sold per week
Price: pie price in $
1 If a holiday occurred during the week
Holiday:
0 If no holiday occurred
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-57
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-20
Interaction Between
Explanatory Variables
yˆ b0 b1x1 b2 x 2 b3 x 3
b0 b1x1 b2 x 2 b3 (x1x 2 )
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-58
Effect of Interaction
Given: Y β β X (β β X )X
0 2 2 1 3 2 1
β0 β1X1 β2 X2 β3 X1X2
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-59
Interaction Example
Suppose x2 is a dummy variable and the estimated
regression equation is yˆ 1 2x1 3x 2 4x1x 2
y
12
x2 = 1:
8 y^ = 1 + 2x1 + 3(1) + 4x1(1) = 4 + 6x1
4 x2 = 0:
^y = 1 + 2x + 3(0) + 4x (0) = 1 + 2x
1 1 1
0
x1
0 0.5 1 1.5
Slopes are different if the effect of x1 on y depends on x2 value
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-60
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-21
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-61
ei = (yi – yi)
Assumptions:
The errors are normally distributed
Errors have a constant variance
The model errors are independent
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-62
Analysis of Residuals
in Multiple Regression
Residuals vs. yi
Residuals vs. x1i
Residuals vs. x2i
Residuals vs. time (if time series data)
Use the residual plots to check for
violations of regression assumptions
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-63
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.
Chapter 13 13-22
Chapter Summary
Developed the multiple regression model
Tested the significance of the multiple regression model
Discussed adjusted R2 ( R2 )
Tested individual regression coefficients
Tested portions of the regression model
Used quadratic terms and log transformations in
regression models
Used dummy variables
Evaluated interaction effects
Discussed using residual plots to check model
assumptions
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 13-64
Statistics for Business and Economics, 6/e © 2007 Pearson Education, Inc.