Moving averages
Averages over a sliding window of consecutive observations that smooth out short-term noise; trailing windows use only the past, centred windows estimate the trend.
- observation at time
- window length (order); the first positions have no value
- window length; set it to the seasonal period to remove seasonality
- estimated trend-cycle at time ; missing at both ends of the series
When to use
- Trailing MA: monitoring the recent level (e.g. 7-day average of daily sales) or as a naive forecast — it uses only data available at time .
- Centred MA: estimating the trend in a historical series, and as the first step of classical decomposition. With equal to the seasonal period (12 for monthly, 4 for quarterly) the seasonal pattern averages out; even periods need the 2×m-MA so the window is centred.
How to interpret
- Larger windows give smoother curves but react more slowly to genuine changes; a trailing MA lags the series by about periods.
- The values at the ends are missing by construction: no data exist beyond the end of the series to centre the window.
Common mistakes
- Using a centred MA in a forecasting or monitoring setting: it looks into the future.
- A window that is not a multiple of the season, which leaves seasonal ripples in the "trend".
- Reading the smoothed peak as the actual peak: smoothing flattens peaks and troughs.
Example
Series 12, 15, 14, 18, 17, 21, 20, 24.
- Trailing 3-MA at : ; at : 21.67.
- Centred 3-MA at : 13.67 (same window, placed in the middle).
- 2×4-MA at : ; it exists only for .