← Module 11 overview
Module 11 · Project 6 · Due the date on Canvas · Time-Series Visualization · adaptive competency DV19

Choose a smoother without erasing the event

Module 11 · Step 3 of 9 · Guided8–10 min

Why this lab Compare smoothing costs while keeping the synthetic event visible.

Wider windows suppress short-term variation, flatten peaks and lose more periods at both ends. These averages are centered, so widening them does not introduce the systematic interior lag that a trailing mean would introduce. Compare three windows on the same series, then select the smallest window that clarifies trend without hiding the inserted synthetic pulse. Centered windows use future observations: they are retrospective summaries, not forecasts available at that time. Here period t is equally spaced; irregularly spaced dates require an explicit time-based window or justified resampling. Moving averages are one family of smoothers; locally weighted regression is a widely used alternative that adapts to curvature (Cleveland, 1979).

A moving average is a linear filter. A centered average \( m_t = \sum_{j=-q}^{q} w_j\, y_{t+j} \) whose weights sum to 1 returns a constant series unchanged. When the weights are also symmetric, \( \sum_j j\, w_j = 0 \), so a straight-line trend passes through unchanged as well. A cycle whose period equals the number of equally weighted terms sums to zero over one full period, so the average removes that cycle entirely. This is why a 12-term average, centered by the 2-by-12 weights of step 6, removes a fixed monthly pattern (Cleveland & Tiao, 1976); it is also why a window matched to a genuine cycle erases that cycle from the chart.

A smoother is a transformation, not the data. A moving average is a summary you chose, with a window you chose; it is not the true series hiding underneath. A one-period spike in the raw values is a recorded observation. Keep it, annotate it and investigate it; a smoother may shrink how large it looks, but deleting the point because the smoothed line does not show it would misreport the data. An isolated aberrant observation is a recognized feature of time series in its own right (Fox, 1972).

Smoothing tradeoff lab loading…