CUSUM
On this page
A bank balance that loses a little every day shows nothing alarming on any single day, yet after a month the fall is plain. The CUSUM (cumulative sum) does this with readings: it adds up how far each reading sits above normal, so a small lasting shift shows within days, even when no single reading looks wrong.
See it
The night flow of a borehole is normally about 600 L/h and varies by about 20 L/h from night to night. A control chart has its limit at about 662 L/h. A leak of 25 L/h starts on day 21. When does the control chart signal?
The reference mean and standard deviation come from days 1 to 20, before the leak. The CUSUM uses k = half a standard deviation and signals when it passes h = five standard deviations.
The idea
Take a reference mean μ0 and standard deviation σ from a period you believe was normal. For each new reading, take how far it is above μ0, subtract a small allowance k, and add the result to a running total that never goes below zero:
xt today's reading, Ct−1 yesterday's total, k usually 0.5 σ. A signal is given when Ct passes h, usually 5 σ
On normal days the allowance pulls the total back to zero. After a lasting shift, each day adds a little and the total climbs. A control chart judges each reading alone, so it needs a large shift; the CUSUM remembers, so it finds a small one.
It also dates the change: the shift began the day after the total was last zero. The size is about k + C ÷ N, where N is the number of days the total has been above zero.
One worked number
A night flow has μ0 = 600 L/h and σ = 20 L/h, so k = 10 and h = 100. Five nights read 630, 625, 640, 630 and 635 L/h. Does the CUSUM signal, and how large is the shift?
Show the worked solution, 3 steps
- Take each reading less μ0 and k
630 − 610 = 20, then 15, 30, 20, 25.
- Add them up
C = 20, 35, 65, 85, 110. It passes h = 100 on the fifth night. It was zero before the first, so the shift began on night 1. No reading passed the control limit of 600 + 3 × 20 = 660 L/h.
- Estimate the size
10 + 110 ÷ 5 = 32 L/h. In the figure, a leak of 25 L/h gives a similar result: signal on day 25, start day 21.
The mistake to avoid
A second trap: a reference period that includes the change. The shift raises the reference and hides. Press the button in the figure: with the reference from all 40 days, the CUSUM never signals.
Check yourself
A process has μ0 = 50 and σ = 2, so k = 1 and h = 10. The readings are 51, 49, 52, 53, 54, 53, 55. At which reading does the CUSUM signal?
To save time, an analyst takes μ0 and σ from the whole year of night flow, including the months since a suspected leak. What happens?
A night flow CUSUM signals on day 40. Its total was last zero on day 34. On which day did the leak most likely begin?
Where you meet it
- A borehole and its pipesThe night flow rises when a pipe leaks, and the CUSUM dates the first night of the loss.
- A building's energyA CUSUM of the gap between the meter and its baseline shows the day a saving began, or the day it was lost.
- A pump that wears slowlyThe CUSUM shows that the mean has moved, but a slow drift has no single start day, so the date means little.
- The CUSUM adds up small deviations from a fixed reference, so a small lasting shift shows.
- Ct = max(0, Ct−1 + xt − μ0 − k), with k = 0.5 σ and a signal at h = 5 σ.
- The shift began the day after the total was last zero.
- The reference must come from a period before the change.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.