Post on 05-Jan-2016
description
Outline
• Simple Moving Average• Weighted Moving Average• Exponential Smoothing• Comparison of Simple Moving Average and
Exponential Smoothing
LESSON 5: FORECASTING STATIONARY TIME SERIES METHODS
Time Series Methods
• In this lesson we shall discuss some time series forecasting methods. All methods discussed in this lesson are designed for stationary series. Recall from the previous lesson that a stationary series contains only the average and no trend, seasonality, cyclicity, etc.
• No method is superior to any other method in every context. In a particular context, various methods can be used and evaluated using a suitable measure (e.g., MAD, MSE, MAPE etc.) discussed in the previous lesson. Then, it is possible to use the method that works best in that context. See the Taco Bell example.
• A comparison among the methods is done near the end of the lesson.
Time Series Methods
• All these methods will be illustrated with the following example: Suppose that a hospital would like to forecast the number of patients arrival from the following historical data:
Week Patients Arrival
1 400
2 380
3 411
4 415• Note: Although week 4 data is given, some methods
require that forecast for period 4 is first computed before computing forecast for period 5.
Time Series MethodsSimple Moving Average
Week
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
| | | | | |0 5 10 15 20 25 30
Actual patientarrivals
A moving average of order N is simply the arithmetic average of the most recent N observations. For 3-week moving averages N=3; for 6-week moving averages N=6; etc.
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
PatientWeek Arrivals
1 4002 3803 411
Time Series MethodsSimple Moving Average
Given 3-week data, one-step-ahead forecast for week 4 or two-step-ahead forecast for week 5 is simply the arithmetic average of the first 3-week data
4F
4for week
forecast ahead-step-One
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
PatientWeek Arrivals
1 4002 3803 411
Time Series MethodsSimple Moving Average
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
| | | | | |0 5 10 15 20 25 30
Time Series MethodsSimple Moving Average
Week
PatientWeek Arrivals
1 4002 3803 411
5for week
forecast ahead-step-Two
5F
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
PatientWeek Arrivals
2 3803 4114 415
Time Series MethodsSimple Moving Average
5for week
forecast ahead-step-One
5F
One-step-ahead forecast for week 5 is computed from the arithmetic average of weeks 2, 3 and 4 data
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
Actual patientarrivals
3-week MAforecast
Time Series MethodsSimple Moving Average
Week
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
| | | | | |0 5 10 15 20 25 30
Actual patientarrivals
3-week MAforecast
6-week MAforecast
Time Series MethodsSimple Moving Average
Taco Bell determined that the demand for each 15-minute interval
can be estimated from a 6-week simple moving average of sales.
The forecast was used to determine the number of employees needed.
Time Series MethodsWeighted Moving Average
In the simple moving average method each of the N periods is equally important for the purpose of forecasting.
Weighted moving average is more general than the simple moving average and assigns different weights to different periods. Let,
Then, the one-step ahead forecast for period t
NtNtttttt DwDwDwF 2211
Ni
itD
itw
it
it
,,2,1
period for data actual
period to assigned weight
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
3-week MAforecast Weighted Moving Average
Assigned weights
t-1 0.70t-2 0.20t-3 0.10
Time Series MethodsWeighted Moving Average
4F
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
3-week MAforecast Weighted Moving Average
Assigned weights
t-1 0.70t-2 0.20t-3 0.10
Time Series MethodsWeighted Moving Average
5F
• Exponential smoothing method computes a forecast value which is the weighted average of the most recent data and forecast values.
• The weight assigned to the most recent data is called the smoothing constant, and the weight assigned to the most recent forecast is (1- ).
• The method requires an initial forecast value. The initial forecast value may be obtained by some other forecasting technique.
• If the smoothing constant, is large, the forecast values fluctuate with the actual data. If is small, the fluctuation is less.
Time Series MethodsExponential Smoothing
• The one-step-ahead forecast for period t
• Notice that therefore,
• With further expansion of the expression for forecast for period t it can be seen that the forecast for period t depends on all previous data!!
Time Series MethodsExponential Smoothing
11 1 ttt FDF
3
33
221
332
21
22
21
221
111
111
11
11
tttt
tttt
ttt
tttt
FDDD
FDDD
FDD
FDDF
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
Exponential Smoothing = 0.10
Ft = Dt-1 + (1 - )Ft - 1
Time Series MethodsExponential Smoothing
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
Exponential Smoothing = 0.10
Ft = Dt-1 + (1 - )Ft - 1
Initial forecast valueF3 = (400 + 380)/2=390D3 = 411
Time Series MethodsExponential Smoothing
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
Exponential Smoothing = 0.10
Ft = Dt-1 + (1 - )Ft - 1
Time Series MethodsExponential Smoothing
Initial forecast valueF3 = (400 + 380)/2=390D3 = 411
4F
Week
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
| | | | | |0 5 10 15 20 25 30
F4 = 392.1D4 = 415
Exponential Smoothing = 0.10
Ft = Dt + (1 - )Ft - 1
Time Series MethodsExponential Smoothing
5F
450 —
430 —
410 —
390 —
370 —Pat
ien
t ar
riva
ls
Week
| | | | | |0 5 10 15 20 25 30
Time Series MethodsExponential Smoothing
Comparison of Exponential Smoothing and Simple Moving Average
• Both Methods – Are designed for stationary demand– Require a single parameter– Lag behind a trend, if one exists– Have the same distribution of forecast error if
)1/(2 N
• Moving average uses only the last N periods data, exponential smoothing uses all data
• Exponential smoothing uses less memory and requires fewer steps of computation; store only the most recent forecast!
Comparison of Exponential Smoothing and Simple Moving Average
READING AND EXERCISES
Lesson 5
Reading:
Section 2.7, pp. 66-77 (4th Ed.), pp. 63-73 (5th Ed.)
Exercises:
17, 18, 24, pp. 69, 75-76 (4th Ed.), pp. 66, 72 (5th Ed.)