Moving averages are used to find the trend and seasonal
variations in a set of sales figures which can then be used to
forecast sales figures:
Moving averages are used in time series analysis where there are
various factors which can affect how sales occur: Seasonal
variations, long-term trend, cyclical variations and random
variations.
To see the underlying trend, the mean average of several periods
(eg 4 quarters) is used, The moving average is calculated as the
mean average of the set of periods. Then the next moving average is
the mean average calculated by dropping the value of the first
period and using the value of the next period after the last one
previously used; and so on.
If there is an odd number of periods in each of these moving
averages, the moving average will align with the middle value used
and is the trend value for those periods.
If there is an even number of periods in each moving average,
the moving averages will occur between two periods and so the mean
average of each pair of moving average must be taken to find the
trend values, which will then align with the figure after the
middle of the periods.
For example, using a moving average with 4 quarters:
Year 1 qtr 1
Year 1 qtr 2
____________ moving average 1 of y1q1 to y1q4
Year 1 qtr 3 _____________________________________ mean average
of ma1 and ma2
____________ moving average 2 of y1q2 to y2q1
Year 1 qtr 4 _____________________________________ mean average
of ma2 and ma3
____________ moving average 3 of y1q3 to y2q2
Year 2 qtr 1 _____________________________________ mean average
of ma3 and ma4
____________ moving average 4 of y1q4 to y2q3
Year 2 qtr 2 _____________________________________ mean average
of ma4 and ma5
____________ moving average 5 of y2q1 to y2q4
Year 2 qtr 3 _____________________________________ mean average
of ma5 and ma6
____________ moving average 6 of y2q2 to y3q1
Year 2 qtr 4
with:
moving average 1 of y1q1 to y1q4: ma1 = (y1q1 + y1q2 + y1q3 +
y1q4) ÷ 4
moving average 2 of y1q2 to y2q1: ma2 = (y1q2 + y1q3 + y1q4 +
y2q1) ÷ 4
etc.
mean average of ma1 and ma2 : trend1 = (ma1 + ma2) ÷ 2
mean average of ma2 and ma3 : trend2 = (ma2 + ma3) ÷ 2
etc.
Using regression the line of best fit is found for the trend
figures calculated from the moving averages above.
By subtracting the trend values from the actual values (with
which they align) the seasonal variation for each period can be
calculated.
With the trend line and the seasonal variations forecasts can
now be made by extrapolating the trend line and adding on the
relevant seasonal variation.
In the above example, the year 3 quarter 1 sales can be forecast
by using the trend line to find the trend value for y3q1 and then
adding in the seasonal variation for q1 (which can be found at year
2 quarter 1 in value trend3). Note that seasonal variations can be
negative so adding in a negative value will reduce the forecast
figure.