Welcome to this Forecasting tutorial on Weighted
Moving Averages. We will be calculating Weighted Moving Averages.
We will also be comparing error measures using the Mean Absolute Deviation, MAD. We will be using these times series data from
7 weeks of sales. And we want to forecast sales using 4-week
weighted moving averages with weights 0.4, 0.3, 0.2, and 0.1.
In practice, the weighted moving average is usually employed when there is a need to place
more importance on some periods over others. In most cases, we place more importance on
more recent data. Therefore in this exercise, the 0.4 weight
will be placed on the most recent value, the 0.3 on the next most recent, and so on.
Let’s now calculate 4-week weighted moving averages using the given weights .4, .3, .2,
and .1. Since we’re computing 4-week averages, we
start by using data from the first 4 weeks to compute the moving average forecast for
week 5. So F5 (that is, forecast for week 5) equals
0.4 times 45 (notice that 45 is the most recent value)
+ .3 times 40 (the next most recent value) + .2 times 44 + .1 times 39 which gives 42.7.
For week 6, the weighted moving average is F6 which equals 0.4(38) + 0.3(45) + 0.2(40) + 0.1(44) which gives 41.1. For week 7, the weighted moving average is
0.4(43) + 0.3(38) + 0.2(45) + 0.1(40) which gives 41.6.
And the forecast for week 8 is 0.4(39) + 0.3(43) + 0.2(38) + 0.1(45) which
gives 40.6. Next we calculate the Mean Absolute Deviation
for this model. First we calculate the absolute errors. That
is, the positive difference between the actual and forecast values and then average them.
There are no errors for weeks 1 to 4 because there are no forecasts.
For week 5, the absolute error is 4.7. For week 6, it is is 1.9.
For week 7, it is 2.6. The mean absolute deviation MAD is the average
of these errors which gives 3.07. Now, note that in this first example, the
weights .4, .3, .2, and .1 added up to 1. Let’s look at the next example where the
weights do not add up to 1. Forecast sales using 2-week weighted moving
averages with weights 3 and 2. In this example we are calculating 2-week
moving averages where the weights 3 and 2 add up to 5, and not to 1.
So in calculating the weighted moving averages, we multiply the sales values by the weights
as we did before, but in this case, we also divide by the total weight which is 5.
And so the forecast for week 3, F3 is 3(44) + 2(39) divided by 5 which gives 42.
For week 4, it is 3(40) + 2(44) divided by 5 and that gives 41.6.
For week 5, it is 43, It is 40.8 for week 6,
And for week 7 it is 41 And finally for week 8, it is 40.6
Next we calculate the mean absolute deviation. The absolute forecast error for week 3 is
the absolute value of 40 – 42 which is 2. For week 4 it is 3.4
For week 5 it is 5 For week 6 it is 2.2
And for week 7 it is 2. On averaging these 5 values, we obtain a mean
absolute deviation value of 2.92. Now let’s compare the error measures. The MAD was 3.07 using the 4-week moving average
method with weights .4, .3, .2, and .1. And the MAD was 2.92 using the 2-week weighted
moving average with weights 3 and 2. Since the MAD is an error measure, smaller
MADs produce better smoothing of the data. Therefore, using MAD, the 2-week weighted
average method produced a better forecast. Please leave your question or comment below.
Thanks for watching.