Time Series Forecasting

advertisement
Time Series Forecasting
Van Hoang
2045 S. Volutsia
Wichita, KS 67211
(316) 612 – 0882
Wichita State University
Van Hoang (B.S. Chemistry-Business Wichita State University) is currently a full-time
graduate student in Industrial Engineering at Wichita State University, Wichita Kansas
APICS Wichita Student Chapter S232
Abstract
Time series forecasting is a simple and direct quantitative forecasting method
used in operation management. Moving average, exponential smoothing without a
trend, and exponential smoothing with a linear trend are some of the models used to
predict future demand. This paper will describe these models and its usage in operation
management and the common quantitative measures to evaluate these forecasting
models.
Introduction
Time series forecasting is one of the most common forecasting techniques used
in operation management due to its simplicity and ease of usage. Here, time series
prefers to a sequence of observations of past data (6). The forecast values could be a
point forecast or a confidence interval forecast (2). For example, when an aircraft
company is using time series forecasting method to predict future demand of jets it will
sell within the next week period, the forecast could be eight jets, the value here is given
as a point forecast. The confidence interval forecast could be 95% meaning that the
forecaster assumes the forecast is accurate with 95% confidence interval. In this paper,
only point forecast would be used due to its simplicity.
Before choosing which forecasting method should be used, the company has to
consider a variety of factors that would affect the forecast such as availability of data,
data pattern, time frame, accuracy desired, and cost of forecasting (2). Time series
forecasting is generally applied in short term forecast horizon and commonly used for
inventory control (5). Time series forecasting also associates with low cost which make
it more preferable compared to other methods.
For ease of understanding, many data examples are present in this paper and all
of them are made-up by the writer with no actual basis.
Time Series Forecasting Models
Based on the data pattern, different approaches and forecasting models would
be used to predict the future demand of the desired product. Three models of time
series forecasting being discussed here are moving average, exponential smoothing
without a trend, and exponential smoothing with a linear trend.
Moving Average
Moving average is the simplest forecasting method used when the observed data
shows no trend; an example is shown in Figure 1. The observed historical demand,
A(t), shows no particular trend, thus the moving average method would be the preferred
method to predict future demand, f(t + 1), the demand of the next period. The forecast
is determined by calculating the average of the observed data. Nevertheless,
calculating the average demand over the entire observed time frame would make the
forecast less responsive to changes in future demand (4), therefore, only the most
recent data are used to calculate the moving average. How big or how small the
parameter n should be is entirely depended upon the forecaster’s assumption. In this
example, a parameter of three months and five months are used. Two different
parameters are used to show their different effects and the calculations can be
observed in Table 1.
Comparing the future forecast, f(t), presents in Figure 2. computed using n = 3
and n = 5, one can see that the greater the parameter n, the more stable the forecast is
while smaller n is more prone to changes. Since the historical observed data shows no
particular trend, the forecast does not show any trend either.
F(t) = ∑A(t) ÷ n
Moving average forecast
f(t + 1) = F(t)
10
Demand
8
6
Demand A(t)
4
2
0
1
2
3
4
5
6
7
8
9
10
Month
FIGURE 1. Observed Historical Data
Month (t)
Demand A(t)
Forecast f(t) with n = 3
Forecast f(t) with n = 5
1
6
2
7
3
5
4
7
(6 + 7 + 5) ÷ 3 = 6
5
8
(7 + 5 + 7) ÷ 3 = 6.33
6
9
(5 + 7 + 8) ÷ 3 = 6.67
(6 + 7 + 5 + 7 + 8) ÷ 5 = 6.6
7
3
(7 +8 + 9) ÷ 3 = 8
(7 + 5 + 7 + 8 + 9) ÷ 5 = 7.2
8
4
(8 + 9 + 3) ÷ 3 = 6.67
(5 + 7 + 8 + 9 + 3) ÷ 5 = 6.4
9
5
(9 + 3 + 4) ÷ 3 = 5.33
(7 + 8 + 9 + 3 + 4) ÷ 5 = 6.2
10
5
(3 + 4 + 5) ÷ 3 = 4
(8 + 9 + 3 + 4 + 5) ÷ 5 = 5.8
TABLE 1. Moving Average with n = 3 and n = 5
10
9
8
Demand
7
6
Demand A(t)
5
f(t) with n = 3
4
f(t) with n = 5
3
2
1
0
1
2
3
4
5
6
7
8
9
10
Month
FIGURE 2. Moving Average with n = 3 and n = 5
Exponential Smoothing without a Trend
Exponential smoothing without a trend is another forecasting method that could
be applied to observed data that shows no trend like the one in Figure 1. The key
difference between exponential smoothing without a trend and moving average is that
exponential smoothing has a self-adjusting mechanism that would adjust previous
forecast error. On top of that, older data is out-weighted by more recent data in this
method, assuming that the more recent data has a greater link to the future forecast
comparing to the older ones (5). In the equation below, F(t) represents the smooth
series of period t, α is the smoothing constant between zero and one, F(t-1) is the
previous forecast, and A(t) is the actual demand observed in period t.
Choosing the smoothing constant is solely depended on the forecaster’s
assumption, just like how he or she picks what value of n to use in the moving average
method. An example of exponential smoothing without a trend is shown in Table 2 with
smoothing constant of 0.3 and 0.5.
The data present in Table 1 and Table 2 are the same, but different forecasting
approaches were used thus generating different forecast. As can be seen in Figure 3.,
a smaller smoothing constant is more stable and less responsive to changes and vice
versa when a greater smoothing constant is used. Nevertheless, the forecasts present
do not match up with the historical data very well; they fail to predict the increase or
decrease in demand, just remain neutral in the middle of the up and down of the
historical data.
F(t )= αA(t) + (1-α)F(t-1)
Exponential Smoothing without a Trend
f(t + 1) = F(t)
Month (t)
Demand A(t)
Forecast F(t) with α = 0.3
Forecast F(t) with α = 0.5
1
6
-
-
2
7
F(1) = A(1) = 6
F(1) = A(1) = 6
3
5
(0.3)(7) + (1 – 0.3)(6) = 6.3
(0.5)(7) + (1 – 0.5)(6) = 6.5
4
7
(0.3)(5) + (1 – 0.3)(6.3) = 5.91
(0.5)(5) + (1 – 0.5)(6.5) = 5.75
5
8
(0.3)(7) + (1 – 0.3)(5.91) = 6.24
(0.5)(7) + (1–0.5)(5.75) = 6.38
6
9
(0.3)(8) + (1 – 0.3)(6.24) = 6.77
(0.5)(8) +(1–0.5)(6.38) = 7.19
7
3
(0.3)(9) + (1 – 0.3)(6.77) = 7.44
(0.5)(9) + (1–0.5)(7.19) = 8.10
8
4
(0.3)(3) + (1 – 0.3)(7.44) = 6.11
(0.5)(3) + (1–0.5)(8.10) = 5.55
9
5
(0.3)(4) + (1 – 0.3)(6.11) = 5.48
(0.5)(4) + (1–0.5)(5.55) = 4.78
10
5
(0.3)(5) + (1 – 0.3)(5.48) = 5.34
(0.5)(5) + (1–0.5)(4.78) = 4.89
TABLE 2. Exponential Smoothing without a Trend using α = 0.3 and α = 0.5
10
Demand
9
8
7
6
Demand A(t)
5
α = 0.3
4
3
α = 0.5
2
1
0
1
2
3
4
5
6
7
8
9
10
Month
FIGURE 3. Exponential Smoothing without a Trend
Exponential Smoothing with a Linear Trend
When observed historical demand shows a linear trend, then exponential
smoothing with a linear trend would be the appropriate method to use. In this method,
the same equation for exponential smoothing without a trend is used, in addition to that,
the trend, T(t), is also needed. To calculate the trend, another smoothing constant, β,
ranging from zero to one is needed, and which value to be used is solely depended
upon the forecaster. For the most part, a trail of various α and β are used to calculate
the forecast, and the ones that predict the forecast that follow the trend of the historical
demand best are chosen.
Looking at the example data present in Figure 4., here the historical demand
shows an increasing trend, thus, exponential smoothing with a linear trend method is
applied to calculate for the forecast. Smoothing constant at 0.2 is used for both α and
β, though these values do not have to be the same. The forecast also shows an
increasing trend along with the observed demand.
Exponential Smoothing with a Linear Trend
F(t) = αA(t) + (1-α)[F(t-1) + T(t-1)]
T(t) = β[F(t) – F(t-1)] + (1 – β)T(t-1)
Trend
f(t + 1) = F(t) + T(t)
Demand A(t)
Smoothed Estimate F(t)
Smoothed Trend T(t)
Forecast f(t)
10
10
0
12
10.4
0.08
10
12
10.78
0.14
10.48
11
10.94
0.14
10.92
15
11.87
0.3
11.08
14
12.53
0.37
12.17
18
13.93
0.58
12.91
22
16
0.88
14.5
18
17.1
0.92
16.88
28
20.02
1.32
18.03
TABLE 3. Exponential Smoothing with a Linear Trend when α = 0.2 and β = 0.2
30
Demand
25
20
Demand A(t)
15
Forecast f(t)
10
5
0
1
2
3
4
5
6
7
8
9
10
Month
FIGURE 4. Exponential Smoothing with a Linear Trend
Evaluating Forecasting Models
In order to determine which method is the most appropriate to apply, certain
measurements should be performed to give a fair comparison on time series with
different standard deviation (1). Two simple quantitative measures are mean absolute
deviation (MAD) and mean square deviation (MSD)(3). The MAD measure takes the
absolute differences between the forecast and the actual demand divided by the
number of period to generate a numerical score while the MSD measure takes the
square of the differences between the forecast and the actual demand and then divide
that value by the number of periods. Through both methods, only positive values would
be obtained, thus, the goal is to look for the smoothing constant that would generate the
lowest MAD or MSD (4). In order to so, a trial of different value of α and β are tested to
generate the lowest MAD or MSD possible. Nevertheless, the α and β combination that
leads to the smallest MAD value may not lead to the smallest MSD value, and thus the
forecaster has to decide which measurement to use.
Conclusions
The time series forecasting methods listed above are some of the basic
forecasting techniques that are simple to apply. Since there is no single best
forecasting method, a combination of forecasting methods could be used as long that it
nicely fit with the situation. Though detail observations and calculations are carried out
to make a forecast, a forecast is still just a forecast; it is nothing more than a prediction
of the non-absolute future. There is always uncertainty, thus, forecast should only be
used as guide and should not be fully depended upon.
REFERENCES
1. Billah, Baki & King, Maxwell L. & Snyder, Ralph D. & Koehler, Anne B., 2006.
"Exponential smoothing model selection for forecasting." International Journal of
Forecasting. Elsevier, vol. 22(2), pages 239-247.
2. Bowerman, Bruce, and O’Connell, Richard. Time Series and Forecasting. North
Scituate, MA: Duxbury Press, 1979. Print.
3. Box, G.E.P, and Jenkins, G.M. “Forecasting.” Time Series Analysis: Forecasting
and Control. Oakland, CA: Holden-Day, 1976. 126-59. Print.
4. Hopp, Wallace, and Spearman, Mark. “A Pull Planning Framework: Forecasting.”
Factory Physics. 3rd ed. New York, NY: McGraw-Hill, 2008. 440-56. Print.
5. Jain, C.L. Understanding Business Forecasting. Flushing, NY: Graceway
Publishing Company, Inc., 1988. 53-186. Print.
6. Janacek, Gareth, and Swift, Louise. Time Series Forecasting, Simulation,
Applications. England: Ellis Horwood, 1993. 9-80. Print.
7. Jenkins, Gwilym. Practical Experiences with Modelling and Forecasting Time
Series. Jersey, Channel Islands: GJP Publication, 1979. Print.
Download