STABILITY / 010OFFLINE
EWMA and CUSUM charts
Time-weighted control charts that catch small, sustained shifts of the process mean, with average run lengths.
Input
Example dataReplace with your own measurements
Paste, open a CSV, TSV, TXT or XLSX file (up to 20 MB), or drop it on the field. Files are read in this browser only.
10,01 10,02 9,99
1 column
10,01 10,02 9,99 10,00 10,03 9,98
1 row = 1 subgroup
Columns: tab, ; or ,
Decimals: 12,5 or 12.5
Paste measurements to start.
Runs in this browser. Data is not uploaded or stored.
Results
New out-of-control signal
—
Method
- What for: EWMA and CUSUM charts weigh the history of the process, so they find small, sustained shifts of the mean (about 0.5 to 2 σ of the plotted mean) much sooner than a Shewhart chart. For large, sudden shifts and for the spread, use the variables control charts (I-MR, X̄-R, X̄-S) of FactoKit with their tests for special causes. Both charts assume independent, roughly normal measurements in time order.
- Data: one column gives individual values, several columns one subgroup per row (as in the control charts). Subgroups may have different sizes; an empty row has no point, and the EWMA and the sums carry over it unchanged.
- Target μ0: typed (the nominal or a historical mean), otherwise the mean of all measurements. With the mean of the same data, a shift in the middle of the data also moves the target, which hides part of the shift: type the target when you know it. σ: typed (historical), otherwise estimated as Minitab does for these charts: individual values MR̄ / d2(2) with moving ranges of two consecutive values; subgroups the pooled standard deviation Sp / c4(d + 1), Sp = √(Σ(nᵢ − 1)sᵢ² / d), d = Σ(nᵢ − 1) (Minitab's default), or R̄: Σfᵢ rᵢ/d2(nᵢ) / Σfᵢ with fᵢ = (d2(nᵢ)/d3(nᵢ))², or S̄: Σhᵢ sᵢ/c4(nᵢ) / Σhᵢ with hᵢ = c4(nᵢ)²/(1 − c4(nᵢ)²). For equal sizes these are R̄/d2 and S̄/c4. The σ of a subgroup mean is σ/√nᵢ.
- EWMA (Roberts 1959): zᵢ = λ x̄ᵢ + (1 − λ) zᵢ₋₁ with z₀ = μ0. Its variance Var(zᵢ) = λ²σ²/nᵢ + (1 − λ)² Var(zᵢ₋₁), Var(z₀) = 0, is exact for any subgroup sizes; for equal sizes it is σ²/n · λ/(2 − λ) · [1 − (1 − λ)^(2i)]. Limits μ0 ± L √Var(zᵢ): narrow at the start, widening to the steady-state μ0 ± L σ √(λ / ((2 − λ) n)). Defaults λ = 0.2 and L = 3 (Minitab); a point beyond a limit is a signal, no other tests are used.
- CUSUM, tabular (Page 1954; Montgomery, Introduction to Statistical Quality Control, ch. 9): each mean is standardized, yᵢ = (x̄ᵢ − μ0) / (σ/√nᵢ); the upper sum S⁺ᵢ = max(0, S⁺ᵢ₋₁ + yᵢ − k) and the lower sum S⁻ᵢ = max(0, S⁻ᵢ₋₁ − yᵢ − k) start at 0, and a sum above h is a signal. Defaults k = 0.5 and h = 4 (Minitab; Montgomery suggests h = 5). The chart draws the sums in data units, S⁺ · σ/√nᵢ above 0 and −S⁻ · σ/√nᵢ below, with limits ±h σ/√nᵢ; for equal sizes this is the textbook CUSUM with K = kσ/√n and H = hσ/√n, for unequal sizes the limits vary with the size. FIR (fast initial response, Lucas & Crosier 1982) starts both sums at h/2, so a process that starts off target signals sooner; off by default. The sums are not reset after a signal. For each signal the table gives N, the points since the sum was last 0, and Montgomery's estimate of the new mean μ0 ± σ/√n (k + S/N) (equal sizes only).
- Average run length (ARL): the expected number of points until a signal, for a shift of the mean from the first point on, in σ of the plotted mean. It is computed from the integral equation of the run length with Gauss–Legendre quadrature (Crowder 1987); the EWMA uses its steady-state limits (as the published tables of Lucas & Saccucci 1990), so the chart, whose first limits are narrower, signals a little sooner. The two-sided CUSUM combines its halves, 1/ARL = 1/ARL⁺ + 1/ARL⁻; with FIR the table shows the ARL without the headstart. Checks: k 0.5, h 4 gives 168 on target and 8.38 for a 1σ shift; h 5 gives 465 and 10.4; EWMA λ 0.1, L 2.814 gives 500 and 10.3 (Montgomery's tables). Shown for λ ≥ 0.01 and h ≤ 30.
- Phase I and Phase II: with empty fields the target and σ come from the data shown (Phase I). Typed values are fixed, so new points are judged against them (Phase II). Freeze target and σ takes both from the first N rows (25 by default) or all data so far, with the estimate chosen above, and types them in; the values are saved in the settings file. Changing them or the σ estimate ends the freeze.
- Live monitoring (Chrome and Edge, File System Access API) reads a file that a test stand appends rows to, or a folder where every new file (matching a pattern such as *.csv) is one subgroup or adds its rows, through the same parser and “Read as” choices as a paste. A file is read only after its size and time stayed the same for two checks; every file read is remembered and never read twice. Rows found when watching starts are history; a new point beyond the limits afterwards shows a banner, “(!)” in the page title and, if chosen, a short sound. The page must stay open; files are only read, never changed; sub-folders are not watched. This offline file does not remember the choice: choose the file or folder again each time you open it. Nothing is sent anywhere.
- Conclusion: “In control” when no point is beyond the limits, otherwise the number of such points (a CUSUM usually stays beyond its limit for several points after a shift). A target or σ estimated from fewer than 20 points is unreliable.
- Files: CSV, TSV and TXT are read as if pasted (UTF-8, UTF-16, otherwise Windows-1257). XLSX: choose the sheet and the columns or a cell range; formula cells use the value Excel last saved, dates are kept as text. Files up to 20 MB are read in this browser only and never uploaded.
- XLSX files are read with SheetJS Community Edition 0.20.3, Apache License 2.0 (license text at the end of this file).