EWMA and CUSUM charts
Time-weighted control charts that catch small, sustained shifts of the process mean, with average run lengths.
Input
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
Layout: Subgroups · 30 rows × 4 columns · detected automatically
Read as: tab-separated · decimal point · 30 subgroups of 4 (one per row), 120 values
| Subgroup | x1 | x2 | x3 | x4 |
|---|---|---|---|---|
| Subgroup 1 | 11.992 | 11.998 | 11.995 | 12.023 |
| Subgroup 2 | 11.994 | 12.002 | 11.998 | 12.012 |
| Subgroup 3 | 12.014 | 12.014 | 12.005 | 11.989 |
| Subgroup 4 | 11.981 | 11.994 | 11.997 | 12.006 |
| Subgroup 5 | 11.998 | 11.994 | 12.004 | 11.994 |
| Subgroup 6 | 11.999 | 12.006 | 12.013 | 12.013 |
| Subgroup 7 | 12.000 | 11.990 | 12.002 | 11.992 |
| Subgroup 8 | 11.990 | 12.003 | 11.982 | 12.009 |
| Subgroup 9 | 11.982 | 11.992 | 12.006 | 12.015 |
| Subgroup 10 | 12.009 | 11.997 | 12.001 | 11.992 |
+20 more subgroups
Runs in this browser. Data is not uploaded or stored.
Results
8 points beyond the limits
EWMA · λ 0.2 · L 3 · μ0 12 (typed) · σ 0.0100742 (pooled standard deviation / c4(91), 30 subgroups) · first signal: subgroup 22
| Subgroup | Side | EWMA | Limit |
|---|---|---|---|
| 22 | Upper | 12.0058 | 12.005 |
| 23 | Upper | 12.0058 | 12.005 |
| 24 | Upper | 12.0053 | 12.005 |
| 25 | Upper | 12.0053 | 12.005 |
| 26 | Upper | 12.0058 | 12.005 |
| 27 | Upper | 12.0059 | 12.005 |
| 29 | Upper | 12.0052 | 12.005 |
| 30 | Upper | 12.0059 | 12.005 |
| Parameter | Value | Note |
|---|---|---|
| Target μ0 | 12 | typed |
| σ (individual values) | 0.0100742 | Pooled standard deviation / c4(91), 30 subgroups |
| σ of the subgroup mean | 0.00503711 | σ/√4 |
| Weight λ | 0.2 | weight of the newest point |
| Limit width L | 3 | in σ of the EWMA |
| Steady-state LCL | 11.995 | μ0 − L σ √(λ / ((2 − λ) n)) |
| Steady-state UCL | 12.005 | μ0 + L σ √(λ / ((2 − λ) n)) |
| Shift (sigmas of the plotted mean) | ARL |
|---|---|
| 0 (on target) | 559.9 |
| 0.5 | 44.13 |
| 1 | 10.84 |
| 1.5 | 5.605 |
| 2 | 3.801 |
| 3 | 2.408 |
Zero-state ARL with the steady-state limits (the chart’s exact limits are narrower at the start, so its first points signal a little sooner).
Download offline versionSingle HTML file · v1.8 · 580 KB · works without internet
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 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. The website remembers the chosen file or folder in this browser (IndexedDB, the handle only, never the data). 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), loaded only when an Excel file is opened or created.