CUSUM chart: tabular CUSUM with k and h explained
A CUSUM chart (cumulative sum) adds up the deviations of each observation from a target, so that a small, persistent shift builds into a large signal. The tabular form keeps two running sums: C⁺ collects evidence that the mean has moved up, C⁻ that it has moved down. Each sum ignores deviations smaller than an allowance K and resets to zero when the evidence disappears. When either sum exceeds the decision interval H, the chart signals.
When to use it
- You need to detect small shifts in the mean, about 0.5 to 2 standard deviations, sooner than an individuals or Xbar chart would.
- You have a clear target value, such as a nominal dimension or a fill target.
- You want an estimate of when the shift started and how big it is, which the tabular CUSUM gives directly.
For large, sudden shifts, a Shewhart chart such as the individuals chart is as fast or faster. The EWMA chart offers similar sensitivity with a display that is easier for some people to read.
How it works
Set the target μ₀ and the standard deviation σ of the plotted values (individual values, or subgroup means with σ/√n). Choose two constants in σ units:
- k, the allowance or slack: usually half the shift you want to detect, so k = 0.5 for a 1σ shift. K = kσ.
- h, the decision interval: commonly 4 or 5. H = hσ.
Starting from C⁺₀ = C⁻₀ = 0:
C⁺ᵢ = max(0, xᵢ − (μ₀ + K) + C⁺ᵢ₋₁)
C⁻ᵢ = max(0, (μ₀ − K) − xᵢ + C⁻ᵢ₋₁)
Signal when C⁺ᵢ > H or C⁻ᵢ > HValues within μ₀ ± K drain the sums; values beyond feed them. When C⁺ signals, the new mean can be estimated as μ₀ + K + C⁺ᵢ/N⁺, where N⁺ is the number of consecutive samples since C⁺ was last zero. The point where the run of nonzero C⁺ began is the most likely start of the shift.
With k = 0.5, a simulation of 40,000 runs for this article gave an in-control average run length of about 167 samples for h = 4 and about 467 for h = 5, and about 8.4 and 10.3 samples to detect a 1σ shift. The NIST/SEMATECH e-Handbook covers the same method.
Use only the decision interval as the signal. The cumulative sums are correlated from point to point, so the tests for special causes based on runs and zones do not apply.
Example
A wire-drawing line makes copper wire with a target diameter of 2.000 mm. A laser gauge reading is logged every 15 minutes. From a stable period, σ = 0.004 mm (4 µm). The team uses k = 0.5 and h = 4, so K = 2 µm and H = 16 µm.
| Sample | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| x (mm) | 2.005 | 2.003 | 1.993 | 2.003 | 2.002 | 1.995 | 1.999 | 1.998 | 2.008 |
| C⁺ (µm) | 3 | 4 | 0 | 1 | 1 | 0 | 0 | 0 | 6 |
| C⁻ (µm) | 0 | 0 | 5 | 0 | 0 | 3 | 2 | 2 | 0 |
| Sample | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
|---|---|---|---|---|---|---|---|---|---|
| x (mm) | 1.996 | 2.001 | 1.998 | 2.004 | 2.008 | 2.002 | 2.003 | 2.008 | 2.008 |
| C⁺ (µm) | 0 | 0 | 0 | 2 | 8 | 8 | 9 | 15 | 21 |
| C⁻ (µm) | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
For sample 1, C⁺ = max(0, 2005 − 2002 + 0) = 3 µm. For sample 3, C⁺ = max(0, 1993 − 2002 + 4) = 0, while C⁻ = max(0, 1998 − 1993 + 0) = 5 µm.
C⁺ exceeds H = 16 µm at sample 18. C⁻ never goes above 5 µm. C⁺ was last zero at sample 12, so N⁺ = 6 and the estimated new mean is 2.000 + 0.002 + 0.021/6 = 2.0055 mm, a shift of about 1.4σ that began around sample 13. On an individuals chart with limits 1.988 to 2.012 mm, the same data show nothing:
The finishing die was inspected and showed the early wear that enlarges the bore. It was replaced at the next spool change, about two hours earlier than the scheduled change.
How to read the results
- C⁺ above H means the mean has moved up; C⁻ above H means it has moved down.
- The start of the climb (the last time the sum was zero) marks when the shift most likely began.
- The estimated new mean, μ₀ + K + C/N, tells you how much to adjust.
- Sums that rise and fall back to zero are normal; the allowance K absorbs ordinary noise.
Common mistakes
- Using σ from the overall standard deviation. As on any control chart, use the short-term σ, or the sums drain too fast and miss shifts.
- Choosing k for the wrong shift. k = 0.5 is tuned to 1σ shifts. For larger shifts, k = 1 reacts faster; for tiny shifts, a smaller k is better.
- Not resetting after a signal. After you act, restart both sums at zero. Some practitioners restart at H/2 (a "fast initial response") to catch a correction that did not work.
- Reading the plotted sums like an Xbar chart. A CUSUM's level is evidence accumulated over many points, not the current value of the process.
Frequently asked questions
What do k and h mean in a CUSUM?
k is the allowance, in standard deviations: deviations smaller than kσ do not add to the sums. h is the decision interval: the chart signals when a sum exceeds hσ. A common pair is k = 0.5 and h = 4 or 5.
Should I use h = 4 or h = 5?
h = 5 gives fewer false alarms (an in-control run length near 470 samples with k = 0.5) but reacts a little later. h = 4 reacts sooner with more false alarms (near 170). Choose based on the cost of each.
What is a V-mask?
An older graphical form of the CUSUM that plots the plain cumulative sum of deviations and lays a V-shaped mask over the last point. It is equivalent to the tabular CUSUM for suitable settings; the tabular form is easier to compute and to read.
Is a CUSUM better than an EWMA chart?
Neither is better in general. For a specific shift size, a CUSUM with matching k is near-optimal. An EWMA chart with small λ performs similarly and shows a smoothed process mean that many people find easier to explain.