Definition · Threshold alert, and its false-alarm rateA threshold alert fires when a statistic measured over a window crosses a fixed value. For an error ratio with threshold τ over n requests, it fires at the smallest integer error count strictly above τ·n. Its false-alarm probability is the chance of reaching that count when the true rate is the healthy one, and it is the upper tail of a binomial distribution.
true rate p = 1/100, window n = 200 requests, threshold τ = 2%
τ·n = 0.02 × 200 = 4, so the alert fires at k = 5 or more
X ~ Binomial(200, 1/100) E[X] = 2 errors a window
P(X ≥ 5) = Σ_{j=5}^{200} C(200, j) (1/100)ʲ (99/100)²⁰⁰⁻ʲ
= 0.051746263…
= 5.1746…% ≈ 5.175%
Nothing has changed about the service. The true rate is 1%, the threshold is twice that, and one window in twenty crosses it anyway because five errors out of two hundred is an ordinary thing for a process with a mean of two to produce. This is not a tuning problem with a better threshold hiding behind it; it is what a threshold on a small sample does.
From a per-window probability to a pager
window length 5 minutes
windows in a week 7 × 24 × 60 ÷ 5 = 2 016
expected false pages 0.051746… × 2 016 = 104.32 a week
≈ 14.9 a day
windows in an hour 60 ÷ 5 = 12
P(at least one page in the next hour)
= 1 − (1 − 0.051746…)¹² = 47.14%
The second block is 1 − (1 − p)ᵏ for the third time on this course — the capture probability of a sampling rate, the chance a load test meets its tail, and now the chance of at least one false page in the next hour. Three lessons, one function, and the lab calls the same one in all three places so the claim can be checked rather than taken on trust.
A 47% chance of being paged in any given hour by a service in which nothing is wrong is the number that matters operationally. It is not merely wasteful: after a week of it the page has no information content left, and the response to the hundred and fifth one is indistinguishable from the response to a real outage, because there is nothing to distinguish it by.
The two levers, and what each costs
Example · The same alert, three configurations200 requests, 2%. Fires at 5 errors, 5.175% of windows, 104.32 pages a week. This is the configuration almost everyone starts with.
600 requests, 2%. A fifteen-minute window instead of five, so the threshold now means 13 errors. 0.849% of windows and 672 windows a week: 5.71 pages. The threshold did not move; the sample got bigger and its ratio got less variable.
200 requests, 4%. Fires at 9 errors, 0.021% of windows, 0.43 pages a week. Quieter still — and it no longer fires on a true rate of 2%, which is double the healthy rate and is exactly the kind of change the alert existed to catch.
The two levers are not equivalent. Widening the window buys quiet with detection latency: the same regression is caught, ten minutes later. Raising the threshold buys quiet with detection sensitivity: some regressions are now never caught at all, at any latency. Latency is usually the cheaper currency, which is why the first move on a noisy alert should be the window.
There is a floor. A low-traffic service has few requests per window however long the window is, and at twenty requests a window no threshold on a ratio is stable: one error is 5% and two is 10%. For those services the honest answer is to alert on something else — an absolute count of errors, a budget consumed over a long window, or a synthetic probe — rather than to choose a threshold and live with the noise.
What this calculation is and is not
It is a false-alarm rate for a stated rule on a stated healthy rate. It is not a detector design: it says nothing about how quickly a real change is caught, and it does not compare this rule against any other. Those questions need the distribution under the alternative as well, which is the beginning of hypothesis testing and is outside this course.
What it does give you is the arithmetic to reject a rule before shipping it. If a proposed alert would fire a hundred times a week on a healthy service, that fact is available from four numbers — the true rate, the requests per window, the threshold and the window length — and it is available before anybody is woken up. The previous page’s burn-rate rule is the better-behaved alternative for exactly this reason: it thresholds a quantity that accumulates rather than a ratio that fluctuates.