What does CUSUM Alarms conclude, in numbers, about “Design Tables for the Reference Value and the Limit: the Cost of a Wrong Shift and a Wrong Baseline”?
Answer: Now the mean. With a baseline of 14 days, the standard error of the mean is 0.267 standard deviations. If the mean happens to be estimated one standard error too low, the false-alarm interval shrinks to 74.9 days, about one every two and a half months; if one standard error too high, it becomes 2646.6 days, and small drifts take a very long time to be found. With a baseline of 30 days the two directions give 118.2 and 1377.3 days; with 90 days, 186.7 and 776.5 days; and even a full year of 365 days leaves a swing from 261.4 to 531.1 days.
Scope of the numbers: Parameters are illustrative; all calculations are generated by the book's programs; the book is general business analysis, not individualised business advice, and Chapter 8 is an offline model that reads no server. Marked boxes separate published evidence, runnable Python calculations (23 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.267, 118.2, 1377.3, 14, 186.7, 261.4
| sigma ratio r ARL0 | |
| 0.90 | 180.1 |
| 0.95 | 255.6 |
| 1.00 | 369.9 |
| 1.05 | 546.6 |
| 1.10 | 825.1 |
| baseline days | 1 s.e. ARL0(mean low) ARL0(mean high) |
| 14 | 0.267 74.9 2646.6 |
| 30 | 0.183 118.2 1377.3 |
| 90 | 0.105 186.7 776.5 |
| 365 | 0.052 261.4 531.1 |
Show the full program
# Chapter 5. p53: what an estimated baseline does to the false-alarm rate.
# Model: readings are standardised with a baseline mean and sigma taken
# from n past days. If the estimated mean is too low by e (in sigma) or
# the estimated sigma is a fraction r of the true one, the standardised
# readings are N(e / r, 1 / r^2) instead of N(0, 1). The chain of p12 is
# rebuilt with that mean and spread (k = 0.5, h = 4.096, m = 60). The
# standard error of a baseline mean is 1 / sqrt(n) (illustrative).
import math
def cdf(x):
return 0.5 * math.erfc(-x / math.sqrt(2.0))
def upper(x):
return 0.5 * math.erfc(x / math.sqrt(2.0))
def solve(a, b):
# Gaussian elimination with partial pivoting; back substitution
# adds its terms with math.fsum
n = len(b)
m = [list(row) + [b[i]] for i, row in enumerate(a)]
for p in range(n):
q = max(range(p, n), key=lambda r: abs(m[r][p]))
m[p], m[q] = m[q], m[p]
piv = m[p]
for r in range(p + 1, n):
f = m[r][p] / piv[p]
if f != 0.0:
m[r] = m[r][:p] + [x - f * y for x, y in
zip(m[r][p:], piv[p:])]
x = [0.0] * n
for i in range(n - 1, -1, -1):
s = math.fsum(m[i][j] * x[j] for j in range(i + 1, n))
x[i] = (m[i][n] - s) / m[i][i]
return x
def arl(k, h, mu, sd, m=60):
w = 2.0 * h / (2 * m - 1)
a = []
for i in range(m):
c = i * w - k + mu
row = [-cdf((w / 2.0 - c) / sd)]
for j in range(1, m):
row.append(cdf((j * w - w / 2.0 - c) / sd)
- cdf((j * w + w / 2.0 - c) / sd))
row[i] = row[i] + 1.0
a.append(row)
return solve(a, [1.0] * m)[0]
if __name__ == "__main__":
k, h = 0.5, 4.096
print("sigma ratio r ARL0")
for r in (0.9, 0.95, 1.0, 1.05, 1.1):
print(" {:5.2f} {:7.1f}".format(r, arl(k, h, 0.0, 1.0 / r)))
print("baseline days 1 s.e. ARL0(mean low) ARL0(mean high)")
for n in (14, 30, 90, 365):
e = 1.0 / math.sqrt(n)
print(" {:4d} {:.3f} {:9.1f} {:9.1f}".format(
n, e, arl(k, h, e, 1.0), arl(k, h, -e, 1.0)))Single source and citation
Fan, Y. (2026). CUSUM Control Charts and Average Run Length: the Fastest Alarm within a False-Alarm Budget for Latency Drift and Silent Conversion Drops (Version 1.0.0), Chapter 5: Design Tables for the Reference Value and the Limit: the Cost of a Wrong Shift and a Wrong Baseline. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-305 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026305,
author = {Fan, Yafu},
title = {CUSUM Control Charts and Average Run Length: the Fastest Alarm within a False-Alarm Budget for Latency Drift and Silent Conversion Drops},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Sluggish Red Line: at Equal False-Alarm Rates the CUSUM Is Several Times Faster
- Chapter 2 · One Line of Recursion: the CUSUM Is a Running Log-Likelihood Ratio
- Chapter 3 · The Markov Chain of Brook and Evans: the Average Run Length as a System of Linear Equations
- Chapter 4 · Siegmund's Approximation and Lorden's Bound: Detection Delay Grows Only with the Logarithm of the False-Alarm Interval
- Chapter 6 · The Boundaries of Optimality: Autocorrelation, Residual Charts and Large Jumps
- Chapter 7 · Eastern and Western Sources: the Dike of a Thousand Zhang and Shewhart's Three Sigma
- Chapter 8 · A Daily CUSUM at the Toll Gate: P99 Latency, Silent Conversion Drops and a Falsification Protocol