The parent note (Responsible AI deployment practices) throws a lot of symbols at you very fast: p, α, n, (1−p)n, ln, DKL, H, log, pi. If any of those look like magic squiggles, this page is your ground floor. We build each one from nothing, anchor it to a picture, and only then let the parent use it.
We go in order — each idea leans on the one before it.
Before any symbol, the object everything else talks about.
The picture: a box with an arrow going in (the input) and an arrow coming out (the prediction). Everything in this chapter is either (a) checking that arrow-out is safe, or (b) noticing when it stops being safe.
The picture: imagine a bag of 1000 marbles where exactly 1 is red. Reach in blindly — the chance of red is p=1/1000=0.001. That is exactly the "0.1% failure rate" the parent talks about.
Turning a percent into a p: divide by 100. So 5%=0.05, 0.1%=0.001, 100%=1.
Now the key move: the parent asks "if a failure happens with probability p, how many tries n before we've probably seen at least one?"
The picture: the marble bag again. Red = failure with p=0.001. Not-red = 1−p=0.999. A slice of a pie: a thin red sliver (p) and a huge grey rest (1−p).
Why multiply? Look at the figure. Each try is a coin that lands "safe" with probability 1−p. Two safe tries in a row: (1−p)×(1−p). Three: (1−p)3. The little superscript n is just shorthand for "multiply it by itself n times." As n grows, this product shrinks toward 0 — meaning eventually you're almost sure to have caught the failure at least once. That shrinking curve is the whole reason staged rollouts work.
We have (1−p)n≤α and we want to solve for n. But n is stuck up in the exponent. The tool that pulls an exponent down to earth is the logarithm.
The picture: think of ln as a ruler that measures "number of doublings/multiplications." Feeding a big number in gives a modest number out; that output is the hidden exponent.
The picture: a 20-slot spinner with 1 red slot. Landing red (α=1/20=0.05) = we got unlucky and missed the bug. 19 grey slots = we caught it. Smaller α = fewer red slots = need more samples n.
Now the parent's formula reads in plain English:
how many samplesn≥ln(1−failure ratep)ln(risk of missingα)
"To be 1−α confident of catching a failure that happens with probability p, watch at least this many samples." (See 5.2.4-A-B-testing for the same sample-size logic applied to experiments.)
Runtime monitoring compares training data to live data. To do that we need a single object describing "what inputs look like."
The picture: a histogram — a row of bars, one per outcome, heights summing to 1. Ptrain is the histogram the model learned on; Pprod is the histogram of what's actually arriving in production. If those two shapes drift apart, the model is seeing a world it wasn't taught.
The picture: point at bar 1, compute something, write it down; point at bar 2, compute, write down; … then total everything. ∑ is a "for each bar, and add" instruction — nothing scarier.
Example: ∑iP(xi)=1 simply says "add up all bar heights and you get 1," which is the defining rule of a distribution.
Same log machinery, one prediction at a time (again, log=ln).
H=−∑i=1Cpilogpi
The picture (see figure): two bar charts. A confident prediction is one tall spike — low entropy. An unsure prediction is flat bars of equal height — high entropy. Watch the average H across many predictions climb, and you're watching the model lose its footing (the parent's "entropy 0.3 → 0.55" alarm).
The figure below is the same map drawn on the board — read it if the code block won't render for you.
Every arrow is a "you need this before that." The two rivers — the sample-size river (left) and the monitoring river (right) — join at responsible deployment. Related downstream topics: 6.4.1-Adversarial-examples (attacks that spike entropy), 6.4.8-Fairness-metrics (per-group monitoring), 6.4.12-Explainability-methods, and 6.4.14-AI-governanceframeworks.