Professional Documents
Culture Documents
Spreadsheet Modeling & Decision Analysis: A Practical Introduction To Management Science
Spreadsheet Modeling & Decision Analysis: A Practical Introduction To Management Science
Cliff T. Ragsdale
Chapter 11
Time Series Forecasting
Measuring Accuracy
We need a way to compare different time series techniques for a given data set.
Four common techniques are the:
mean absolute deviation,
Yi Y
i
n
Yi Yi
MAD =
i 1
100
MAPE =
n i 1
Yi
Yi Yi
MSE =
n
i 1
n
RMSE
MSE
Extrapolation Models
Extrapolation models try to account for the past
behavior of a time series variable in an effort to
predict the future behavior of the variable.
f Y , Y , Y ,
Y
t 1
t
t 1
t 2
Well first talk about several extrapolation
techniques that are appropriate for
stationary data.
An Example
Electra-City is a retail store that sells audio and
video equipment for the home and car.
Each month the manager of the store must order
merchandise from a distant warehouse.
Currently, the manager is trying to estimate how
many VCRs the store is likely to sell in the next
month.
He has collected 24 months of data.
See file Fig11-1.xls
Moving Averages
Yt Yt-1 Yt-k +1
Yt 1
k
No general method exists for determining k.
We must try out several k values to see what
works best.
Forecasting With
The Moving Average Model
Forecasts for time periods 25 and 26 at time
period 24:
Y24 Y23 36 + 35
Y25
355
.
2
2
Y
Y
35.5 + 36
25
24
Y26
35.75
2
2
Yt 1 Yt Yt-1 Yt- k -1
k
k
k
The weighted moving average technique
allows for different weights to be assigned
to previous observations.
w Y w Y w Y
Y
t 1
1 t
2 t-1
k t- k -1
where 0 wi 1 and
Exponential Smoothing
Y
(Y Y
)
Y
t 1
t
t
t
where 0 1
It can be shown that the above equation is
equivalent to:
Yt 1 Yt (1 )Yt 1 (1 ) 2 Yt 2 (1 ) n Yt n
Examples of Two
Exponential Smoothing Functions
42
40
Units Sold
38
36
34
32
Number of VCRs Sold
30
28
1
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Time Period
Note that,
35.81, for t = 25, 26, 27,
Y
t
Seasonality
Seasonality is a regular, repeating pattern
in time series data.
May be additive or multiplicative in
nature...
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
18
19
20
21
22
23
24
25
Tim e Period
10
11
12
13
14
Tim e Period
15
16
17
Y
t n E t St n p
E t (Yt - St-p ) (1 - )E t 1
St (Yt - E t ) (1 - )St p
0 1
0 1
p represents the number of seasonal
periods
Y
24 n E 24 S 24 n 4
E S 354.44 8.45 363.00
Y
25
24
21
E S 354.44 17.82 336.73
Y
26
24
22
E S 354.44 46.58 401.13
Y
27
24
23
E S 354.44 31.73 322.81
Y
28
24
24
Y
t n E t St n p
E t (Yt /St-p ) (1 - )E t 1
St (Yt /E t ) (1 - )St p
0 1
0 1
p represents the number of seasonal periods
Y
24 n E 24 S 24 n 4
E S 353.95 1.015 359.13
Y
25
24
21
E S 354.44 0.946 334.94
Y
26
24
22
E S 354.44 1.133 400.99
Y
27
24
23
E S 354.44 0.912 322.95
Y
28
24
24
Trend Models
Trend is the long-term sweep or general
direction of movement in a time series.
Well now consider some nonstationary time
series techniques that are appropriate for
data exhibiting upward or downward trends.
An Example
WaterCraft Inc. is a manufacturer of personal
water crafts (also known as jet skis).
The company has enjoyed a fairly steady
growth in sales of its products.
The officers of the company are preparing sales
and manufacturing plans for the coming year.
Forecasts are needed of the level of sales that
the company expects to achieve each quarter.
See file Fig11-19.xls
Y
t n E t nTt
where
E t 2M t D t
Tt 2(M t D t ) /( k 1)
M t (Yt Yt 1 Yt k 1) / k
D t (Mt M t 1 Mt k 1) / k
Y
20 n E 20 nT20
E 1T 2385.33 1 139.9 2525.23
Y
21
20
20
E 2T 2385.33 2 139.9 2665.13
Y
22
20
20
E 3T 2385.33 3 139.9 2805.03
Y
23
20
20
E 4T 2385.33 4 139.9 2944.94
Y
24
20
20
Y
t n E t nTt
where
Et = Yt + (1-)(Et-1+ Tt-1)
Tt = (Et Et-1) + (1-) Tt-1
0 1 and 0 1
Y
20 n E 20 nT20
20
20
E t Yt St p (1 - )(E t 1 Tt 1 )
Tt E t E t 1 (1 - )Tt 1
St Yt E t (1 - )St p
0 1
0 1
0 1
E t Yt / St p (1 - )(E t 1 Tt 1 )
Tt E t E t 1 (1 - )Tt 1
St Yt / E t (1 - )St p
0 1
0 1
0 1
Y t b0 b1X1t
where X1t t
For example:
X11 1, X12 2, X13 3,
Forecasting With
The Linear Trend Model
Forecasts for time periods 21 to 24 at time period 20:
b b X 3751
Y
. 92.6255 21 2320.3
21
0
1
121
b b X 3751
Y
. 92.6255 22 2412.9
22
0
1
122
b b X 3751
Y
. 92.6255 23 2505.6
23
0
1
123
b b X 3751
Y
. 92.6255 24 2598.2
24
0
1
124
b b X b X
Y
t
0
1 1t
2 2t
where X1t t and X 2 t t 2
Forecasting With
The Quadratic Trend Model
Forecasts for time periods 21 to 24 at time period
20:
2
b b X b X
Y
21
0
1 121
2 2 21 653.67 16.671 21 3.617 21 2598.9
2
b b X b X
Y
22
0
1 122
2 2 22 653.67 16.671 22 3.617 22 2771.1
2
b b X b X
Y
23
0
1 123
2 2 23 653.67 16.671 23 3.617 23 2950.4
2
b b X b X
Y
653
.
67
16
.
671
24
3
.
617
24
3137.1
24
0
1 124
2 2 24
Computing Multiplicative
Seasonal Indices
We can compute multiplicative seasonal
adjustment indices for period p as follows:
Yi
i Y
i
Sp
, for all i occuring in season p
np
The final forecast for period i is then
adjusted = Y
S , for any i occuring in season p
Y
i
i
p
for each Y
observation
in the sample.
).
Yt Y
t
0, otherwise
Combining Forecasts
It is also possible to combine forecasts to create a composite forecast.
Suppose we used three different forecasting methods on a given data
set.
Yt b0 b1F1t b2 F2 t b3 F3t
End of Chapter 11