Course contentsShow
← Data Science
Lesson 1415 of 2,14535. Statistical Anomaly DetectionFree lesson

CUSUM: Cumulative Sum Control Chart

Using cumulative sums of deviations to detect persistent shifts in the mean of a process or time series.

CUSUM: Cumulative Sum Control Chart

What you'll learn: How CUSUM charts detect subtle, persistent shifts in process means by tracking cumulative deviations over time.

The Core Idea

Imagine you're monitoring a factory line where each product should weigh 100g. Traditional control charts (like Shewhart charts) look at each measurement independently. But what if the machine starts drifting upward by just 0.5g per item—too small to trigger alarms individually, but significant over time?

CUSUM (Cumulative Sum) solves this by adding up the deviations from your target. Instead of asking "Is this single point abnormal?" it asks "Is there a persistent trend away from normal?" Think of it like tracking your bank balance: one 5chargemeanslittle,buttwentyconsecutive5 charge means little, but twenty consecutive 5 charges reveal a pattern.

How It Works

You calculate a running sum of differences between observed values and the target mean. If the process stays on-target, positive and negative deviations cancel out, keeping the cumulative sum near zero. But if the process shifts (even slightly), the cumulative sum trends steadily upward or downward—making the shift visible.

The chart plots this cumulative sum over time. You set decision thresholds (called h-values); when the cumulative sum crosses these boundaries, you flag an anomaly indicating the process mean has shifted.

When to Use CUSUM

Use CUSUM when you need to detect small, sustained shifts quickly. It's more sensitive to gradual changes than Shewhart charts, making it ideal for high-precision manufacturing, monitoring vital signs, or tracking algorithm performance metrics where small drifts matter.

Key Takeaway: CUSUM detects persistent mean shifts by accumulating deviations over time, making subtle trends visible that individual observations might miss.