If all variations in a time series are due to random variations, with no trend, seasonal, or cyclical component, some type of averaging or smoothing model would be appropriate. The averaging techniques in this chapter are moving average, weighted moving average, and exponential smoothing. These methods will smooth out the forecasts and not be too heavily influenced by random variations. However, if there is a trend or seasonal pattern present in the data, then a technique that incorporates that particular component into the forecast should be used.
Moving averages are useful if we can assume that market demands will stay fairly steady over time. For example, a 4-month moving average is found simply by summing the demand during the past 4 months and dividing by 4. With each passing month, the most recent month’s data are added to the sum of the previous 3 months’ data, and the earliest month is dropped. This tends to smooth out short-term irregularities in the data series.
An n-period moving average forecast, which serves as an estimate of the next period’s demand, is expressed as follows:
Mathematically, this is written as
where
A 4-month moving average has a 5-month moving average has
Storage shed sales at Wallace Garden Supply are shown in the middle column of Table 5.2. A 3-month moving average is indicated on the right. The forecast for the next January, using this technique, is 16. Were we simply asked to find a forecast for next January, we would have to make only this one calculation. The other forecasts are necessary only if we wish to compute the MAD or another measure of accuracy.
A simple moving average gives the same weight to each of the past observations being used to develop the forecast. On the other hand, a weighted moving average allows different weights to be assigned to the previous observations. As the weighted moving average method typically assigns greater weight to more recent observations, this forecast is more responsive to changes in the pattern of the data that occur. However, this is also a potential drawback to this method because the heavier weight would also respond just as quickly to random fluctuations.
A weighted moving average may be expressed as
Mathematically, this is
where
Wallace Garden Supply decides to use a 3-month weighted moving average forecast with weights of 3 for the most recent observation, 2 for the next observation, and 1 for the most distant observation. This would be implemented as follows:
The results of the Wallace Garden Supply weighted average forecast are shown in Table 5.3. In this particular forecasting situation, you can see that weighting the latest month more heavily provides a much more accurate projection, and calculating the MAD for each of these would verify this.
Choosing the weights obviously has an important impact on the forecasts. One way to choose weights is to try various combinations of weights, calculate the MAD for each, and select the set of weights that results in the lowest MAD. Some forecasting software has an option to search for the best set of weights, and forecasts using these weights are then provided. The best set of weights can also be found by using nonlinear programming, as will be seen in a later chapter.
Some software packages require that the weights add to 1, and this would simplify Equation 5-7 because the denominator would be 1. Forcing the weights to sum to 1 is easily achieved by dividing each of the weights by the sum of the weights. In the Wallace Garden Supply example in Table 5.3, the weights are 3, 2, and 1, which add to 6. These weights could be revised to the new weights 3/6, 2/6, and 1/6, which add to 1. Using these weights gives the same forecasts shown in Table 5.3.
Both simple and weighted moving averages are effective in smoothing out sudden fluctuations in the demand pattern in order to provide stable estimates. Moving averages do, however, have two problems. First, increasing the size of n (the number of periods averaged) does smooth out fluctuations better, but it makes the method less sensitive to real changes in the data, should they occur. Second, moving averages cannot pick up trends very well. Because they are averages, they will always stay within past levels and will not predict a change to either a higher or a lower level.
Exponential smoothing is a forecasting method that is easy to use and is handled efficiently by computers. Although it is a type of moving average technique, it involves little record keeping of past data. The basic exponential smoothing formula can be shown as follows:
where is a weight (or smoothing constant) that has a value between 0 and 1, inclusive.
Equation 5-8 can also be written mathematically as
where
The concept here is not complex. The latest estimate of demand is equal to the old estimate adjusted by a fraction of the error (last period’s actual demand minus the old estimate).
The smoothing constant, can be changed to give more weight to recent data when the value is high or more weight to past data when it is low. For example, when it can be shown mathematically that the new forecast is based almost entirely on demand in the past three periods. When the forecast places little weight on any single period, even the most recent, and it takes many periods (about 19) of historical values into account.2
For example, in January, a demand for 142 of a certain car model for February was predicted by a dealer. Actual February demand was 153 autos, so the forecast error was Using a smoothing constant the exponential smoothing forecast for March demand would be found by adding 20% of this error to the previous forecast of 142. Substituting into the formula, we obtain
Thus, the forecast for the demand for cars in March would be 144 after being rounded by the dealer.
Suppose that actual demand for the cars in March was 136. A forecast for the demand in April, using the exponential smoothing model with a constant of can be made:
The exponential smoothing approach is easy to use and has been applied successfully by banks, manufacturing companies, wholesalers, and other organizations. To develop a forecast with this method, a smoothing constant must be selected, and a previous forecast must be known or assumed. If a company has been routinely using this method, there is no problem. However, if a company is just beginning to use the method, these issues must be addressed.
The appropriate value of the smoothing constant, can make the difference between an accurate forecast and an inaccurate forecast. In picking a value for the smoothing constant, the objective is to obtain the most accurate forecast. Several values of the smoothing constant may be tried, and the one with the lowest MAD could be selected. This is analogous to how weights are selected for a weighted moving average forecast. Some forecasting software will automatically select the best smoothing constant. QM for Windows will display the MAD that would be obtained with values of ranging from 0 to 1 in increments of 0.01.
When the exponential smoothing model is used for the first time, there is no prior forecast for the current time period to use in developing a forecast for the next time period. Therefore, a previous value for a forecast must be assumed. It is common practice to assume a forecast for time period 1 and to use this to develop a forecast for time period 2. The time period 2 forecast is then used to forecast time period 3, and this continues until the forecast for the current time period is found. Unless there is reason to assume another value, the forecast for time period 1 is assumed to be equal to the actual value in time period 1 (i.e., the error is zero). The value of the forecast for time period 1 usually has very little impact on the value of forecasts many time periods into the future.
Let us apply this concept with a trial-and-error testing of two values of in an example. The port of Baltimore has unloaded large quantities of grain from ships during the past eight quarters. The port’s operations manager wants to test the use of exponential smoothing to see how well the technique works in predicting tonnage unloaded. He assumes that the forecast of grain unloaded in the first quarter was 175 tons. Two values of are examined: and Table 5.4 shows the detailed calculations for only.
To evaluate the accuracy of each smoothing constant, we can compute the absolute deviations and MADs (see Table 5.5). Based on this analysis, a smoothing constant of is preferred to because its MAD is smaller.
QUARTER | ACTUAL TONNAGE UNLOADED | FORECAST USING | FORECAST USING |
---|---|---|---|
1 | 180 | 175 | 175 |
2 | 168 | 177.5 | |
3 | 159 | 172.75 | |
4 | 175 | 165.88 | |
5 | 190 | 170.44 | |
6 | 205 | 180.22 | |
7 | 180 | 192.61 | |
8 | 182 | 186.30 | |
9 | ? | 184.15 |
QUAR TER | ACTUAL TONNAGE UNLOADED | FORECAST WITH | ABSOLUTE DEVIATIONS FOR | FORECAST WITH | ABSOLUTE DEVIATIONS FOR |
---|---|---|---|---|---|
1 | 180 | 175 | 5 | 175 | 5 |
2 | 168 | 175.5 | 7.5 | 177.5 | 9.5 |
3 | 159 | 174.75 | 15.75 | 172.75 | 13.75 |
4 | 175 | 173.18 | 1.82 | 165.88 | 9.12 |
5 | 190 | 173.36 | 16.64 | 170.44 | 19.56 |
6 | 205 | 175.02 | 29.98 | 180.22 | 24.78 |
7 | 180 | 178.02 | 1.98 | 192.61 | 12.61 |
8 | 182 | 178.22 | 3.78 | 186.30 | 4.3 |
Sum of absolute deviations | 82.45 | 98.63 | |||
The two software packages available with this book, Excel QM and QM for Windows, are very easy to use for forecasting. The previous examples will be solved using these.
In using Excel QM with Excel 2016 for forecasting, from the Excel QM ribbon, select Alphabetical as shown in Program 5.1A. Then simply select whichever method you wish to use, and an initialization window opens to allow you to set the size of the problem. Program 5.1B shows this window for the Wallace Garden Supply weighted moving average example with the number of past periods and the number of periods in the weighted average already entered. Clicking OK results in the screen shown in Program 5.1C, allowing you to enter the data and the weights. Once all numbers are entered, the calculations are automatically performed, as you see in Program 5.1C.
To use QM for Windows to forecast, under Modules select Forecasting. Then select New and Time Series Analysis, as shown in Program 5.2A. This would be the same for all of the models presented in this chapter. In the window that opens (Program 5.2B), specify the number of past periods of data. For the Port of Baltimore example, this is 8. Click OK, and an input screen appears, allowing you to enter the data and select the forecasting technique, as shown in Program 5.2C. Based on the method you choose, other windows may open to allow you to specify the necessary parameters for that model. In this example, the exponential smoothing model is selected, so the smoothing constant must be specified. After entering the data, click Solve, and the output shown in Program 5.2D appears. From this output screen, you can select Window to see additional information such as the details of the calculations and a graph of the time series and the forecasts.