Professional Documents
Culture Documents
Chapter 15
Time Series
t re nd
Sales Up w a
rd
Time
Trend Component
(continued)
Sales Sales
Time Time
Downward linear trend Upward nonlinear trend
Seasonal Component
Short-term regular wave-like patterns
Observed within 1 year
Often monthly or quarterly
Sales
Summer
Winter
Summer
Winter Spring Fall
Spring Fall
Time (Quarterly)
Cyclical Component
Long-term wave-like patterns
Regularly occur but may vary in length
Often measured peak to peak or trough to
trough
1 Cycle
Sales
Year
Irregular Component
Yi Ti Ci Ii
where Ti = Trend value at year i
Ci = Cyclical value at year i
Ii = Irregular (random) value at year i
Multiplicative Time-Series Model
with a Seasonal Component
Used primarily for forecasting
Allows consideration of seasonal variation
Yi Ti Si Ci Ii
where Ti = Trend value at time i
Si = Seasonal value at time i
Ci = Cyclical value at time i
Ii = Irregular (random) value at time i
Smoothing the
Annual Time Series
Second average:
Y2 Y3 Y4 Y5 Y6
MA(5)
5
etc.
Example: Annual Data
Year Sales
1 23
2 40
3 25
4 27
5 32
6 48
7 33
8 37
9 37
10 50
11 40
etc etc
Calculating Moving Averages
5-Year
Average Moving
Year Sales Year Average
1 23 1 2 3 4 5
3 29.4 3
5
2 40 4 34.4
3 25 5 33.0 23 40 25 27 32
29.4
4 27 5
6 35.4
5 32 7 37.4
6 48 8 41.0
7 33 9 39.4
8 37 etc
9 37
10 50 Each moving average is for a consecutive
11 40 block of 5 years
Annual vs. Moving Average
The 5-year
moving average
smoothes the
data and shows
the underlying
trend
Exponential Smoothing
E1 Y1
Ei WYi (1 W )Ei1
For i = 2, 3, 4,
where:
Ei = exponentially smoothed value for period i
Ei-1 = exponentially smoothed value already
computed for period i - 1
Yi = observed value in period i
W = weight (smoothing coefficient), 0 < W < 1
Exponential Smoothing Example
Suppose we use weight W = .2
Time Forecast
Sales Exponentially Smoothed
Period from prior
(Yi) Value for this period (Ei)
(i) period (Ei-1)
E1 = Y1
1 23 -- 23 since no
2 40 23 (.2)(40)+(.8)(23)=26.4 prior
3 25 26.4 (.2)(25)+(.8)(26.4)=26.12 information
4 27 26.12 (.2)(27)+(.8)(26.12)=26.296 exists
5 32 26.296 (.2)(32)+(.8)(26.296)=27.437 Ei
6 48 27.437 (.2)(48)+(.8)(27.437)=31.549
WYi (1 W )Ei1
7 33 31.549 (.2)(48)+(.8)(31.549)=31.840
8 37 31.840 (.2)(33)+(.8)(31.840)=32.872
9 37 32.872 (.2)(37)+(.8)(32.872)=33.697
10 50 33.697 (.2)(50)+(.8)(33.697)=36.958
etc. etc. etc. etc.
Sales vs. Smoothed Sales
Fluctuations
have been
smoothed
NOTE: the
smoothed value in
this case is
generally a little low,
since the trend is
upward sloping and
the weighting factor
is only .2
Forecasting Time Period i + 1
The smoothed value in the current
period (i) is used as the forecast value for
next period (i + 1) :
Yi1 Ei
Exponential Smoothing in Excel
Time
Use time (X) as the
Year Period Sales independent variable:
(X) (Y)
1999
2000
0
1
20
40
Y b0 b1X
2001 2 30
2002 3 50
2003 4 70
2004 5 65
Trend-Based Forecasting
(continued)
Year
Time
Period Sales
Y 21.905 9.5714 (6)
(X) (y) 79.33
1999 0 20
2000 1 40
2001 2 30
2002 3 50
2003 4 70
2004 5 65
2005 6 ??
Nonlinear Trend Forecasting
A nonlinear regression model can be used when
the time series exhibits a nonlinear trend
Quadratic form is one type of a nonlinear model:
Yi 0 1Xi 2 X i
2
i
Xi
Yi
0 1 i
Transform to linear form:
log(Yi ) b0 b1Xi
where b0 = estimate of log(0)
b1 = estimate of log(1)
Interpretation:
(1 1) 100%
is the estimated annual compound
growth rate (in %)
Model Selection Using
Differences
Use a linear trend model if the first differences
are approximately constant
(Y2 Y1 ) ( Y3 Y2 ) ( Yn Yn-1 )
Year Units
97 4
98 3
99 2
00 3
01 2
02 2
03 4
04 6
Autoregressive Model:
Example Solution
Develop the 2nd order Year Yi Yi-1 Yi-2
table 97 4 -- --
98 3 4 --
Use Excel to estimate a
99 2 3 4
regression model
00 3 2 3
Excel Output 01 2 3 2
Coefficients 02 2 2 3
Intercept 3.5 03 4 2 2
X Variable 1 0.8125 04 6 4 2
X Variable 2 -0.9375
0 0
T T
Random errors Cyclical effects not accounted for
e e
0 0
T T
Trend not accounted for Seasonal effects not accounted for
Measuring Errors
Choose the model that gives the smallest
measuring errors
Sum of squared errors Mean Absolute Deviation
(SSE) (MAD)
n n
SSE (Yi Yi ) 2
Y Y
i i
i1
MAD i1
n
Sensitive to outliers Not sensitive to extreme
observations
Principal of Parsimony
Suppose two or more models provide a
good fit for the data
Select the simplest model
Simplest model types:
Least-squares linear
Least-squares quadratic
1st order autoregressive
More complex types:
2nd and 3rd order autoregressive
Least-squares exponential
Forecasting With Seasonal Data
Recall the classical time series model with
seasonal variation:
Yi Ti Si Ci Ii
Suppose the seasonality is quarterly
Define three new dummy variables for quarters:
Q1 = 1 if first quarter, 0 otherwise
Q2 = 1 if second quarter, 0 otherwise
Q3 = 1 if third quarter, 0 otherwise
(Quarter 4 is the default if Q1 = Q2 = Q3 = 0)
Exponential Model with
Quarterly Data
Xi Q1 Q2 Q3
Yi 2 3 4 i
0 1
etc
Interpretation:
1) 100% = estimated quarterly compound growth rate (in %)
(1
10b3 3 0.845
b3 = -.073, so
10b 4 4 1.052
b4 = .022, so
Quarterly Model Example
(continued)
Value: Interpretation:
0 2691.53 Unadjusted trend value for first quarter of first year
Pi
Ii 100
Pbase
where
Ii = index number for year i
Pi = price for year i
Pbase = price for the base year
Index Numbers: Example
Airplane ticket prices from 1995 to 2003:
Index
Year Price (base year
= 2000)
1995 272 85.0 P1996 288
1996 288 90.0
I1996 100 (100 ) 90
P2000 320
1997 295 92.2
1998 311 97.2 Base Year:
1999 322 100.6 P2000 320
I2000 100 (100 ) 100
2000 320 100.0 P2000 320
2001 348 108.8
2002 366 114.4 P2003 384
2003 384 120.0 I2003 100 (100 ) 120
P2000 320
Index Numbers: Interpretation
P2000 320
Prices in 2000 were 100%
I2000 100 (100 ) 100 of base year prices (by
P2000 320
definition, since 2000 is the
base year)
Unweighted Weighted
aggregate aggregate
price index price indexes
i
P (t)
i = item
IU( t ) i1
n
100 t = time period
P
i1
i
(t) = sum of the prices for the group of items at time t
n
= sum of the prices for the group of items in time period 0
i
P
i1
(0)
Unweighted Aggregate Price
Index: Example
Automobile Expenses:
Monthly Amounts ($):
Index
Year Lease payment Fuel Repair Total (2001=100)
2001 260 45 40 345 100.0
2002 280 60 40 380 110.1
2003 305 55 45 405 117.4
2004 310 50 50 410 118.8
I2004
P 2004
100
410
(100) 118.8
P 2001 345
Unweighted total expenses were 18.8%
higher in 2004 than in 2001
Weighted
Aggregate Price Indexes
Laspeyres index Paasche index
n n
P i
(t)
Q (0)
i P i
(t)
Q (t)
i
I
(t)
L
i1
n
100 I
(t)
P
i 1
n
100
P
i1
i
(0)
Q (0)
i P i
(0)
Q (t)
i
i1