Chapter 4-Moving Average and Smoothing
Chapter 4-Moving Average and Smoothing
Contents
1. Introduction
Introduction
This chapter introduces forecasting models applicable to time series data without
seasonal/cyclical, trend components
Methods are used for forecasting a single variable in the short-term
This method can be also used to identify a trend component of a time series
Methods
Moving average
Exponential smoothing
2. Moving average
Suppose:
m moving periods; time series y
1
m moving period mean ̄ ̄ =
The moving average for time period t is the mean of the “m” most recent observations.
The constant number m is specified at the outset
The smaller the number m, the more weight is given to recent periods and vice verse
A large m is desirable when there are wide, infrequent fluctuations in the series.
A small m is most desirable when there are sudden shifts in the level of series.
Forecast procedures
Identify moving periods (m)
Make forecast
Do forecast evaluation
10
10
11
4
Sales
0
0 5 10 15 20 25 30
Weeks 12
12
Use a three-week moving average (m=3) for the department store sales to
forecast for the week 24 and 26.
( + + ) 5.2 + 6.7 + 5.8
= = = 5.9
3 3
y 25 y 24 y 23 5 .8 6 5 .2
yˆ 26 5 .7
3 3
= − = . − . =− .
13
13
4
forecast 17 5.2 6.17 5.86
3
18 5.5 5.83 5.74
19 5.8 5.80 5.84
2 20 5.1 5.50 5.76
21 5.8 5.47 5.66
1 22 6.7 5.57 5.48
23 5.2 5.87 5.78
0 24 6 5.90 5.72
0 5 10 15 20 25 30
25 5.8 5.97 5.76
Weeks 14
26 5.67 5.90
14
3. Exponential Smoothing
3.1 Simple Exponential Smoothing
15
15
Introduction
16
16
Introduction
17
17
Introduction
18
18
19
20
20
+ (1 − ) + (1 − )
= (1 − ) + (1 − )
21
21
The following table shows the weights assigned to past observations for
= 0.2, 0.4, 0.6, …..
Weight assigned to 0.2 0.4 0.6 0.8 0.9
Yt 0.2 0.4 0.6 0.8 0.9
Yt-1 0.2(1-0.2) 0.4(1-0.4) 0.6(1-0.6)
Yt-2 0.2(1-0.2)2 0.4(1-0.4)2 0.6(1-0.6)2
Yt-3 0.2(1-0.2)3 0.4(1-0.4)3 0.6(1-0.6)3
Yt-4 0.2(1-0.2)4 0.4(1-0.4)4 0.6(1-0.6)4
Yt-5 0.2(1-0.2)5 0.4(1-0.4)5 0.6(1-0.6)5
22
22
23
23
24
To estimate , Forecasts are computed for equal to .1, .2, .3, …, .9 and
the sum of squared forecast error is computed for each.
The value of with the smallest MAPE is chosen for use in producing
the future forecasts.
25
25
26
26
27
Since no forecast is 4
5
5.8
5.6
5.14
5.34
5.14
5.54
5.42 5.58
available for the first 6
7
4.8
5.6 5.23 5.11
8 5.6 5.34 5.40
period, we set the first 9 5.4 5.42 5.52
10 6.5 5.41 5.45
estimate equal to the first 11 5.1 5.74
5.55
6.08
5.49
12 5.8
observation. 13
14
5
6.2
5.62
5.44
5.68
5.27
28
29
3. Exponential Smoothing
3.2 Holt’s Exponential Smoothing
30
30
31
31
32
32
33
33
34
34
Summary
Moving average
No trend, seasonality, and cyclicality
Same weight for observation in the moving period
Simple Exponential Moving average
No trend, seasonality, and cyclicality
Different weight, smaller to the past observations
Holt’s exponential moving average
With a linear trend
Use two exponential smoothing parameters
Do not show advantages over extrapolation
35
35
36
36
37
37
38
data.
700
600
Saws
Sales for the first and fourth quarter 400
200
100
0
0 5 10 15 20 25 30
Year
39
39
The plot of the data shows that there might be trending in the data
therefore we will try Holt’s model to produce forecasts.
We need two initial values
The first smoothed value for L1
The initial trend value b1.
We will use the first observation for the estimate of the smoothed value
L1, and the initial trend value b1 = 0.
We will use = .3 and =.1.
40
40
41
900
800
700
600
500
Sales
sales
Ht+m
400
300
200
100
0
0 5 10 15 20 25 30
Quarters 42
42