What does CUSUM Alarms conclude, in numbers, about “The Markov Chain of Brook and Evans: the Average Run Length as a System of Linear Equations”?
Answer: Chapter 3 solves the Markov chain of Brook and Evans by hand-written Gaussian elimination and shows that a CUSUM with one false alarm a year on average still raises at least one within a year with probability 0.628.
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.628
| in control (ARL0 | 370): |
| P(false alarm by day | 30) = 0.068 |
| P(false alarm by day | 90) = 0.209 |
| P(false alarm by day 180) | 0.382 |
| P(false alarm by day 365) | 0.628 |
| median run length | 258 days |
| 10th percentile | 43 days |
| geometric P(by day 365) | 0.628 |
| after a 0.5-sigma shift (ARL1 | 27.7): |
| P(alarm by day | 7) = 0.110 |
| P(alarm by day 14) | 0.334 |
| P(alarm by day 30) | 0.673 |
| P(alarm by day 60) | 0.914 |
| 90th percentile | 57 days |
Show the full program
# Chapter 3. p33: the whole run-length distribution, not just its mean.
# Model: with R the substochastic transition matrix of p31 (k = 0.5,
# h = 4.096, m = 80), the survival P(RL > t) from S = 0 is the first
# entry of R^t 1, iterated one day at a time (each matrix row is added
# with math.fsum). In control the run length is close to geometric, so
# an ARL0 of 370 still puts many false alarms in the first months.
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 matrix(k, h, delta, m=80):
w = 2.0 * h / (2 * m - 1)
rows = []
for i in range(m):
c = i * w - k + delta
row = [cdf(w / 2.0 - c)]
for j in range(1, m):
row.append(cdf(j * w + w / 2.0 - c) - cdf(j * w - w / 2.0 - c))
rows.append(row)
return rows
def survival(k, h, delta, days):
r = matrix(k, h, delta)
v = [1.0] * len(r)
out = [1.0]
for _ in range(days):
v = [math.fsum(a * b for a, b in zip(row, v)) for row in r]
out.append(v[0])
return out
def first_day(surv, q):
for t, s in enumerate(surv):
if 1.0 - s >= q:
return t
return None
if __name__ == "__main__":
k, h = 0.5, 4.096
s0 = survival(k, h, 0.0, 1100)
print("in control (ARL0 = 370):")
for t in (30, 90, 180, 365):
print(" P(false alarm by day {:3d}) = {:.3f}".format(t, 1.0 - s0[t]))
print(" median run length = {} days".format(first_day(s0, 0.5)))
print(" 10th percentile = {} days".format(first_day(s0, 0.1)))
print(" geometric P(by day 365) = {:.3f}".format(
1.0 - (1.0 - 1.0 / 370.0) ** 365))
s1 = survival(k, h, 0.5, 200)
print("after a 0.5-sigma shift (ARL1 = 27.7):")
for t in (7, 14, 30, 60):
print(" P(alarm by day {:2d}) = {:.3f}".format(t, 1.0 - s1[t]))
print(" 90th percentile = {} days".format(first_day(s1, 0.9)))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 3: The Markov Chain of Brook and Evans: the Average Run Length as a System of Linear Equations. 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 4 · Siegmund's Approximation and Lorden's Bound: Detection Delay Grows Only with the Logarithm of the False-Alarm Interval
- Chapter 5 · Design Tables for the Reference Value and the Limit: the Cost of a Wrong Shift and a Wrong Baseline
- 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