211. Cumulative

Average of every observation since the start of the series. The expanding-window endpoint of the moving-averages axis.

𝑠𝑡=1𝑡𝑖=1𝑡𝑥𝑖

Forecast: 𝑥̂𝑡,𝑡+1=𝑠𝑡 — predict the long-run average.

211.0.1. Behavior

The cumulative average can also be written recursively:

𝑠𝑡=(𝑡1)𝑠𝑡1+𝑥𝑡𝑡=𝑠𝑡1+𝑥𝑡𝑠𝑡1𝑡

The second form makes the dynamics clear:

So the effective smoothing parameter of the cumulative average is 𝛼𝑡=1/𝑡decreasing over time. As more data arrives, the cumulative average becomes increasingly insensitive to new observations.

211.0.2. Comparison to other moving averages

The relationship between 𝑀, 𝛼, and effective memory:

211.0.3. When to use

Don’t use it as a forecast for a non-stationary series. Cumulative gives equal weight to data from years ago and yesterday — useless if the level has shifted.

211.0.4. Connection to MLE

The cumulative average is the maximum likelihood estimator of the population mean for an i.i.d. process. So if you genuinely believe the data are i.i.d. with constant mean, cumulative average is optimal — best you can do.

If you don’t believe i.i.d. (which is true of almost all real time series), use SES, ETS, or ARIMA instead.

Example

Given:

𝑡123456
𝑥𝑡102030201224

Iterate:

𝑡𝑥𝑡𝑠𝑡=1𝑡𝑖=1𝑡𝑥𝑖𝛼𝑡=1/𝑡
11010/1 = 10.001.00
220(10+20)/2 = 15.000.50
330(10+20+30)/3 = 20.000.33
420(10+20+30+20)/4 = 20.000.25
512(10+20+30+20+12)/5 = 18.400.20
624(10+20+30+20+12+24)/6 = 19.330.17

Notice:

  • 𝑠𝑡 stabilizes around 19–20 even as new data wiggles around.
  • The effective 𝛼𝑡 shrinks: by 𝑡=6, the cumulative average reacts to a new observation with weight only 0.17. By 𝑡=100, weight 0.01 — essentially frozen.
  • This means the cumulative average is a late indicator. If the underlying mean shifts at 𝑡=100, it’ll take many observations before 𝑠𝑡 catches up.