Documente Academic
Documente Profesional
Documente Cultură
Regression
Models
To accompany
Quantitative Analysis for Management, Twelfth Edition,
by Render, Stair, Hanna and Hale
Power Point slides created by Jeff Heyl Copyright ©2015 Pearson Education, Inc.
LEARNING OBJECTIVES
After completing this chapter, students will be able to:
12 –
10 –
Sales ($100,000)
8–
6–
4–
2–
0 |– | | | | | | | |
0 1 2 3 4 5 6 7 8
Payroll ($100 million)
Y = b0 + b1 X + e
where
Y = dependent variable (response)
X = independent variable (predictor or explanatory)
0 = intercept (value of Y when X = 0)
1 = slope of the regression line
e = random error
Ŷ = b0 + b1 X
where
^
Y = predicted value of Y
b0 = estimate of β0, based on sample results
b1 = estimate of β1, based on sample results
e =Y - Yˆ
– Regression analysis minimizes the sum of squared
errors
– Least-squares regression
Copyright ©2015 Pearson Education, Inc. 4 – 13
Triple A Construction
• Formulas for simple linear regression,
intercept and slope
Ŷ = b0 + b1 X
X=
å X
= average (mean) of X values
n
Y=
åY = average (mean) of Y values
n
b1 =
å(X - X )(Y -Y )
å (X - X ) 2
b0 = Y - b1 X
Copyright ©2015 Pearson Education, Inc. 4 – 14
Triple A Construction
TABLE 4.2 – Regression calculations
Y X (X – X)2 (X – X)(Y – Y)
6 3 (3 – 4)2 = 1 (3 – 4)(6 – 7) = 1
8 4 (4 – 4)2 = 0 (4 – 4)(8 – 7) = 0
9 6 (6 – 4)2 = 4 (6 – 4)(9 – 7) = 4
5 4 (4 – 4)2 = 0 (4 – 4)(5 – 7) = 0
4.5 2 (2 – 4)2 = 4 (2 – 4)(4.5 – 7) = 5
9.5 5 (5 – 4)2 = 1 (5 – 4)(9.5 – 7) = 2.5
ΣY = 42 ΣX = 24 Σ(X – X)2 = 10 Σ(X – X)(Y – Y) = 12.5
Y = 42/6 = 7 X = 24/6 = 4
X=
å X 24
= =4 Y=
åY 42
= =7
6 6 6 6
b =
å (X – X )(Y –Y ) 12.5
= = 1.25
1
å(X – X ) 10 2
b0 = Y - b1 X = 7 – (1.25)(4) = 2
Therefore Ŷ = 2 + 1.25X
X=
å = =4 Y=
å
X 24 sales = 2 + 1.25(payroll)
Y 42
= =7
6 6 6 6
If the payroll next
b1 =
å (X – X )(Yyear
–Y )is $600
=
12.5 million
= 1.25
å(X – XŶ )= 2 + 1.25(6)
2
10
= 9.5 or $ 950,000
b0 = Y - b1 X = 7 – (1.25)(4) = 2
Therefore Ŷ = 2 + 1.25X
^ ^ ^
Y X (Y – Y)2 Y (Y – Y)2 (Y – Y)2
6 3 (6 – 7)2 = 1 2 + 1.25(3) = 5.75 0.0625 1.563
12 –
Ŷ = 2 + 1.25X
10 –
Y – Ŷ
Sales ($100,000)
8– Y –Y
Yˆ – Y Y
6–
4–
2–
0 |– | | | | | | | |
0 1 2 3 4 5 6 7 8
Payroll ($100 million)
SSR SSE
r2 = =1 –
SST SST
SSR About
SSE69% of the
r = = 1 variability
– 2
SST SST in Y is
explained by the equation
– For Triple A Construction based on payroll (X)
15.625
r2 = = 0.6944
22.5
r = ± r2
r = 0.6944 = 0.8333
where
n = number of observations in the sample
k = number of independent variables
• The F statistic is
MSR
F=
MSE
Describes an F distribution with:
degrees of freedom for the numerator = df1 = k
degrees of freedom for the denominator = df2 = n – k – 1
Copyright ©2015 Pearson Education, Inc. 4 – 35
Testing the Model for Significance
MSR
F=
MSE
Step 2
Select = 0.05
Step 3
– Calculate the value of the test statistic
SSR 15.6250
MSR = = = 15.6250
k 1
MSR 15.6250
F= = = 9.09
MSE 1.7188
Copyright ©2015 Pearson Education, Inc. 4 – 39
Triple A Construction
• Step 4
– Reject the null hypothesis if the test statistic is
greater than the F value in Appendix D
df1 = k = 1
df2 = n – k – 1 = 6 – 1 – 1 = 4
0.05
F = 7.71 9.09
DF SS MS F SIGNIFICANCE
Regression k SSR MSR = SSR/k MSR/MSE P(F > MSR/MSE)
Ŷ = b0 + b1 X1 + b2 X 2 +... + bk X k
Where
Yˆ = predicted value of Y
b0 = sample intercept (an estimate of 0)
bi = sample coefficient of the ith variable (an estimate of i)
Yˆ = b0 + b1 X 1 + b2 X 2
= 146,630.89 + 43.82X 1 - 2898.69X 2
Copyright ©2015 Pearson Education, Inc. 4 – 59
Evaluating Multiple
Regression Models
• Similar to simple linear regression models
• The p-value for the F test and r2 interpreted
the same
• The hypothesis is different because there is
more than one independent variable
• The F test is investigating whether all the
coefficients are equal to 0 at the same time
– For X1 (age)
For = 0.05, p-value = 0.0039 null hypothesis is rejected
Copyright ©2015 Pearson Education, Inc. 4 – 62
Jenny Wilson Both
Realty
square footage
and age are helpful
in predicting the
• Full model is statistically significant
selling price
– Useful in predicting selling price
p-value for F test = 0.002 r2 = 0.6719
– For X1 – age
For = 0.05, p-value = 0.0039 null hypothesis is rejected
Copyright ©2015 Pearson Education, Inc. 4 – 63
Binary or Dummy Variables
• Binary (or dummy or indicator) variables are
special variables created for qualitative data
• A dummy variable is assigned a value of 1 if a
particular condition is met and a value of 0
otherwise
• The number of dummy variables must equal
one less than the number of categories of the
qualitative variable
Coefficient of
determination,
r2 = 0.898
SST / (n -1)
• As the number of variables increases, the
adjusted r2 gets smaller unless the increase
due to the new variable is large enough to
offset the change in k
Copyright ©2015 Pearson Education, Inc. 4 – 70
Model Building
• The formula for r2In general, if a new variable
increases the adjusted r2, it should
SSR SSE
r 2 = probably
= 1- be included in the model
SST SST
• The formula for adjusted r2
SSE / (n - k -1)
Adjusted r = 1- 2
SST / (n -1)
• As the number of variables increases, the
adjusted r2 gets smaller unless the increase
due to the new variable is large enough to
offset the change in k
Copyright ©2015 Pearson Education, Inc. 4 – 71
Model Building
• Stepwise regression systematically adds or
deletes independent variables
• A forward stepwise procedure puts the most
significant variable in first, adds the next
variable that will improve the model the most
• Backward stepwise regression begins with all
the independent variables and deletes the
least helpful
* * * *
*
** * * ** *
*
*** * ** *
Linear relationship Nonlinear relationship
TABLE 4.6
WEIGHT WEIGHT
MPG (1,000 LBS.) MPG (1,000 LBS.)
12 4.58 20 3.18
13 4.66 23 2.68
15 4.02 24 2.65
18 2.53 33 1.70
19 3.09 36 1.95
19 3.11 42 1.92
Copyright ©2015 Pearson Education, Inc. 4 – 75
Colonel Motors
FIGURE 4.6A – Linear Model for MPG Data
45 –
40 –
35 –
30 –
25 –
MPG
20 –
15 –
10 –
5–
0 |– | | | | |
1.00 2.00 3.00 4.00 5.00
Weight (1,000 lb.)
45 –
40 –
35 –
30 –
25 –
MPG
20 –
15 –
10 –
5–
0 |– | | | | |
1.00 2.00 3.00 4.00 5.00
Weight (1,000 lb.)
• New model
Ŷ = b0 + b1 X1 + b2 X 2