4
$\begingroup$

In the textbook Forecasting: principles and practice by Hyndman and Athana­sopou­los, in the moving average smoothing section (Sec 6.2), the authors speak of even order moving average smoothing not being symmetric. What is the importance of symmetry in the sense that the text talks about?

Why should it be desirable?

Any help would be appreciated.

$\endgroup$
5
$\begingroup$

Suppose you have an increasing trend, say $y_t=t$, i.e., $1, 2, 3, 4, ...$ and a moving window of length 4.

Then at time $t$, the actual value is $y_t=t$. But the moving average is $$ \frac{1}{4}(y_{t-1}+y_t+y_{t+1}+y_{t+2}) = \frac{1}{4}(t-1+t+t+1+t+2)=t+0.5\neq t=y_t.$$ So your moving average is biased upward by $0.5$. And completely needlessly so: if you use a symmetric moving window of length $5$ (from $t-2$ to $t+2$), the bias will disappear.

The same happens if you have seasonal data, e.g., a sine curve. Then a moving average from a rolling window of length 4 (e.g., from $t-1$ to $t+2$) will anticipate the seasonality. It will be "ahead of its time", so to say. If you use a window from $t-2$ to $t+1$, the moving average will lag the seasonality.

To be honest, the effect will likely be minor, especially for real data where the signal is obscured by noise. But it's an unnecessary ugliness, so we like to avoid it.

$\endgroup$
2
$\begingroup$

This is in the chapter on seasonal decomposition in Hyndman and Athana­sopou­los's textbook.

Moving averages are used in seasonal decomposition to create an unbiased baseline. If we have a 5 period moving average, that moving average is symmetric because it includes the same amount of data before (2 periods) as after (2 periods).

If we have an even order, say 4, there will be more on one side than another -- the average will reflect 2 periods before and 1 period after, which is biased (biased in favor of the before data).

$\endgroup$
  • $\begingroup$ Thanks for your interest and help. I understand what you're saying and I hope I do not sound a bit repetitive, but why would that 'biasedness' towards the before past data not be desirable? Do you have an example? ;) $\endgroup$ – An old man in the sea. Feb 22 '15 at 9:12
  • $\begingroup$ Bias is always bad. Sometimes we use biased estimates because even though they are biased, they have other desirable properties (e.g. lower variance). But here there's no reason to tolerate the bias. $\endgroup$ – zbicyclist Feb 23 '15 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.