© 2001 prentice-hall, inc.chap 13-1 ba 201 lecture 21 autocorrelation and inferences about the...
TRANSCRIPT
© 2001 Prentice-Hall, Inc. Chap 13-1
BA 201
Lecture 21Autocorrelation
and Inferences about the Slope
© 2001 Prentice-Hall, Inc. Chap 13-2
Topics
Measuring Autocorrelation Inferences about the Slope
© 2001 Prentice-Hall, Inc. Chap 13-3
Autocorrelation
What is Autocorrelation? The error term in one time period is related
(correlated, autocorrelated) to the error term in a different time period
Can happen only in time-series data
© 2001 Prentice-Hall, Inc. Chap 13-4
Residual Analysis for Independence (Graphical
Approach)Not Independent Independent
e eTimeTime
Residual Is Plotted Against Time to Detect Any Autocorrelation
No Particular PatternCyclical Pattern
Time
Y
Time
Y
0 0
© 2001 Prentice-Hall, Inc. Chap 13-5
Residual Analysis for Independence
The Durbin-Watson Statistic Used when data is collected over time to
detect autocorrelation (residuals in one time period are related to residuals in another period)
Measures violation of independence assumption
21
2
2
1
( )n
i ii
n
ii
e eD
e
Should be close to 2 for independence of errors.
If not, examine the model for autocorrelation.
© 2001 Prentice-Hall, Inc. Chap 13-6
Durbin-Watson Statistic in PHStat
PHStat | Regression | Simple Linear Regression … Check the box for Durbin-Watson Statistic
An example in Excel spreadsheet Y is the DJIA (measured in % change from
previous day’s closing number to current day’s closing number)
X is the U.S. Treasury 30-year bond rates (measured in % change from previous day’s closing rate to current day’s closing rate)
Microsoft Excel
Worksheet
© 2001 Prentice-Hall, Inc. Chap 13-7
Accept H0
(no autocorrelatin)
Using the Durbin-Watson Statistic
: No autocorrelation (error terms are independent) : There is autocorrelation (error terms are not
independent)
0H
1H
0 42dL 4-dLdU 4-dU
Reject H0
(positive autocorrelation)
Inconclusive Reject H0
(negative autocorrelation)
© 2001 Prentice-Hall, Inc. Chap 13-8
Sample Linear Regression(continued)
Y
XObserved Value
|Y X iX
i
ii iY X
0 1i iY b b X
ie
0 1i iib bY X e 1b
0b
p.462
© 2001 Prentice-Hall, Inc. Chap 13-9
Inference about the Slope: t Test
t Test for a Population Slope Is there a linear dependency of Y on X ?
Null and Alternative Hypotheses H0: 1 = 0(No Linear Dependency) H1: 1 0 (Linear Dependency)
Test Statistic
Assumption Needed
Normality
1
1
1 1
2
1
where
( )
YXb n
bi
i
b St S
SX X
. . 2d f n
pp.483-484
© 2001 Prentice-Hall, Inc. Chap 13-10
Example: Produce StoreData for 7 Stores: Estimated
Regression Equation:
The slope of this model is 1.487.
Is Square Footage of the store affecting its Annual Sales at 5% level of significance?
Annual Store Square Sales
Feet ($000)
1 1,726 3,681
2 1,542 3,395
3 2,816 6,653
4 5,555 9,543
5 1,292 3,318
6 2,208 5,563
7 1,313 3,760
ˆ 1636.415 1.487i iY X
© 2001 Prentice-Hall, Inc. Chap 13-11
Inferences about the Slope: t Test Example
H0: 1 = 0
H1: 1 0
.05df 7 - 2 = 5Critical Value(s):
Test Statistic:
Decision:
Conclusion:There is evidence that square footage affects annual sales.t0 2.5706-2.5706
.025
Reject Reject
.025
From Excel Printout
Reject H0
Coefficients Standard Error t Stat P-valueIntercept 1636.4147 451.4953 3.6244 0.01515Footage 1.4866 0.1650 9.0099 0.00028
1b 1bS t
p-value
b0
© 2001 Prentice-Hall, Inc. Chap 13-12
Inferences about the Slope: Confidence Interval Example
Confidence Interval Estimate of the Slope:
11 2n bb t S Excel Printout for Produce Stores
At 95% level of confidence the confidence interval for the slope is (1.062, 1.911). Does not include 0.
Conclusion: There is a significant linear dependency of annual sales on the size of the store.
Lower 95% Upper 95%Intercept 475.810926 2797.01853X Variable 11.06249037 1.91077694
p.486
© 2001 Prentice-Hall, Inc. Chap 13-13
Inferences about the Slope: F Test
F Test for a Population Slope Is there a linear dependency of Y on X ?
Null and Alternative Hypotheses H0: 1 = 0 (No Linear Dependency) H1: 1 0 (Linear Dependency)
Test Statistic
Numerator d.f.=1, denominator d.f.=n-2 Assumption Needed
Normality
1 =
2
SSRMSR
FSSE MSEn
pp.484-485
© 2001 Prentice-Hall, Inc. Chap 13-14
ANOVAdf SS MS F Significance F
Regression 1 30380456.12 30380456.12 81.179 0.000281Residual 5 1871199.595 374239.919Total 6 32251655.71
Inferences about the Slope: F Test Example
Test Statistic:
Decision:
Conclusion:
H0: 1 = 0H1: 1 0 .05numerator df = 1denominator df 7 - 2 = 5
There is evidence that square footage affects annual sales.
From Excel Printout
Reject H0
0 6.61
Reject
= .05
1, 2nF
p-value
© 2001 Prentice-Hall, Inc. Chap 13-15
Relationship between a t Test and an F Test
Null and Alternative Hypotheses H0: 1 = 0 (No Linear Dependency) H1: 1 0(Linear Dependency)
The p –value of a t Test and the p –value of an F Test Are Exactly the Same
The Rejection Region of an F Test is always in the upper tail
2
2 1, 2n nt F
p.???
© 2001 Prentice-Hall, Inc. Chap 13-16
Summary
Addressed Measuring Autocorrelation Described Inference about the Slope