View/Open

Advanced
Forecasting
Copyright (c) 2008 by The McGraw-Hill Companies. This material is intended solely for
educational use by licensed users of LearningStats. It may not be copied or resold for profit.
Copyright Notice Portions of MINITAB Statistical Software
input and output contained in this document are printed with
permission of Minitab, Inc. MINITABTM is a trademark of
Minitab Inc. in the United States and other countries and is
used herein with the owner's permission.
Trendless Data
For an observed time series y1, y2, ..., yt with no consistent
trend, here are three common ways to forecast one period
ahead (Ft is the forecast and yt is the actual).
Forecast Method
Characteristics
Ft+1 = yt
Same as Last Period Very simple, but
accuracy depends solely on the most
recent actual data point.
Ft+1 = (yt + yt-1 + ... + yt-n)/n
Average of Past n Periods Simple, but
each past data point has equal weight.
Ft+1 = a yt + (1-a) Ft
Exponential Smoothing Assigns a
given weight to the most recent actual
data point, and its reciprocal weight to
the most recent forecast.
Single Smoothing
The single-smoothing updating model is Ft+1 = a yt + (1-a) Ft where
yt = actual data in period t.
Ft = forecast for period t.
a = weight given to the current data (0  a  1)
But how do we “seed” the initial forecast for period 1?
Minitab sets F1 to the average of the first six values of yt.
Excel's Tools > Data Analysis > Exponential Smoothing sets F1 to y1.
Unless n is small, it doesn’t make very
much difference how we seed F1.
Trended Data
For an observed time series y1, y2, ..., yt with consistent
trend, here are three common ways to forecast one period
ahead (Ft is the forecast and yt is the actual for period t).
Forecast Method
Characteristics
Graph extrapolation
Eyeball Method Visually fitting a
trend and projecting it. Simple, but
imprecise.
Ft+1 = yt + (yt  yt-n)/n
Same Average Change Simple, but
assumes linearity and does not
consider variation in trend.
Ft+1 = Lt + Tt
Double Smoothing Uses an updating
mechanism to calculate level (Lt) and
trend (Tt) components for period t.
Double Smoothing
The double-smoothing updating model is:
Lt = a yt + (1a) Ft
Tt = b (Lt  Lt-1) + (1  b) Tt-1
Ft+1 = Lt + Tt
where
yt is the actual data value in period t
Lt is the level component in period t
Tt is the trend component in period t
Ft is the forecast for period t
a and b are constants between 0 and 1.
Double Smoothing: Example
Living donor transplants in California have a clear upward trend, so double
exponential smoothing is appropriate. This example uses a = 0.20 and b = 0.20.
MINITAB’s smoothed (“Fits”) forecasts (shown in red) track the data well for
1988-2002 . The one-year forecast for 2003 (shown in green) is believable,
ceteris paribus. Note MINITAB’s addition of 95% confidence limits.
Year
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
Transplants
12,786
13,471
15,462
15,687
16,043
17,533
18,170
19,218
19,518
20,052
21,223
21,594
22,773
24,076
24,851
http://www.gsds.org
Seasonal Data
For an observed time series y1, y2, ..., yt with both trend and
seasonal periodicity p, here are three common ways to
forecast one period ahead (Ft is forecast, yt is actual,).
Forecast Method
Characteristics
Ft+1 = yt-p+1
Same as p periods earlier For
example, forecast next July the same as
last July. Easy, but ignores trend.
Extrapolate trend by month
(or quarter or whatever)
p-Trends For example, project fitted
trend for all past Julys. Simple,
attractive way to handle seasonality.
Ft+m = (Ft + mTt) St
Winters’ Method Forecast m periods
ahead based on smoothed forecasts (Ft),
trend (Tt), and seasonality (St). Widely
used, but hard to explain.
Winters’ Method
To obtain a forecast Ft+m for m periods ahead
with seasonal data, the updating equations are:
Ft+m = (Ft + mTt)St
Ft = a yt/St-p + (1a)(Ft-1 + Tt-1)
St = d yt/Ft + (1d)St-p
Tt = g(FtFt-1) + (1g)Tt-1
where
Ft = smoothed series in period t
yt = actual value in period t
Tt = trend estimate in period t
St = seasonality estimate in period t
a = smoothing constant for level
g = smoothing constant for trend
d = smoothing constant for seasonal
Note Smoothing
constants follow
MINITAB’s
notation.
See J. Holton Wilson and
Barry Keating, Business
Forecasting 2/e, Irwin,
1994), p. 116.
Winters’ Method: Example
U.S. oil imports are recorded per 4-week period (13 “months” per year). Using
periodicity 13 with data from 1996-2003, MINITAB uses Winters’ method to
forecast 2004 (shown in green with 95% confidence limits in blue).
Month
Imports
1996-01
9364
1996-02
8390
1996-03
9092
1996-04
9429
1996-05
10007
1996-06
9938
1996-07
9820
1996-08
9986
1996-09
9142
1996-10
9837
1996-11
9244
1996-12
9417
1996-13
9479
1997-01
9763
1997-02
9561
1997-03
9833
1997-04
10114
1997-05
10818
1997-06
10737
1997-07
10008
1997-08
10465
1997-09
10537
1997-10
10792
1997-11
9948
1997-12
9328
1997-13
10162
1998-01
10127
1998-02
9991
1998-03
10034
1998-04
11105
1998-05
11104
1998-06
10926
1998-07
11649
1998-08
11032
1998-09
10499
1998-10
10861
1998-11
10860
1998-12
10258
1998-13
10708
Month
Imports
1999-01
10424
1999-02
10650
1999-03
10658
1999-04
11618
1999-05
11511
1999-06
11160
1999-07
11697
1999-08
11142
1999-09
10657
1999-10
10595
1999-11
10033
1999-12
10065
1999-13
10852
2000-01
10140
2000-02
11003
2000-03
11052
2000-04
11558
2000-05
11416
2000-06
12032
2000-07
11588
2000-08
12173
2000-09
11900
2000-10
11290
2000-11
11309
2000-12
12053
2000-13
11459
2001-01
12555
2001-02
11643
2001-03
12132
2001-04
12653
2001-05
12529
2001-06
11732
2001-07
11760
2001-08
11622
2001-09
11818
2001-10
11379
2001-11
11629
2001-12
10994
2001-13
11871
Month
Imports
2002-01
11088
2002-02
10904
2002-03
11198
2002-04
11765
2002-05
11769
2002-06
11753
2002-07
11624
2002-08
11890
2002-09
11075
2002-10
11893
2002-11
12268
2002-12
11100
2002-13
11530
2003-01
11008
2003-02
10764
2003-03
11857
2003-04
12446
2003-05
12814
2003-06
12941
2003-07
12788
2003-08
12904
2003-09
13042
2003-10
12526
2003-11
11846
2003-12
12011
2003-13
12254
2004-01
12370
2004-02
12205
2004-03
12716
2004-04
13430
2004-05
13606
2004-06
13539
2004-07
13508
2004-08
13599
2004-09
13280
2004-10
13322
2004-11
13108
2004-12
12830
2004-13
13327
Source: http://tonto.eia.doe.gov
Decomposition
Time series decomposition seeks to separate a time series
Y into four components: trend (T), cycle (C), seasonality
(S), and irregular (I). These components are assumed to
follow either an additive or a multiplicative model:
Model
Components
Used For
Additive
Y=T+C+S+I
Data of similar magnitude (short
run or trend-free data) with
constant absolute growth or
decline.
Multiplicative
Y=T×C×S×I
Data of increasing or decreasing
magnitude (long run or trended
data) with constant percent
growth or decline.
Decomposition
We ignore cycles on grounds that there is no accepted
theory of cycles. To decompose a monthly* time series Y:
Fit the trend T (assumed linear)
Estimate the seasonal factor Sj for each month:
 If additive, average YT for each month
 If multiplicative, average Y/T for each month
If forecasts are desired:
 extrapolate the trend
 add (or multiply by) the seasonal factor for each month
*Quarters or other sub-periods follow similar steps
Decomposition: Example
U.S. oil imports are recorded per 4-week period (13 “months” per year). Here
is MINITAB’s decomposition using periodicity 13 with data from 1996-2003,
and forecasts for 13 “months” in 2004:
Month
Imports
1996-01
9364
1996-02
8390
1996-03
9092
1996-04
9429
1996-05
10007
1996-06
9938
1996-07
9820
1996-08
9986
1996-09
9142
1996-10
9837
1996-11
9244
1996-12
9417
1996-13
9479
1997-01
9763
1997-02
9561
1997-03
9833
1997-04
10114
1997-05
10818
1997-06
10737
1997-07
10008
1997-08
10465
1997-09
10537
1997-10
10792
1997-11
9948
1997-12
9328
1997-13
10162
1998-01
10127
1998-02
9991
1998-03
10034
1998-04
11105
1998-05
11104
1998-06
10926
1998-07
11649
1998-08
11032
1998-09
10499
1998-10
10861
1998-11
10860
1998-12
10258
1998-13
10708
Month
Imports
1999-01
10424
1999-02
10650
1999-03
10658
1999-04
11618
1999-05
11511
1999-06
11160
1999-07
11697
1999-08
11142
1999-09
10657
1999-10
10595
1999-11
10033
1999-12
10065
1999-13
10852
2000-01
10140
2000-02
11003
2000-03
11052
2000-04
11558
2000-05
11416
2000-06
12032
2000-07
11588
2000-08
12173
2000-09
11900
2000-10
11290
2000-11
11309
2000-12
12053
2000-13
11459
2001-01
12555
2001-02
11643
2001-03
12132
2001-04
12653
2001-05
12529
2001-06
11732
2001-07
11760
2001-08
11622
2001-09
11818
2001-10
11379
2001-11
11629
2001-12
10994
2001-13
11871
Month
Imports
2002-01
11088
2002-02
10904
2002-03
11198
2002-04
11765
2002-05
11769
2002-06
11753
2002-07
11624
2002-08
11890
2002-09
11075
2002-10
11893
2002-11
12268
2002-12
11100
2002-13
11530
2003-01
11008
2003-02
10764
2003-03
11857
2003-04
12446
2003-05
12814
2003-06
12941
2003-07
12788
2003-08
12904
2003-09
13042
2003-10
12526
2003-11
11846
2003-12
12011
2003-13
12254
2004-01
12103
2004-02
12169
2004-03
12344
2004-04
13078
2004-05
13304
2004-06
13060
2004-07
13018
2004-08
13110
2004-09
12535
2004-10
12840
2004-11
12374
2004-12
12201
2004-13
12638
Source: http://tonto.eia.doe.gov
Decomposition: Other Exhibits
Here are some additional
MINITAB graphs from
decomposition of the oil
import data.
ARIMA Models
Basic Model Notation
Original series
Differenced series
yt = y1, y2, ... , yn
zt = yt  yt-1 = z1, z2, ... , zn-d
AR(1) model (autoregressive of order 1):
AR(p) model (autoregressive of order q):
 n observations
 nd observations
zt = d + f1zt-1 + et
zt = d + f1zt-1+ f2zt-2+ ... + ft-pzt-p + et
MA(1) model (moving average of order 1): zt = d + et  q1et-1
MA(q) model (moving average of order q): zt = d + et  q1et-1  q2et-2  ...  qt-qet-q
ARMA (p,q) models:
zt = d + f1zt-1+ f2zt-2+ ... + ft-pzt-p
+ et - q1et-1  q2et-2  ...  qt-qet-q
ARIMA(p,d,q) models (d is number of differences in working series)
See J. Holton Wilson and Barry Keating, Business Forecasting 2/e, Irwin, 1994).
ARIMA
Model identification depends on the data. It is
rarely necessary to go beyond AR(1) or MA(1),
although seasonal data will require fancier
models. Criteria for model adequacy can be
found in any forecasting textbook. Time series
modeling using ARIMA is an advanced topic
that requires additional study*.
* See J. Holton Wilson and Barry Keating, Business Forecasting 2/e, Irwin, 1994).
AR(1) Patterns
See J. Holton Wilson and Barry Keating, Business Forecasting 2/e, Irwin, 1994).
MA(1) Patterns
See J. Holton Wilson and Barry Keating, Business Forecasting 2/e, Irwin, 1994).
ARIMA: Example
Here is MINITAB’s ARIMA for U.S. Oil Imports using an ARIMA model
with one seasonal difference on data from 1996-2003 with forecasts for 13
“months” in 2004. The forecasts have very wide confidence bands.
Month
Imports
1996-01
9364
1996-02
8390
1996-03
9092
1996-04
9429
1996-05
10007
1996-06
9938
1996-07
9820
1996-08
9986
1996-09
9142
1996-10
9837
1996-11
9244
1996-12
9417
1996-13
9479
1997-01
9763
1997-02
9561
1997-03
9833
1997-04
10114
1997-05
10818
1997-06
10737
1997-07
10008
1997-08
10465
1997-09
10537
1997-10
10792
1997-11
9948
1997-12
9328
1997-13
10162
1998-01
10127
1998-02
9991
1998-03
10034
1998-04
11105
1998-05
11104
1998-06
10926
1998-07
11649
1998-08
11032
1998-09
10499
1998-10
10861
1998-11
10860
1998-12
10258
1998-13
10708
Month
Imports
1999-01
10424
1999-02
10650
1999-03
10658
1999-04
11618
1999-05
11511
1999-06
11160
1999-07
11697
1999-08
11142
1999-09
10657
1999-10
10595
1999-11
10033
1999-12
10065
1999-13
10852
2000-01
10140
2000-02
11003
2000-03
11052
2000-04
11558
2000-05
11416
2000-06
12032
2000-07
11588
2000-08
12173
2000-09
11900
2000-10
11290
2000-11
11309
2000-12
12053
2000-13
11459
2001-01
12555
2001-02
11643
2001-03
12132
2001-04
12653
2001-05
12529
2001-06
11732
2001-07
11760
2001-08
11622
2001-09
11818
2001-10
11379
2001-11
11629
2001-12
10994
2001-13
11871
Month
Imports
2002-01
11088
2002-02
10904
2002-03
11198
2002-04
11765
2002-05
11769
2002-06
11753
2002-07
11624
2002-08
11890
2002-09
11075
2002-10
11893
2002-11
12268
2002-12
11100
2002-13
11530
2003-01
11008
2003-02
10764
2003-03
11857
2003-04
12446
2003-05
12814
2003-06
12941
2003-07
12788
2003-08
12904
2003-09
13042
2003-10
12526
2003-11
11846
2003-12
12011
2003-13
12254
2004-01
11612
2004-02
11345
2004-03
12419
2004-04
12991
2004-05
13344
2004-06
13457
2004-07
13294
2004-08
13400
2004-09
13529
2004-10
13006
2004-11
12318
2004-12
12478
2004-13
12716
ARIMA: Model Fit
MINITAB’s results show that the model needs refinement (p-values for
B-P statistics are too small) and the ACF and PACF plots (next screen)
suggest possible need for seasonal terms.
Type
AR
1
MA
1
Constant
Coef
0.8722
0.5449
54.61
SE Coef
0.0850
0.1445
27.66
T
10.27
3.77
1.97
P
0.000
0.000
0.051
Differencing: 0 regular, 1 seasonal of order 13
Number of observations: Original series 104, after differencing 91
Residuals:
SS =
MS =
29397038 (backforecasts excluded)
334057 DF = 88
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag
12
24
36
48
Chi-Square
17.8
55.5
66.1
75.5
DF
9
21
33
45
P-Value
0.037 0.000 0.001 0.003
ARIMA: ACF and PACF
Residual Plots
Spikes at 7 and 13
suggest model revision.
Other Methods
Seasonal binaries in regression
Moving average to remove trend
(instead of linear OLS trend) then
decomposition on residuals
Ad hoc methods
Final Advice
Occam's Razor Given two sufficient
explanations, we prefer the simpler.
Named for the English philosopher William
of Occam (d. 1349).
Remember Occam’s Razor
Don’t be dazzled by equations
Think about underlying causes
Are your forecasts credible?
Clean, simple graphs help