Tools › Quality › Control › CUSUM and EWMA Charts › Method
CUSUM and EWMA Charts: Method
Open the free CUSUM and EWMA Control Charts
CUSUM and EWMA Charts: Catching Small Shifts of a Process Mean
The tool takes a series of measurements in time order and draws three control charts on one time axis: the values with Shewhart limits, the tabular cumulative sum (CUSUM) and the exponentially weighted moving average (EWMA). It marks where each chart signals, estimates when and by how much the mean changed, and computes how long each design takes on average to signal. With specification limits it adds a capability section for data that are not normal.
The idea: remember the past points
A Shewhart chart judges each point alone: it signals when one point is more than three standard deviations (sigma) from the target. A lasting shift of half a sigma or one sigma rarely pushes a single point that far, so the chart can run for a long time without a signal. The CUSUM and the EWMA carry information from earlier points. A small shift that single points do not show adds up.

The equations
| Quantity | Formula | Note |
|---|---|---|
| Plotted point | xi: one measurement, or the mean of a subgroup of n | sigma of a point = sigma ÷ √n |
| Shewhart signal | |xi − target| > L sigma | L = 3 by default |
| Upper sum | C+i = max(0, xi − (target + K) + C+i−1) | K = k sigma |
| Lower sum | C−i = max(0, (target − K) − xi + C−i−1) | both start at 0, or at H ÷ 2 with a head start |
| CUSUM signal | C+i > H or C−i > H | H = h sigma |
| Change estimate | mean after the change = target + K + C+ ÷ N+ | N+: points since the sum was last zero; mirror form for the lower sum |
| EWMA | zi = λ xi + (1 − λ) zi−1, z0 = target | λ: weight of the newest point |
| EWMA limits | target ± L sigma √(λ ÷ (2 − λ) · [1 − (1 − λ)2i]) | the bracket tends to 1: the steady-state limits |
| Shewhart run length | ARL = 1 ÷ p | p: chance of one point beyond the limits |
| CUSUM run length, Siegmund | ARL = (e−2Δb + 2Δb − 1) ÷ (2Δ²), Δ = shift − k, b = h + 1.166 | one side; two sides: 1 ÷ ARL = 1 ÷ ARLupper + 1 ÷ ARLlower |
| Box-Cox transformation | y = (xλ − 1) ÷ λ; y = ln x at λ = 0 | λ by maximum likelihood, interval by the likelihood ratio |
| Capability, normal | Cpk = min[(USL − x̄) ÷ 3s, (x̄ − LSL) ÷ 3s] | after Box-Cox: the same with transformed data and limits |
| Capability, percentiles | Cnpk = min(USL − median, median − LSL) ÷ [(p99.865 − p0.135) ÷ 2] | the two percentiles stand in for ± 3 sigma |
The tabular CUSUM, the EWMA with its steady-state limits, the Box-Cox log-likelihood and the percentile indices are as printed in the NIST/SEMATECH e-Handbook of Statistical Methods (sections 6.3.2.3, 6.3.2.4, 6.5.2 and 6.1.6), and the page reproduces the handbook's worked CUSUM table, its EWMA example and its Box-Cox table. The handbook gives the rules of thumb the form opens on: k equal to half the shift to be detected, h of about 4 or 5, and an EWMA weight between 0.2 and 0.3.
Average run length
The average run length is the mean number of points until a design signals. With no shift it says how rarely the design signals by chance (370 points for three-sigma limits); with a shift it says how soon the design responds. Designs are compared at an equal in-control run length, because any chart can be made quick by making it signal often. The page computes the CUSUM run length twice: by Siegmund's closed-form approximation, shown with its numbers, and by solving the integral equation of the run length numerically. The EWMA run length is the numerical solution of its integral equation, for steady-state limits and a start at the target. The numerical CUSUM figures agree with the one-sided values 336 and 930 that the NIST handbook prints for k = 0.5 with h = 4 and h = 5 at zero shift; a two-sided chart, which is what the page draws, signals twice as often with no shift (168 and 465).
Change estimate
When the upper sum signals, it has been above zero for N+ points, and over exactly those points it has added x − (target + K). So target + K + C+ ÷ N+ is the mean of those points, and the point at which the sum was last zero estimates the last point before the change. Both are estimates from a stretch chosen because it ran high: they lean toward a later change point and a larger shift than the true ones when the shift is small.
Capability when the data are not normal
Cpk assumes a normal distribution. For skewed measurements the normal curve puts weight where no data are, on the short-tail side, and too little on the long-tail side, so the index can point at the wrong limit. The page tests normality with the Anderson-Darling statistic, estimates the Box-Cox exponent that makes the data closest to normal, and applies the same index formulas to the transformed data and limits. The percentile method needs no distribution but a great deal of data: the 0.135th and 99.865th percentiles lie inside the sample only from about 740 values on, and the page says so when they do not.
What it assumes
Points independent of one another; for the run lengths and limits, normal about the target with a known sigma; a target and sigma that describe the process when it is stable. The capability section treats all pasted measurements as one population.
When it misleads
Measurements taken close together are often correlated, and all three charts then signal more often than their run lengths say. A target and sigma estimated from few points, or from a stretch that already holds a shift, move every limit. Skewed data produce Shewhart signals with no change at all. The CUSUM and the EWMA respond slowly to a single large jump, which is why they are drawn beside the Shewhart chart and do not replace it. A capability index from a series in which a chart signals describes a mix of process levels. The page does not handle autocorrelated data, attribute (count) data, or multivariate charts.
Common mistakes
- Entering k and h in data units where sigma units are asked for, or the reverse.
- Using the standard deviation of single measurements for points that are subgroup means (the limits are then √n too wide).
- Estimating sigma from the whole series with the ordinary standard deviation: a shift inside the data inflates it and hides itself. The moving range is far less affected.
- Reading every point of a run of CUSUM signals as a new event; the sum stays above the line until the process or the sum is reset.
- Comparing two designs with different in-control run lengths and calling the quicker one more sensitive.
- Quoting the one-sided run length for a two-sided chart: with no shift the two-sided value is half.
- Computing Cpk from skewed data without a normality check, or transforming the data and forgetting to transform the limits.
- Taking the smallest and largest of 100 values as the 0.135th and 99.865th percentiles.
Related tools
This page adds the charts for small shifts, their run lengths, and capability for non-normal data. SPC and Capability has the Shewhart charts for subgroups and attributes with the run rules; Dimensional Capability covers capability of machined dimensions; Distribution Fitting fits and compares named distributions; Forecast Value Added uses a tracking signal, a cumulative sum of forecast errors, on the same principle.