Method · Statistics Library

CUSUM chart (tabular cumulative sum)

A tabular CUSUM chart accumulates deviations from a target value separately in the upward and downward direction, signaling as soon as either accumulated sum crosses a decision threshold: the fastest classic detector of a small, sustained shift in the process mean.

Topic indexA reference reading outside the guided chapter sequence

Understand the idea

An ordinary control chart (like an individuals chart) is quick to notice a big, sudden jump but slow to notice a SMALL, sustained drift, because each point is judged mostly on its own. A CUSUM chart is built specifically to catch small persistent shifts fast: instead of looking at one point at a time, it keeps a running total of how far every point has drifted above (or below) the target, so a series of slightly-too-high readings adds up quickly even though no single one looks alarming on its own.

There are two running totals (one accumulating upward drift, one accumulating downward drift), and each resets to zero whenever the process swings back the other way. A signal fires the moment either accumulated total crosses a decision threshold. Because the chart also knows roughly how many periods each total has been building up, it can estimate not just THAT a shift happened, but approximately WHEN it began and what the new process level probably is.

This is a genuinely different way of reading a chart: the ordinary run-pattern rules (like 'two out of three points near the edge') do not apply here, because the whole point of a CUSUM is that consecutive points are deliberately correlated by the running total; the only rule that matters is whether the accumulated sum has crossed the line.

CUSUM stands for cumulative sum control chart: it adds up small deviations from target so that a small, persistent shift shows up quickly. The tabular CUSUM keeps two running totals, one for upward drift and one for downward drift, and signals when either crosses its decision limit.

Practitioner explanation

KernelStats implements the tabular CUSUM (Montgomery's recommended form over the older graphical V-mask, which it is mathematically equivalent to): C+_i = max(0, x_i - (mu0+K) + C+_{i-1}), C-_i = max(0, (mu0-K) - x_i + C-_{i-1}), signaling when either sum exceeds H = h*sigma. The default k = 0.5 and h = 5 (ARL0 ~ 465) are Montgomery's classic recommendation, tuned to detect roughly a 1-sigma sustained shift as fast as possible; both are exposed as options for a different target shift size. When mu0/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 used across KernelStats's variables control charts, and the card records which source (user-supplied or estimated) was used for each.

At a signal, the card estimates the new mean and the shift's onset using Montgomery's counter-based formula: whichever sum (C+ or C-) crossed H FIRST determines the reported direction, and the number of consecutive non-zero periods for that same sum is used to estimate both how many periods back the shift began and the new process mean. A later crossing of the OTHER sum is treated as a separate, independent excursion with its own onset; it does not retroactively relabel the first signal's direction.

Only the beyond-H rule applies to this chart; KernelStats does not apply Shewhart run rules (Western Electric zone rules) here, because the cumulative sums are correlated by construction and those rules assume independent points. The optional FIR (fast initial response) head-start sets C+/C- to H/2 at the very first observation, trading a slightly higher false-alarm rate at start-up for faster detection of a process that may already be off-target when monitoring begins.

When to use it

Consider it when

Individual continuous measurements in time order are monitored against a known or estimated target, and the priority is detecting a small, SUSTAINED shift in the mean as fast as possible, faster than an individuals (I-MR) chart would.

Use caution when

Detecting large, sudden shifts (an ordinary individuals chart with Western Electric run rules is adequate and simpler to read), monitoring VARIANCE rather than the mean (this chart tracks a mean shift only), or reading the chart with the same run-pattern rules used on Shewhart charts: those rules do not apply here because CUSUM points are deliberately correlated.

Formulas and symbols

Tabular CUSUM accumulators

Ci+=max⁡[0,  xi−(μ0+K)+Ci−1+],Ci−=max⁡[0,  (μ0−K)−xi+Ci−1−]C_i^+ = \max\left[0,\; x_i - (\mu_0 + K) + C_{i-1}^+\right], \qquad C_i^- = \max\left[0,\; (\mu_0 - K) - x_i + C_{i-1}^-\right]

mu0 the target, K = k*sigma the reference value (half the shift size to detect fastest), starting from C0 = 0 (or H/2 with FIR).

Decision interval (signal threshold)

H=hσH = h\sigma

The chart signals when C+ or C- exceeds H. Montgomery's classic recommendation is k=0.5, h=4 or 5.

Estimated new mean at signal

μ^=μ0+K+Ci+/N+(upward),μ^=μ0−K−Ci−/N−(downward)\hat\mu = \mu_0 + K + C_i^+ / N^+ \quad (\text{upward}), \qquad \hat\mu = \mu_0 - K - C_i^- / N^- \quad (\text{downward})

N+/N- the number of consecutive periods the signaling sum has been non-zero, used to back-estimate both the new level and how many periods earlier the shift began.

Assumptions and checks

  • Independence of observations. Autocorrelated data break the CUSUM's calibration: positive autocorrelation makes the moving-range estimate of sigma too small and lets the sums drift on their own, so the decision interval is too tight and false alarms multiply, while negative autocorrelation inflates the moving-range estimate and slows 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). CUSUM's average-run-length properties are derived assuming normal, independent observations; non-normal data change the true in-control and out-of-control run lengths from their nominal design values.

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

  • CUSUM is tuned by its reference value k (conventionally half the shift size worth detecting) and decision interval h; a mismatch between the tuned shift size and the shift that actually occurs makes the chart slower to detect than its nominal average run length promises.

    In KernelStats: Not checked by KernelStats: k and h are user-supplied options; no data-driven tuning or average-run-length calculation for the chosen values is computed.

Alternatives

  • I-MR Chart (Individuals & Moving Range). You want to detect large, sudden shifts as well as monitor process variation via the moving range, or you want to apply Shewhart run-pattern rules, which do not apply to CUSUM.
  • EWMA Chart (Exponentially Weighted Moving Average). You want a time-weighted chart with a directly tunable memory (the smoothing constant lambda) and a chart whose control limits can be plotted as ordinary bands rather than a cumulative-sum threshold.

Worked example

Scenario

A dimensional measurement monitored against a target of 10.0 (sigma = 1.0, estimated from historical data), with k=0.5 and h=5 (Montgomery's classic tuning), watched for a sustained 1-sigma upward shift.

Result

C+ crosses H = 5.0 at observation 29, with the counter-based estimate placing the shift's onset near observation 23 and the new mean at approximately 11.25.

Interpretation

The process shifted upward by roughly one standard deviation partway through the run, and the CUSUM detected it markedly faster than an ordinary individuals chart would have, consistent with CUSUM's design purpose of fast detection of small sustained shifts.

Common misconceptions

Misconception

A CUSUM chart can be read with the same run rules (like two-of-three points near a limit) used on an ordinary control chart.

Correction

The Shewhart run rules assume the plotted points are independent from period to period. A CUSUM's whole mechanism is a running total, so consecutive points are correlated by construction; those rules are meaningless here. The only signal rule that applies is whether the accumulated sum has crossed the decision interval H.

Misconception

If the upward CUSUM sum crosses H and later, much further along, the downward sum also crosses H, that means the original signal was actually a downward shift all along.

Correction

Direction is determined AT EACH SIGNAL by whichever sum crossed H first at that point in time. A later crossing of the other sum is a separate, independent excursion with its own onset and its own new-mean estimate; it does not retroactively relabel or cancel the earlier signal.

References

  1. NIST/SEMATECH e-Handbook of Statistical Methods, §6.3.2.3 Cumulative sum control chart, NIST/SEMATECH (2012), §6.3.2.3.
  2. Introduction to Statistical Quality Control, Montgomery, D. C. (2019), Chapter 9.