Overview
A Moving Average filter computes local averages across a sliding window, reducing short-term fluctuations while preserving slower trends.
Smooths a sequence by replacing each value with an average over a nearby window.
Compact metadata for implementation and discovery.
A Moving Average filter computes local averages across a sliding window, reducing short-term fluctuations while preserving slower trends.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(1)
average_i = sum(x[i - k + 1] ... x[i]) / kSmooths a signal by averaging a fixed-size local window.
Show a window moving over a line chart and smoothing the output.
Moving averages trade noise reduction for lag and blurred transitions.
What each reference supports for this entry.
Signal-processing reference for digital filters, convolution, spectral analysis, windows, resampling, and transform-based methods.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Signal Processing · Core
Moving average uses a fixed window, while EMA uses decaying weights.
Compare with thisSignal Processing · Extended
Savitzky-Golay smoothing preserves local polynomial shape better than a plain average.
Compare with thisMoving average uses a fixed window, while EMA uses decaying weights.
A moving average is a simple low-pass smoothing filter.