Professional Documents
Culture Documents
Week 1 MOD A Simple Regression Chapter 12 Berenson
Week 1 MOD A Simple Regression Chapter 12 Berenson
Week 1 MOD A Simple Regression Chapter 12 Berenson
Simple Linear
Regression
PowerPoint to accompany:
Learning Objectives
2 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Life Without FaceBook Regression
Source: http://www.youtube.com/watch?v=fmj_kMrpypg
3 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Introduction to Regression Analysis
4 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Introduction to Regression Analysis
5 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Types of Linear Relationships
X X
Y Y
X X
6 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Types of Non-linear Relationships
Curvilinear No relationship
relationships
Y Y
X X
Y Y
X X
7 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Simple Linear Regression Model
Population Random
Population Independent error
slope
Y intercept variable term
coefficient
Yi 0 1Xi i
Linear component Random error
Dependent
variable component
8 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Simple Linear Regression Model
Y
Yi 0 1Xi i
Observed
value of Y for
Xi
i
Slope = 1
Predicted
value of Y for Random error for
Xi this Xi value
Intercept = 0
Xi X
9 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Simple Linear Regression Equation (Prediction Line)
Yi b0 b1X i
Value of X for
observation i
10 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Least Squares Method
11 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Simple Linear Regression Example
12 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Simple Linear Regression Example
Weekly sales Number of
in $1000s Customers
(Y) (X) Weekly sales model: scatter plot
245 1400
312 1600
279 1700
308 1875
199 1100
219 1550
405 2350
324 2450
319 1425
255 1700
13 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Simple Linear Regression Example
14 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Simple Linear Regression Example
Slope = 0.10977
Intercept
= 98.248
Predict the weekly sales for the local store for 2000
customers:
17 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Interpolation vs. Extrapolation
When using a regression model for prediction, only predict
within the relevant range of data
Do not try to
extrapolate
beyond the range
of observed Xs
18 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Measures of Variation
Total variation is made up of two parts
Xi X
20 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Coefficient of Determination, r2
The coefficient of determination is the portion of the total
variation in the dependent variable that is explained by
variation in the independent variable
The coefficient of determination is also called r-squared and
is denoted as r2
SSR
2 regression sum of squares
r
SST total sum of squares
note: 0 r2 1
21 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Examples of Approximate r2 values
Y Y Perfect linear
relationship
between X and Y
100% of the
variation in Y is
X explained by
r2 = 1 r2 = 1 X variation in X
Y
No linear relationship between X
and Y
The value of Y does not depend
on X (None of the variation in
Y
is explained by variation in X)
r2 = 0 X
22 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Examples of Approximate r2 values
0 < r2 < 1
Y
Weaker linear relationships
between X and Y:
X
Y
Some but not all of the
variation in Y is explained by
variation in X
X
23 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Excel Output
24 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Standard Error of the Estimate
The standard deviation of the variation of observations around
the regression line is estimated by
SSE (Yi Yi )
2
SYX i 1
n2 n2
where
SSE = error sum of squares
n = sample size
25 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Excel Output
26 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Comparing Standard Errors
SYX is a measure of the variation of observed Y
values from the regression line
Y Y
Independence of errors
Error values are statistically independent
Normality of error
Error values () are normally distributed for any given value of X
28 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Residual Analysis
The residual for observation i, ei, is the difference between
its observed and predicted value
ei Yi Yi
Check the assumptions of regression by examining the
residuals,
Examine for linearity assumption
Evaluate independence assumption
Evaluate normal distribution assumption
Examine for constant variance for all levels of X
(homoscedasticity)
Graphical Analysis of Residuals
Can plot residuals vs. X
29 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Residual Analysis for Linearity
Y Y
x x
residuals
residuals
x x
residuals
X
residuals
31 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Residual Analysis for Normality
Percent
100
0
-3 -2 -1 0 1 2
3 Residual
32 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Residual Analysis for Equal Variance
(Homoscedasticity)
Y
Y
x x
residuals
residuals
x x
RESIDUAL OUTPUT
Predicted
Weekly
Sales Residuals
1 251.92316 -6.923162
2 273.87671 38.12329
3 284.85348 -5.853484
4 304.06284 3.937162
5 218.99284 -19.99284
6 268.38832 -49.38832
7 356.20251 48.79749
8 367.17929 -43.17929
9 254.6674 64.33264
10 284.85348 -29.85348 Does not appear to violate any
regression assumptions
34 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Measuring Autocorrelation: The Durbin-Watson
Statistic
35 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Autocorrelation
Autocorrelation is correlation of the errors (residuals) over time
36 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
The Durbin-Watson Statistic
i
e 2
i 1
D approaches 0 when there is positive
autocorrelation, D approaches 4 when there is
negative autocorrelation
37 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Testing for Positive Autocorrelation
H0: positive autocorrelation does not exist
H1: positive autocorrelation is present
38 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Testing for Positive Autocorrelation
39 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Testing for Positive Autocorrelation
Example with n = 25
Excel/PHStat
output:
Durbin-Watson Calculations
Sum of squared
difference of
residuals 3296.18 n
Sum of squared i i1
(e e ) 2
3296.18
residuals 3279.98 D i 2
n
1.0049 4
3279.98
Durbin-Watson ei 2
Statistic 1.00494 i 1
40 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Testing for Positive Autocorrelation
Here, n = 25 and there is Decision: reject H0 since D=
1.00494 < dL
k=1 one independent
variable
Using the Durbin-Watson and conclude that significant
positive autocorrelation exists
table, dL = 1.29 and
dU = 1.45
Therefore the linear model is not
the appropriate model to
forecast sales
0 dL = 1.29 dU = 1.45 2
Dobs = 1.00494
41 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Inferences About the Slope
SYX SYX
Sb1
SSX (X i X) 2
where
Sb1= Estimate of the standard error of the least squares slope
SSE
S YX
n 2 = Standard error of the estimate
42 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Excel Output
43 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Comparing Standard Errors of the Slope
Y Y
44 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Inference about the Slope: t Test
t test for a population slope
Is there a linear relationship between X and Y?
b1 1 0.10977 0
t 3.32938
Sb1 0.03297
46 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Inferences about the Slope: t Test Example
Decision: Reject H0
d.f. = 10-2 = 8 Conclusion: There is
sufficient evidence that
/2=.025
/2=.025 Do not number of customers
reject H0 affects weekly sales
Reject H0 Reject H0
-t/2 0 t/2
-2.3060 2.3060 3.329
47 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
F Test for Significance
F Test statistic
SSR
MSR where MSR
F k
MSE SSE
MSE
n k 1
48 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Excel Output
49 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
F Test for Significance Example
H 0: 1 = 0 Test Statistic:
H 1: 1 0 MSR
= .05
F 11.08
MSE
df1= 1 df2 = 8
Conclusion:
Reject H0 at = 0.05
Critical Value:
There is sufficient evidence
F = 5.32 that number of customers
= .05 affects weekly sales
0
F
Do not
reject H0 F.05 = 5.32 Reject H0
50 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Confidence Interval Estimate for the Slope
b1 t n2Sb1 d.f. = n - 2
Excel Printout for
Weekly sales:
Coefficien Standard Lower Upper
ts Error tStat P-value 95% 95%
Intercept 98.24833 58.03348 1.69296 0.12892 -35.57720 232.07386
Customers 0.10977 0.03297 3.32938 0.01039 0.03374 0.18580
Test statistic
where
r -
t r r 2 if b1 0
1 r 2
r r 2 if b1 0
n2 (with n 2 degrees of freedom)
52 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
t Test for a Correlation Coefficient Example
Is there evidence of a significant linear relationship between weekly sales
and number of customers at the .05 level of significance?
H0 : = 0 (No r .762 0
correlation) t 3.329
H1 : 0 (correlation 1 r 2
1 .762 2
exists)
=.05 , df = 10 - 2 = 8 n2 10 2
Decision: Reject Ho
Conclusion:
/2=.025 /2=.025 There is evidence of
a significant linear
association at the
Reject H0 Do not reject H0 Reject H0 5% level of
-t/2 t/2 significance
0
-2.3060 2.3060
3.329
53 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Confidence Interval for the Mean of Y, Given X
This extra term adds to the interval width to reflect the added
uncertainty for an individual case
55 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Estimation of Mean Values vs Estimation of
Individual Values
1 (Xi X)2
Find the 95%
Y t n-2S YX 317.85 37.12
confidence n (Xi X) 2
1 (Xi X)2
Find the 95%
Y t n-1S YX 1 317.85 102.28
prediction n (Xi X)2
interval for
individual The prediction interval endpoints
weekly sales are 215.50 and 420.07, or from
of 2,000 $215,500 to $420,070
customers
56 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Pitfalls of Regression Analysis
57 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Industry Application
Harvard economists made case for cutting taxes, spending
By Doug Ross
In a recent online article, Doug Ross quoted Harvard economists Alberto
Alesina and Silvia Ardagnas 2009 paper where they looked at 107
examples in developed countries over more than 30 years from 1970
to 2009 using simple regression analysis, and concluded:
Fiscal stimuli based upon tax cuts are more likely to increase growth
than those based upon spending increases. As for fiscal adjustments,
those based upon spending cuts and no tax increases are more likely
to reduce deficits and debt than those based upon tax increases.
Also, spending cuts adopted to reduce deficits have been associated
with economic expansion rather than recession.
Source:
http://www.nwitimes.com/news/opinion/mailbag/harvard-economists-made-case-for-cutting-taxe
s-spending/article_95214860-7a88-5771-89fc-204e1e5f7f1e.html
58 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Chapter Summary
59 Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442549272/Berenson/Business Statistics /2e
Copyright 2013 Pearson Australia (a division of Pearson Australia Group Pty Ltd) 9781442548473/Berenson/Basic Business Statistics/3e