Statistical

MovingAverage

Smooths a bumpy column of numbers by replacing each value with the average of it and the values immediately before it. One noisy month stops dominating the picture, and the underlying trend becomes visible. The output is the same length as the input, so it charts cleanly alongside the original.

Inputs

InputAcceptsRequired
SeriesSeries (a list of numbers)Yes
WindowValue (a single number)Yes

Outputs

OutputProduces
ResultSeries (a list of numbers)

Settings

Typed in on the node or set by the assistant, not wired.

SettingDefaultNotes
Window5How many rows each average covers: 3 for a 3-month trailing average on monthly data, 12 to smooth out a full year of seasonality. The first few rows average over however many rows exist so far, so the output starts at the first row with no gaps.

Example

Your Monthly_Revenue column swings between $310K and $520K and it is hard to tell whether the business is actually growing. A moving average with Window set to 3 turns each month into its trailing three-month average. Chart the raw revenue and the smoothed series on the same LineChart; the smoothed line makes the steady climb (or the plateau) obvious.

Related nodes