• No results found

The “past history” data can be smoothed in many ways. In this section we consider two straightforward averaging methods, namely the mean (4/2/1) and simple moving averages (4/2/2). In both cases the objective is to make use of past data to develop a forecasting system for future periods.

4/2/1 The mean

The method of simple averages is simply to take the average of all observed data as the forecast. So

mean forecast Ft+1= 1

t Xt i=1

Yi. (4.1)

When a new observation, Yt+1, becomes available, the forecast for time t + 2 is the new mean including the previously observed data plus this new observation:

Ft+2= 1 t + 1

Xt+1 i=1

Yi. (4.2)

When is this very simple method appropriate? Referring to the nine cells in Pegels’ classification (Figure 4-1b), it is clear that only if the process underlying the observed Y values (i) has no noticeable trend, and (ii) has no noticeable seasonality will this simple averaging process produce good results. As the calculation of the mean is based on a larger and larger past history data set, it becomes more stable (from elementary statistical theory), assuming the underlying process is stationary.

142 Chapter 4. Exponential Smoothing Methods

What about data storage? It might seem that all the past data need to be stored for this procedure; but, in fact, only two items need be stored as time moves on. We can rewrite (4.2) in a recursive form:

recursive calculation

Ft+2= tFt+1+ Yt+1 t + 1 .

So in carrying out the computations, only the most recent forecast and the most recent observations need to be stored. When fore-casting a large number of series simultaneously (e.g., in inventory management), this saving becomes important.

The major impediment in using this simple method is the unlikely assumption that business time series are really based on an underlying

“constant” process (cell A-1 in Pegels’ table).

4/2/2 Moving averages

One way to modify the influence of past data on the mean-as-a-forecast is to specify at the outset just how many past observations will be included in a mean. The term “moving average” is used to describe this procedure because as each new observation becomes available, a new average can be computed by dropping the oldest observation and including the newest one. This moving average will then be the forecast for the next period. Note that the number of data points in each average remains constant and includes the most recent observations.

A moving average forecast of order k, or MA(k), is given by moving average

forecast Ft+1= 1

k Xt i=t−k+1

Yi.

This use of moving averages is slightly different from the use of moving averages in smoothing as described in the previous chapter.

There we estimated the trend-cycle in a data series by taking an average of nearby points. Here we are forecasting the next observation by taking an average of the most recent observations. To avoid confusion, we use MA(k) to denote a moving average forecast of order k and k MA to denote a moving average smoother of order k.

Compared with the simple mean (of all past data) the moving average of order k has the following characteristics:

• it deals only with the latest k periods of known data,

• the number of data points in each average does not change as time goes on.

But it also has the following disadvantages:

• it requires more storage because all of the k latest observations must be stored, not just the average,

• it cannot handle trend or seasonality very well, although it can do better than the total mean.

Table 4-2 and Figure 4-4 illustrate the application of the technique of moving averages to the series of values for electric can opener shipments using both a three- and five-month moving average.

In Table 4-2 the MA(3) values in column 4 are based on the values for the previous three months. For example, the forecast for April (the fourth month) is taken to be the average of January, February, and March shipments.

April’s forecast = (200 + 135 + 195)/3 = 176.7.

The last figure in column 4 is December’s MA(3) forecast of 244.2 and is the average for September, October, and November.

Similarly, in column 5, the MA(5) averages are shown as forecasts for the next month ahead. The June forecast of 207.5 is the average of shipments made from January through May, and the December forecast of 203.5 is the average of months 7, 8, 9, 10, and 11. Clearly, as new values for shipments become known, the moving average can be easily recomputed.

From Figure 4-4 it can be seen that the more observations included in the moving average, the greater the smoothing effect. A forecaster must choose the number of periods (k) in a moving average. The two extreme cases are k = 1 and k = n.

MA(1) That is, a moving average of order 1—the last known data point (Yt) is taken as the forecast for the next period (Ft+1 = Yt). An example of this is “the forecast of tomorrow’s closing price of IBM stock is today’s closing price.” This was called the na¨ıve forecast (NF1) in Chapter 2.

144 Chapter 4. Exponential Smoothing Methods

(1) (2) (3) (4) (5)

Time Observed values Three-month Five-month

Month period (shipments) moving average moving average

Jan 1 200.0 — —

Feb 2 135.0 — —

Mar 3 195.0 — —

Apr 4 197.5 176.7 —

May 5 310.0 175.8 —

Jun 6 175.0 234.2 207.5

Jul 7 155.0 227.5 202.5

Aug 8 130.0 213.3 206.5

Sep 9 220.0 153.3 193.5

Oct 10 277.5 168.3 198.0

Nov 11 235.0 209.2 191.4

Dec 12 — 244.2 203.5

Analysis of errors

Test periods: 4–11 6–11

Mean Error (ME) 17.71 −1.17

Mean Absolute Error (MAE) 71.46 51.00

Mean Absolute Percentage Error (MAPE) 34.89 27.88

Mean Square Error (MSE) 6395.66 3013.25

Theil’s U -statistic 1.15 0.81

Table 4-2: Forecasting electric can opener shipments using moving averages.

MA(n) In this case, the mean of all observations is used as a forecast.

So this is equivalent to the mean forecast method.

Note that use of a small value for k will allow the moving average to follow the pattern, but these MA forecasts will nevertheless trail the pattern, lagging behind by one or more periods. In general, the larger the order of the moving average—that is, the number of data points used for each average, the greater the smoothing effect.

Algebraically, the moving average can be written as follows:

Ft+1 = Yt+ Yt−1+ · · · + Yt−k+1 k

Months

Shipments of electric can openers

2 4 6 8 10 12 14

150200250300

Observed values

MA(3) forecast

MA(5) forecast

Figure 4-4: Shipments of electric can openers: observed data and moving average forecasts.

Ft+2 = Yt+1+ Yt+ · · · + Yt−k+2

k .

Comparing Ft+1and Ft+2, it can be seen that Ft+2requires dropping the value Yt−k+1 and adding the value Yt+1 as it becomes available, so that another way to write Ft+2 is

Ft+2= Ft+1+ 1

k(Yt+1− Yt−k+1) (4.3) It can be seen from (4.3) that each new forecast (Ft+2) is simply an adjustment of the immediately preceding forecast (Ft+1). This adjustment is (1/k)th of the difference between Yt+1 and Yt−k+1. Clearly if k is a big number, this adjustment is small, so that moving averages of high order provide forecasts that do not change very much.

In summary, an MA(k) forecasting system will require k data points to be stored at any one time. If k is small (say 4), then the storage requirements are not severe although for many thousands of time series (say for inventories involving thousands of stockkeeping units) this can be a problem. In practice, however, the technique of

146 Chapter 4. Exponential Smoothing Methods

5 10 15 20

Observed data

MA(5) forecast

Mean forecast

Figure 4-5: Forecasts of data containing a level shift. Note that the mean of all past data does not catch up with the level shift, whereas the MA(5) forecast does correct for the shift after a few time periods.

moving averages as a forecasting procedure is not used often because the methods of exponential smoothing (examined in Section 4/3) are generally superior.

It is useful to consider how the forecasting method breaks down when the assumption of an underlying constant process is not met.

breakdown of

assumptions As Figure 4-5 shows, when the underlying process is a step function (which is another way of saying the data undergo a sudden change at some point), then the mean used as a forecast for the next period is unable to catch up. However, the MA(5) method corrects its forecasts for the level shift after five periods. Similar tests of the behavior of the forecasts when the assumptions are not met can be carried out.

As will be shown in Section 4/4, when the data series exhibits trend and seasonality, neither the mean as a forecast nor an MA forecast is appropriate.