Title: Statistics for Business and Economics
1Statistics for Business and Economics
- Chapter 13
- Time SeriesDescriptive Analyses, Models,
Forecasting - Lyn Noble
- Revisions by Peter Jurkat
2Learning Objectives
- Describe Time Series
- Explain Descriptive Analyses
- Define Time Series Components
- Explain Forecasting
- Describe Measures of Accuracy
- Define Autocorrelation
- Explain DurbinWatson Test
3Time Series
- Data generated by processes over time
- Describe and predict output of processes
- Descriptive analysis
- Understanding patterns
- Inferential analysis
- Forecast future values
4Index Number
- Measures change over time relative to a base
period - Price Index measures changes in price
- e.g. Consumer Price Index (CPI)
- Quantity Index measures changes in quantity
- e.g. Number of cell phones produced annually
5Simple Index Number
- Based on price/quantity of a single commodity
where Yt value at time t Y0 value at time 0
(base period)
6Simple Index Number Example
Year 1990 1.2991991 1.0981992 1.08719
93 1.0671994 1.0751995 1.1111996 1.2241997 1.1
991998 1.031999 1.1362000 1.4842001 1.422002
1.3452003 1.5612004 1.8522005 2.272006 2.572
- The table shows the price per gallon of regular
gasoline in the U.S for the years 1990 2006.
Use 1990 as the base year (prior to the Gulf
War). Calculate the simple index number for 1990,
1998, and 2006.
7Simple Index Number Solution
- 1990 Index Number (base period)
1998 Index Number
Indicates price had dropped by 20.7 (100 79.3)
between 1990 and 1998.
8Simple Index Number Solution
Indicates price had risen by 98 (100 198)
between 1990 and 2006.
9Simple Index Numbers 19902006
10Simple Index Numbers 19902006
11Class Exercise
Example US copper and steel prices production
Calculate the simple (un-weighted) copper price
index for the current period to closest
10 Enter A for 90, B for 100, C for 110
12Composite Index Number
- Made up of two or more commodities
- A simple index using the total price or total
quantity of all the series (commodities) - Disadvantage Quantity of each commodity
purchased is not considered
13Composite Index Number Example
- The table on the next slide shows the closing
stock prices on the last day of the month for
DaimlerChrysler, Ford, and GM between 2005 and
2006. Construct the simple composite index using
January 2005 as the base period. (Source
Nasdaq.com)
14Simple Composite Index Solution
First compute the total for the three stocks for
each date.
15Simple Composite Index Solution
Now compute the simple composite index by
dividing each total by the January 2005 total.
For example, December 2006
16Simple Composite Index Solution
17Simple Composite Index Solution
18Class Exercise
Example US copper and steel prices production
Calculate the simple (un-weighted) composite
index for copper and steel for the current period
to nearest 10. Enter A for 90, B for 100, C
for 110
19Weighted Composite Price Index
- Weights prices by quantities purchased before
computing totals - Weighted totals used to compute composite index
- Laspeyres Index
- Uses base period quantities as weights
- Paasche Index
- Uses quantities from each period as weights
20Laspeyres Index
- Uses base period quantities as weights
- Appropriate when quantities remain approximately
constant over time period - Example Consumer Price Index (CPI)
21Calculating a Laspeyres Index
Note t0 subscript stands for base period
where
Pit price for each commodity at time t Qit
quantity of each commodity at time t t0 base
period
22Laspeyres Index Number Example
- The table shows the closing stock prices on
1/31/2005 and 12/29/2006 for DaimlerChrysler,
Ford, and GM. On 1/31/2005 an investor purchased
the indicated number of shares of each stock.
Construct the Laspeyres Index using 1/31/2005 as
the base period.
23Base Value
Weighted total for base period (1/31/2005)
Weighted total for current period 12/29/2006
24Laspeyres Index Solution
Indicates portfolio value had decreased by 13.3
(10086.7) between 1/31/2005 and 12/29/2006.
25Class Exercise
Example US copper and steel prices production
Calculate the Laspeyres price index for the
current period to nearest 1. Enter A for
93.6, B for 95.5, C for 102.3
26Paasche Index
- Uses quantities for each period as weights
- Appropriate when quantities change over time
- Compare current prices to base period prices at
current purchase levels - Disadvantages
- Must know purchase quantities for each time
period - Difficult to interpret a change in index when
base period is not used
27Calculating a Paasche Index
Weights are quantities for time period t
where
Pit price for each commodity at time t Qit
quantity of each commodity at time t t0 base
period
28Laspeyres Index Number Example
- The table shows the 1/31/2005 and 12/29/2006
prices and volumes in millions of shares for
DaimlerChrysler, Ford, and GM. Calculate the
Paasche Index using 1/31/2005 as the base period.
(Source Nasdaq.com)
29Paasche Index Solution
30Paasche Index Solution
12/29/2006 prices represent a 24.8 (100 75.2)
decrease from 1/31/2005 (assuming quantities were
at 12/29/2006 levels for both periods)
31Class Exercise
Example US copper and steel prices production
Calculate the Paasche price index for the current
period (enter rounded whole number) Enter 1 for
93.5, 2 for 95.5, 3 for 102.3
32Exponential Smoothing
33Exponential Smoothing
- Type of weighted average
- Removes rapid fluctuations in time series (less
sensitive to shortterm changes in prices) - Allows overall trend to be identified
- Used for forecasting one period future values
- Exponential smoothing constant (w) affects
smoothness of series
34Exponential Smoothing Constant
- Exponential smoothing constant, 0 lt w lt 1
- w close to 0
- More weight given to previous values of time
series - Smoother series
- w close to 1
- More weight given to current value of time series
- Series looks similar to original (more variable)
35Calculating an Exponential Smoothed Series
- E1 Y1 (same as original series or a given
value) - E2 wY2 (1 w)E1 E w(Y2 E1)
- E3 wY3 (1 w)E2
- Et wYt (1 w)Et1
See Intrate30.xls
36Exponential Smoothing Example
- The closing stock prices on the last day of the
month for DaimlerChrysler in 2005 and 2006 are
given in the table. Create an exponentially
smoothed series using w .2.
37Exponential Smoothing Solution
- E1 45.51
- E2 .2(46.10) .8(45.51) 45.63
- E3 .2(44.72) .8(45.63) 45.45
- E24 .2(61.41) .8(53.92) 55.42
38Exponential Smoothing Solution
- E1 45.51
- E2 .2(46.10) .8(45.51) 45.63
- E3 .2(44.72) .8(45.63) 45.45
- E24 .2(61.41) .8(53.92) 55.42
39Exponential Smoothing Solution
Actual Series
Smoothed Series (w .2)
40Class Exercise
Example US copper production
Construct the exponentially smoothed price series
using January as the base period The March value
is A. 1000 B. 1006 C. 1010
41Class Exercise
Example US copper production
Construct the exponentially smoothed price series
using January as the base period The March value
is A.1000 B.1016 C.1040
42Measuring Forecast Accuracy
43Mean Absolute Deviation (MAD)
- Mean absolute difference between the forecast and
actual values of the time series - where m number of forecasts used
44Mean Absolute Percentage Error (MAPE)
- Mean of the absolute percentage of the difference
between the forecast and actual values of the
time series - where m number of forecasts used
45Root Mean Squared Error (RMSE)
- Square root of the mean squared difference
between the forecast and actual values of the
time series - where m number of forecasts used
46Forecasting Accuracy Example
- Using the DaimlerChrysler data from 1/31/2005
through 8/31/2006, three time series models were
constructed and forecasts made for the next four
months. - Model I Exponential smoothing (w .2)
- Model II Exponential smoothing (w .8)
- Model III HoltWinters (w .8, v .7)
47Forecasting Accuracy Example
48Forecasting Accuracy Example
49Forecasting Accuracy Example
50Forecasting Trends Simple Linear Regression
51Time Series Components
- Additive Time Series Model Yt Tt Ct St
Rt - Tt secular trend (describes longterm movements
of Yt) - Ct cyclical effect (describes fluctuations
about the secular trend attributable to business
and economic conditions) - St seasonal effect (describes fluctuations that
recur during specific time periods) - Rt residual effect (what remains after other
components have been removed)
52Simple Linear Regression
- Model E(Yt) ß0 ß1t
- Relates time series, Yt, to time, t
- Cautions
- Risky to extrapolate (forecast beyond observed
data) - Does not account for cyclical effects
53Simple Linear Regression Example
- The data shows the average undergraduate tuition
at all 4year institutions for the years
19962004 (Source U.S. Dept. of Education). Use
leastsquares regression to fit a linear model.
Forecast the tuition for 2005 (t 11) and
compute a 95 prediction interval for the
forecast.
54Simple Linear Regression Solution
55Simple Linear Regression Solution
56Simple Linear Regression Solution
- Forecast tuition for 2005 (t 11)
95 prediction interval
57Seasonal Regression Models
58Seasonal Regression Models
- Takes into account secular trend and seasonal
effects (seasonal component) - Uses multiple regression models
- Dummy variables to model seasonal component
- E(Yt) ß0 ß1t ß2Q1 ß3Q2 ß4Q3 where
See QtrGDPAnalyzed.xls
59Autocorrelation and The DurbinWatson Test
60Autocorrelation
- Time series data may have errors that are not
independent - Time series residuals
- Correlation between residuals at different points
in time (autocorrelation) - 1st order correlation Correlation between
neighboring residuals (times t and t 1) - If present can investigate use of models
- AR autoregressive predict DV from precious DVs
only - ARMA autoregressive moving average predict DV
based on prior values of DVs and IVs - ARIMA autoregressive integrated moving average
(more so)
61Autocorrelation
- Plot of residuals v. time for tuition data shows
residuals tend to group alternately into positive
and negative clusters
62DurbinWatson Test
- Ho No firstorder autocorrelation of residuals
- Ha Positive firstorder autocorrelation of
residuals - Test Statistic
63Interpretation of d Statistic
- 0 d 4
- If residuals uncorrelated, then d 2
- If residuals positively autocorrelated, then d lt
2 - If residuals negatively autocorrelated, then d gt2
See Sales35Analyzed.xls to determine serial
correlation
64Rejection Region for the DurbinWatson d Test
Rejection region evidence of positive
autocorrelation
d
3
2
4
0
1
dL
dU
Nonrejection region insufficient evidence of
positive autocorrelation
Possibly significant autocorrelation
65DurbinWatson Test Example
- Use the DurbinWatson test to test for the
presence of autocorrelation in the tuition data.
Use a .05.
66DurbinWatson Test Solution
- H0
- Ha
- ? ? n k
- Critical Value(s)
Test Statistic Decision Conclusion
.05 10 1
67DurbinWatson Solution
68DurbinWatson Test Solution
No 1storderautocorrelation
- H0
- Ha
- ? ? n k
- Critical Value(s)
Test Statistic Decision Conclusion
d .51
Positive 1storderautocorrelation
.05 10 1
Reject at ? .05
There is evidence of positive autocorrelation
d
2
4
0
.88
1.32
69Conclusion
- Described Time Series
- Explained Descriptive Analyses
- Defined Time Series Components
- Explained Forecasting
- Described Measures of Accuracy
- Defined Autocorrelation
- Explained DurbinWatson Test