Classical Decomposition

We now have the vocabulary — trend, season, remainder — but a vocabulary is not a method. Given only a column of numbers, how do you actually pull the pieces apart? The oldest recipe, worked out by economic statisticians in the early twentieth century and still the mental model behind everything that followed, is classical decomposition. It is a handful of moving averages and some arithmetic, and you can do it on paper. Its ideas are simple enough to trust and transparent enough to debug — which is exactly why we learn it before the fancier machinery.

The very first decision is not computational at all. It is: do the components add or multiply?

Additive vs multiplicative

Two rival models sit at the top of the subject. In the additive model the components stack like independent contributions:

y_t = T_t + S_t + R_t,

and the seasonal swing is a fixed number of units — "December adds 400 sales" — no matter how big the trend has grown. In the multiplicative model they scale together:

y_t = T_t \times S_t \times R_t,

and the seasonal swing is a fixed percentage — "December is always 30% above the local average". The visual tell is unmistakable once you know it: if the seasonal ripples keep the same height as the level climbs, go additive; if they fan out, growing in proportion to the level, go multiplicative.

From here we develop the additive algorithm; the multiplicative version is the same recipe applied to \log y_t, or with every "subtract" replaced by "divide".

The classical algorithm, step by step

Suppose the seasonal period is s (say 12 for monthly data). Four moves:

  1. Estimate the trend \hat T_t with a centered moving average of length s. Averaging over exactly one full period cancels the season (every month appears once) and smooths away the noise, leaving the slow trend. For even s you need a 2×s centered average so the window is symmetric about t — the mechanics are the subject of moving-average smoothing.
  2. De-trend by subtracting: d_t = y_t - \hat T_t. What remains is season plus noise, S_t + R_t.
  3. Estimate the season by averaging the de-trended values within each season slot. Pool every January's d_t and average them, every February's, and so on — the noise cancels across years, leaving the repeating shape \hat S_t. Center the s seasonal figures so they sum to zero (additive) or average to one (multiplicative).
  4. Read off the remainder: \hat R_t = y_t - \hat T_t - \hat S_t. Inspect it — it should look like structureless noise. Leftover pattern in \hat R_t is a warning that the model missed something.

The three pieces, stacked

Here is the output you are aiming for, laid out the way every decomposition plot in the world presents it: the observed series on top, then the extracted trend, the repeating seasonal shape, and the remainder — each on its own baseline so you can read them independently. Add the bottom three back together and you recover the top.

This four-panel view is the universal grammar of decomposition. Whether the pieces come from the classical recipe here or from STL, you read them the same way: is the trend going where you thought, is the seasonal shape sensible, and is the remainder genuinely featureless?

Worked example — a tiny additive decomposition

Take a short quarterly series (s = 4) and do it by hand. Suppose two years of data:

y = (10,\ 14,\ 8,\ 12,\ \ 14,\ 18,\ 12,\ 16).

Trend. A centered 4-term average needs a half-step shift; the simplest honest estimate of the overall level is that year 1 averages (10+14+8+12)/4 = 11 and year 2 averages (14+18+12+16)/4 = 15 — the trend rose by 4 over the year, about +1 per quarter.

De-trend and average by season. Subtract each year's level from its four quarters and pool matching quarters:

The seasonal figures are \hat S = (-1, +3, -3, +1) — and they already sum to zero, so no centering is needed. Here the remainder is exactly zero because we built the example to be perfectly additive; on real data step 4 would leave a small noisy residue. The pattern is crisp: every Q2 runs 3 above trend, every Q3 runs 3 below.

The most common decomposition blunder is reaching for the additive model when the seasonal amplitude is clearly growing with the level — the textbook case being the classic airline-passengers series, whose yearly swings get visibly taller decade by decade. Force an additive fit and the single fixed seasonal shape is too small for the late years and too big for the early ones, so a residual seasonal wave leaks into \hat R_t — the remainder still ripples instead of looking like noise. That leftover ripple is the diagnostic: seasonality in the residuals means you picked the wrong model. Switch to multiplicative (or, equivalently, decompose \log y_t) and the fanning collapses to a constant swing.

A centered moving average of length s cannot be computed for the first and last s/2 observations — there is no data on one side to average. So classical decomposition hands you a trend (and hence a remainder) with the two ends chopped off. That is an annoyance for description and a real problem for forecasting, where the most recent points matter most. It is one of the headline reasons more modern methods — STL, and model-based approaches like X-13 — were invented: they estimate the trend right up to the final observation instead of surrendering the endpoints.