故事 · Shewhart 的盲区与两位补位者 Origin Story · Shewhart's Blind Spot and Two Reinforcements
Shewhart 控制图有个与生俱来的特点:它只看当前这一点,把历史全部忘掉。这让它对突发大跳极其灵敏, 却对持续的小漂移束手无策 —— 过程慢慢偏 0.5σ,每个点都还在 ±3σ 内,图上风平浪静,问题却在悄悄累积。 1954 年 E. S. Page 提出 CUSUM:与其孤立看每个点,不如把每次偏离累加起来,持续同向的小偏移会被一路抬升,越过阈值 H 就报警。 1959 年 S. W. Roberts 提出 EWMA:用指数衰减的权重把历史数据加权平均,近的权重大、远的权重小, 噪声被磨平、趋势被托出。两者殊途同归 —— 都靠"记住过去",补上了 Shewhart 的健忘。 A Shewhart chart has one built-in habit: it looks only at the current point and forgets everything else. That makes it lightning-fast on sudden jumps but helpless against a steady small drift — when the mean slips 0.5σ and every individual point still falls inside ±3σ, the chart looks calm while the problem quietly builds up. In 1954 E. S. Page introduced CUSUM: instead of judging each point alone, keep accumulating the offsets, and a sustained one-sided drift will climb past the decision threshold H. In 1959 S. W. Roberts introduced EWMA: apply an exponentially decaying weight to history — recent points heavy, old points light — so noise gets ironed out and the underlying trend rises to the surface. Different math, same idea: remember the past and fix Shewhart's amnesia.

1 原始单值(Shewhart)vs EWMA 平滑趋势 Raw Individuals (Shewhart) vs EWMA Smoothed Trend

对比中comparing

灰点是原始单值(Shewhart 用),噪声大、漂移看不清;绿线是 EWMA,把噪声磨平后趋势一目了然,更早碰到控制限。 Grey dots are the raw individuals Shewhart watches — noisy, drift hidden. The green line is the EWMA: noise smoothed away, the trend pops out, and it crosses the limit earlier.

2 CUSUM:把小偏离一路累加成醒目爬坡 CUSUM: Stack Small Offsets into a Visible Climb

St = max(0, St−1 + (xt−μ₀) − k)。漂移前累积和被参考值 k 压在 0 附近;漂移一来,正偏离持续累加,爬坡越过决策区间 H 即报警 —— 越缓的漂移它越显威力。 St = max(0, St−1 + (xt−μ₀) − k). Before the drift, the reference value k pins the sum near zero. Once drift starts, positive offsets keep stacking, the climb crosses the decision interval H and the alarm fires — the slower the drift, the more CUSUM shines.

3 现实里的 EWMA / CUSUM EWMA / CUSUM in the Real World

小漂移检测:刀具缓慢磨损、试剂逐渐失活、传感器慢漂,Shewhart 反应迟钝,EWMA/CUSUM 提前预警。 Small-drift detection: tool wear, reagent degradation, sensor drift. Shewhart is sluggish; EWMA and CUSUM raise the alarm early.
EWMA 平滑:把含噪信号磨成趋势线,也广泛用于过程预测、自动控制、股价均线。 EWMA smoothing: turns noisy signals into a clean trend — also used in process forecasting, control loops, and stock-price moving averages.
CUSUM 累积:累加偏离放大持续偏移,医院死亡率监测、网络异常检测都靠它早发现。 CUSUM accumulation: stacking offsets amplifies sustained shifts — used in hospital mortality monitoring and network anomaly detection to catch issues early.
趋势预警:连续工艺、化工反应、能耗监控里抓"慢慢变坏"的趋势,是这两图的主场。 Trend alerts: in continuous processes, chemical reactions, and energy monitoring, these two charts own the "slowly going bad" beat.
一句话In One Line
Shewhart 图没有记忆 —— 每个点都从头判断,于是大跳一眼可见,小漂移却被噪声淹没。 EWMA 和 CUSUM 的共同杀招就是让历史说话。EWMA 用 zt = λxt + (1−λ)zt−1 把过去按指数衰减加权,λ 越小记忆越长、曲线越平滑、对小漂移越灵敏(但对大跳更慢)。CUSUM 则把每次偏离减去参考值 k 后累加, 只要持续同向偏移,累积和就单调爬升越过 H。代价是:它们换来了对小漂移的灵敏,也牺牲了一点对突发大跳的速度 —— 所以实战里常和 Shewhart 图并排使用,各管一段。 A Shewhart chart has no memory — every point is judged from scratch, so big jumps stand out but small drift drowns in noise. The shared trick behind EWMA and CUSUM is to let history speak. EWMA blends the past with an exponentially decaying weight, zt = λxt + (1−λ)zt−1 — smaller λ means longer memory, smoother curve, sharper sensitivity to small drift (and slower response to big jumps). CUSUM subtracts a reference value k from each offset and keeps adding; any one-sided drift drives the sum up past H. The trade-off: better sensitivity to small drift, slightly slower on sudden jumps — that's why in practice they run side by side with a Shewhart chart, each covering its own beat.
常见误用Common Mistakes
拿 EWMA/CUSUM 当唯一控制图它们对大跳反而比 Shewhart 慢,实战通常和 Shewhart 图并排用,分别盯小漂移和突发异常。 Using EWMA/CUSUM as your only control chart. They are actually slower than Shewhart on big jumps — pair them with a Shewhart chart so each watches the failure mode it does best.
λ、k、H 随便拍脑袋设这些参数直接决定灵敏度与误报率,应按要检测的漂移幅度(如 1σ)和目标 ARL 设计。 Picking λ, k, H by gut feel. These parameters drive sensitivity and false-alarm rate directly — design them around the drift size you need to catch (e.g. 1σ) and the target Average Run Length.
报警后只看 EWMA 值忘了回看原始数据EWMA/CUSUM 是放大镜不是显微镜,报警后仍要回到原始单值定位根因。 Reading only the EWMA value after an alarm. EWMA and CUSUM are magnifying glasses, not microscopes — once they fire, go back to the raw individuals to track down the root cause.

EWMA / CUSUM