Back to services

EWMA response, memory and noise

Compare EWMA step response, past-input weights, settling time and theoretical noise attenuation.

Computed response to a step from 2 to 8, shown over 16 updates. Weight strips describe infinite steady-state history; noise ratios assume independent input noise. This is one of four portfolio perspectives on the same paper.

A controlled comparison

Both smoothers begin at the first observation, 2, and receive the same signal. Only alpha changes. This isolates the effect of the weighting parameter.

The recurrence

At each step sₜ = αxₜ + (1 − α)sₜ₋₁. Alpha 0.7 puts 70% of the update weight on the current observation, while alpha 0.2 puts 20% there. The remainder belongs to the previous smoothed estimate.

Step response

The first outputs after the step are 6.2 for alpha 0.7 and 3.2 for alpha 0.2. The figure shows 16 updates. Reaching 95% of the step takes 3 and 14 updates, respectively.

Choose for the task

A step input reveals response time, not noise-rejection performance. Use representative noisy signals and a stated objective before choosing a parameter for monitoring or control. These examples do not establish an optimal alpha.

Quantifying memory

The weight of an observation k steps ago is α(1 − α)^k. After a step, the remaining gap decreases by (1 − α) each update. Reaching at least 95% of the step change therefore takes 14 updates for alpha 0.2 and 3 for alpha 0.7. These are calculated response times for the stated example, not measured runtime performance.

Source

Iterflow: Composable Streaming Statistics for JavaScript

Supporting source. Original visual explanation by Mathscapes. Research findings and illustrative calculations are identified above.