Method · Statistics Library

EWMA chart (exponentially weighted moving average)

An EWMA chart pools each new reading with all its history using geometrically decaying weights, making it sensitive to small, sustained shifts in the process mean that an ordinary control chart would take a long time to notice.

Topic indexA reference reading outside the guided chapter sequence

Understand the idea

An ordinary control chart judges each new reading mostly on its own, which makes it slow to notice a small but persistent drift (a slowly wearing tool, a reagent quietly degrading). An EWMA chart instead blends every new reading with a running average of everything that came before it, where recent readings count for more than old ones and the weighting fades away smoothly (geometrically) rather than dropping off a cliff.

How much memory the chart has is controlled by one dial, lambda. A small lambda gives the chart a long memory: it barely reacts to a single unusual point but is very sensitive to a sustained trend, because that trend keeps nudging the running average in the same direction. A lambda of 1 makes it forget everything except the newest point, which just turns it back into an ordinary chart.

One visual quirk to expect: the control limits start narrow and FAN OUT over the first several points before settling into their steady width. That is not a bug: the EWMA statistic's own uncertainty is genuinely smaller very early on (it hasn't accumulated much history yet), so the limits correctly reflect that.

EWMA stands for exponentially weighted moving average chart, a time-weighted control chart: each plotted point is a weighted average of all past values, with the newest getting the most weight.

Practitioner explanation

KernelStats computes z_i = lambda*x_i + (1-lambda)*z_{i-1}, z_0 = mu0, with default lambda=0.2 and limit multiplier L=3: the classic Montgomery/Lucas-and-Saccucci pairing (lambda 0.05-0.25 with L about 2.7-3.0 is the standard design space). Control limits are computed EXACTLY time-varying (fanning out over the first several points via the (1-(1-lambda)^(2i)) term) rather than only reporting the steady-state asymptote, and both the exact and steady-state limits are exposed on the card so a signal near the start of the series is judged against the correct, narrower early-period limit rather than the wider eventual one.

When target/sigma are not supplied, mu0 defaults to the sample mean and sigma is estimated from the average moving range (MRbar/d2, d2=1.128), the same convention as KernelStats's other variables control charts, with the source of each (user-supplied vs. estimated) recorded on the card. Only the beyond-limits rule is applied for signals; Shewhart run rules (such as 8-in-a-row on one side) are deliberately NOT applied, because consecutive EWMA values share history and are strongly autocorrelated by construction, which would make those rules fire far more than their nominal false-alarm rate suggests.

EWMA and CUSUM have roughly comparable average-run-length performance for detecting small sustained shifts; KernelStats's Learn More content recommends EWMA specifically for its relative robustness to non-normality, and running BOTH an EWMA/CUSUM chart and an ordinary Shewhart chart together (rather than choosing only one) is standard SPC practice this card does not automate for you.

When to use it

Consider it when

Individual continuous measurements in time order need to be monitored for a small, sustained shift in the mean (roughly 0.5 to 1.5 standard deviations) that a Shewhart individuals chart would be slow to detect: gradual drift, tool wear, or slow degradation.

Use caution when

Detecting large, sudden shifts, where an ordinary individuals chart is simpler and adequate; monitoring process VARIATION rather than the mean (this chart does not track spread); or applying Shewhart run-pattern rules to the plotted EWMA values, which are correlated by construction and will falsely trigger those rules far more often than their nominal rate.

Formulas and symbols

EWMA recursion

zi=λxi+(1−λ)zi−1,z0=μ0z_i = \lambda x_i + (1-\lambda) z_{i-1}, \qquad z_0 = \mu_0

lambda the smoothing constant (0 < lambda <= 1); smaller lambda gives longer memory and more sensitivity to small sustained shifts.

Time-varying control limits

μ0±Lσλ2−λ[1−(1−λ)2i]\mu_0 \pm L\sigma\sqrt{\dfrac{\lambda}{2-\lambda}\left[1-(1-\lambda)^{2i}\right]}

The bracketed term starts near 0 and approaches 1 as i grows, which is why the limits fan out over the first several points before reaching their steady-state width.

Steady-state control limits

μ0±Lσλ2−λ\mu_0 \pm L\sigma\sqrt{\dfrac{\lambda}{2-\lambda}}

The asymptotic limit width once enough observations have accumulated for the bracketed term above to reach 1.

Assumptions and checks

  • Independence of observations. Autocorrelated data break the EWMA's calibration: positive autocorrelation makes the moving-range estimate of sigma too small relative to the real spread, so the limits are too tight and false alarms multiply, while negative autocorrelation inflates the moving-range estimate, widening the limits and slowing detection of a real shift.

    In KernelStats: Ljung-Box lag-1 test on the individual observations, reported directly on the card as an 'Independence & rational ordering' check; not testable on fewer than 8 points or a zero-variance series, which the card states honestly rather than fabricating a verdict.

  • Normality (of residuals, not of the raw data). EWMA's control limits are derived assuming the underlying observations are normal; the chart is commonly praised as fairly robust to mild non-normality (more so than a plain individuals chart), but strong skew or heavy tails still distort the true in-control run length from the nominal design value.

    In KernelStats: Not checked by KernelStats: no normality test is run on the underlying observations.

  • The smoothing constant lambda trades off sensitivity to small sustained shifts against noisiness; a poorly chosen lambda for the actual shift size of interest means the chart's true average run length differs substantially from what the analyst expects.

    In KernelStats: Not checked by KernelStats: lambda is a user-supplied option; no data-driven guidance or average-run-length calculation for the chosen lambda is computed.

Alternatives

  • I-MR Chart (Individuals & Moving Range). You want to detect large, sudden shifts and monitor process variation via the moving range, or want to apply Shewhart run rules, which are meaningless on an EWMA series.
  • CUSUM Chart (Tabular Cumulative Sum). You want the fastest classic detector of a specific, pre-chosen shift size, with an explicit estimate of when the shift began: comparable detection speed to EWMA for small sustained shifts, tuned differently.

Worked example

Scenario

A fill-weight measurement monitored with lambda=0.2, L=3, target=500g, sigma estimated at 2.1g from the moving range.

Result

The EWMA statistic drifts from 500.1 g to 503.8 g over 40 batches and first exceeds its upper limit at batch 34; by then the limit has settled at the steady-state UCL of 500 + 3 x 2.1 x sqrt(0.2/1.8) = 502.1 g.

Interpretation

A sustained upward drift of roughly 1.8 standard deviations built up gradually across the run and was flagged well before any single raw reading would have looked alarming on its own, exactly the slow-creep scenario the EWMA chart is designed to catch early.

Common misconceptions

Misconception

The EWMA chart's control limits should be a constant width from the very first plotted point, the way an ordinary individuals chart's limits are.

Correction

The EWMA statistic's variance genuinely grows with each new observation (there is less accumulated history to smooth early on) and approaches a steady-state value only after enough points. The limits correctly FAN OUT over the first several observations before settling; a signal near the start of a series must be judged against this narrower early-period limit, not the wider steady-state one.

Misconception

A point that stays inside the EWMA control limits means every individual raw reading also met the customer's specification.

Correction

Control limits are built from the process's own historical variation around its own mean: they say the SMOOTHED process is behaving as expected, not that raw units meet a specification. Specification conformance is a capability question, answered separately from statistical control.

Read more: Misconception: control limits and specification limits are the same thing

References

  1. NIST/SEMATECH e-Handbook of Statistical Methods, §6.3.2.4 EWMA control chart, NIST/SEMATECH (2012), §6.3.2.4.
  2. Exponentially weighted moving average control schemes: Properties and enhancements, Lucas, J. M. and Saccucci, M. S. (1990), Technometrics, 32(1), 1-12.