Forecasting: Moving Averages, MAD, MSE, MAPE - YouTube

Channel: Joshua Emmanuel

[0]
Welcome to this Forecasting Series. In this video, we鈥檒l be calculating Moving
[5]
Averages. And we鈥檒l also be computing Error Measures.
[9]
The error measures we鈥檒l be calculating are
[12]
The Mean Absolute Deviation The Mean Squared Error
[15]
and the Mean Absolute Percent Error
[18]
We鈥檒l be using this historical sales data here, collected over a period of 7 weeks.
[25]
We will be calculating 3 week moving averages and also compute a moving average forecast
[32]
for week 8.
[32]
We start by calculating the moving average
[36]
for the 4th week. That is, we average the sales values for the
[40]
first 3 weeks to produce a moving average forecast for week 4.
[46]
Thus, the moving average forecast for week 4 is (39+44+40) divided by 3 which gives 41.
[56]
Next we average weeks 2, 3, and 4 sales to obtain the moving average forecast for week
[62]
5. That is, (44+40+45) divided by 3 which gives
[70]
43. For week 6, the moving average is from weeks
[72]
3, 4, and 5. That is (40+45+38) divided by 3 which gives 41.
[81]
For week 7, it is (45+38+43) divided by 3 which gives 42.
[88]
And finally, the moving average forecast for week 8 is (38+43+39) divided by 3 which gives
[97]
40.
[98]
Next we calculate the forecast errors. Forecast Errors are calculated as Actual Values
[105]
minus corresponding Forecast Values. Since weeks 1 to 3 have no forecast values,
[111]
we begin calculating errors in week 4. Thus, week 4 error is 45 - 41 which equals
[119]
4. Week 5 error is 38 - 43 which equals -5.
[125]
Week 6 error is 43 - 41 which equals 2. And week 7 error is 39 - 42 which equals -3.
[135]
Next we calculate the Mean Absolute Deviation or Error.
[140]
Note that Error and Deviation are used interchangeably. The two bars around Error here denote absolute
[147]
values. That is, return a positive value whether the
[151]
original value is positive or negative. So the absolute value of 4 is 4.
[155]
The absolute value of negative 5 is 5. For 2, it is 2.
[160]
And for negative 3, it is 3. To find the mean absolute deviation (MAD or
[166]
MAE), we simply average these absolute errors. First we sum up the absolute errors, and then
[173]
divide the total by 4 (since there are 4 errors). The total is 14, and the MAD is 14 divided
[181]
by 4 which gives 3.5.
[185]
Next we calculate the Mean Squared Error. In this case, we first square the errors and
[190]
then average them. Since the square of negative values is always
[193]
positive, we can simply square the absolute errors.
[197]
Hence, 4 squared is 16, 5 squared is 25, 2 squared is 4, and 3 squared is 9.
[205]
The total of these squared errors is 54 and the mean squared error is 54 divided by 4
[212]
which gives 13.5.
[215]
Finally, let us calculate the Mean Absolute Percent Error.
[220]
The absolute percent error is a measure of the error as a percentage of actual values.
[226]
To obtain the absolute percent error, we simply divide the absolute errors by the actual Sales
[232]
values and multiply by 100%. For week 4, the absolute percent error is
[238]
calculated as 4 divided by 45 times 100%, and that gives 8.89%.
[247]
And for week 5, 5 divided by 38 times 100%, which gives 13.16%.
[255]
For week 6, 2 divided by 43 which gives 4.65% And finally for week 7, it is 3 divided by
[264]
39 which gives 7.69%. The sum of these absolute errors is 34.39%,
[273]
and on dividing it by 4, we obtain the mean absolute percent error of 8.60%.
[282]
And that pretty much how to calculate moving averages and forecast error measures.
[286]
Please leave a comment or question below and have a great day.
[289]
Thank you!