What the bench measures
Error against the truth, and nothing else. Not how reasonable a prior sounds, not how elegant a model is, but the distance between the estimate a method produced and the rate that is actually there. Real analyses never get this number. Here every outlet's true rate is a line in the source file, and every bench reports how close each method came.
★ What you walk out with tonight. The measured cost of a prior, at the outlet where a sensible one was confidently wrong and at the flagship where a wrong one still moved the answer at n = 900. A pooling ladder with a number on every rung: 0.054, 0.031, 0.025. And a stopping rule whose wrong-stop rate is a count rather than a promise: two in two hundred.
LiveWhere a known answer comes from3 min▶
Twelve outlets, one voucher, one month. The generator draws each outlet's true redemption rate around 0.12 with genuine spread, then draws each customer's redemption from that rate. Footfall is deliberately unequal, from 18 vouchers at Northgate to 900 at Westfield, because that is what a real chain looks like and because the whole argument for pooling lives in the gap between those two numbers. The grand rate across all 2,443 vouchers is 0.141; the mean of the twelve true rates is 0.132.
Northgate is the recurring character. Its true rate is 0.192, the highest in the chain, and it redeemed one voucher in eighteen, an observed 0.056. Neither number is a mistake. One in eighteen is simply what a true 0.192 looks like at that volume about a fifth of the time, and the whole discipline exists for cases like it.
Halloway's regional manager had Northgate flagged for closure on the strength of the 0.056. The analyst's first instinct was to blend it with the chain-wide belief, which gave 0.110 and did not save it. The estimate that did save it, 0.124, came from letting the other eleven outlets say how much any one outlet's month should be trusted, which is what bench B does.
Self-studyWhat is real here, and what is not3 min▶
- The world. Twelve outlets from a fixed seed, identical for every learner, generated by the model written out in
bayes-live.jswhere every rate is visible. - Bench A. Exact conjugate Beta-Binomial posteriors. The interval is the 5.5 and 94.5 percent quantiles of 20,000 draws, an 89 percent equal-tailed interval, which is what ArviZ 1.x reports by default.
- Bench B. No pooling is each outlet's observed rate. Complete pooling is the grand rate for everybody. Partial pooling is an empirical-Bayes fit: the mu and kappa that maximise the marginal Beta-Binomial likelihood across the twelve outlets, searched on a grid, then each outlet shrunk toward mu with weight n over n plus kappa. It is a real fit, and it is the simpler of the two standard approaches; session 6 names the fully Bayesian version that puts a prior on kappa too.
- Bench C. One cumulative experiment: the first 50 customers per arm are the first 50 of the same 3,000. P(B > A) and both expected losses are Monte Carlo over 20,000 paired draws from the two posteriors.
- Nothing is stored. Every figure on the bench is computed when you click. A result that disagreed with the course notes would be the notes' problem.
Three questions, one world
10 min liveThe three benches answer the three questions the track has been circling. How much does a belief cost when it is wrong? How much do eleven other outlets know about the twelfth? And when is a difference big enough to act on? Each one has a number because the truth is known, and the numbers do not all flatter the method.
LiveThe rung that decides the argument for pooling4 min▶
Of the three ladder rungs, partial pooling wins on the Halloway data with a root-mean-square error of 0.025 against 0.031 for treating every outlet as identical and 0.054 for treating each as unrelated. The interesting number is not the winner, it is how the winner was chosen. Partial pooling learned from the twelve outlets that the right pooling strength was kappa = 116: each outlet's month counts for n over n plus 116, which is 0.13 at Northgate and 0.89 at Westfield. Nobody set that. The data did.
Change the world and the method changes its mind. In a world where the outlets are truly identical it learns a kappa at the top of the grid and pools completely, matching the grand-rate method to a few ten-thousandths. In a world where they are wildly different it learns kappa = 3.6 and barely pools, landing at 0.030 while complete pooling collapses to 0.145. That adaptiveness is the whole case for the method, and the bench lets you watch it happen rather than take it on faith.
Self-studyThe six outlets partial pooling made worse3 min▶
Pooling is not free and the bench says so. On the real data, shrinking toward 0.135 improved six outlets and worsened six. The improvements are large and land where the data are thin: Northgate's error falls from 0.136 to 0.068, Hillcrest's from 0.088 to 0.021, Old Quay's from 0.058 to 0.023. The deteriorations are small and land where the data are thick: Market Row from 0.000 to 0.007, Parkside from 0.002 to 0.008, Docklands from 0.007 to 0.009, with The Arcade and Westfield unchanged to three decimals.
That asymmetry is the honest summary of shrinkage. It buys tenths on the outlets that need it and costs thousandths on the ones that do not, and the net is a lower error across the chain. It is also why the method is easy to sell badly: a manager at a large outlet will notice their number moved and will not notice it moved by less than the noise. Northgate, for its part, is still under-estimated at 0.124 against a truth of 0.192. The method halved the error. It did not remove it.
Run the three benches
26 min build-alongWork through the tabs in order. On bench A, try the informed prior at Northgate and then the same prior at Westfield, and watch what volume does and does not fix. On bench B, run all three worlds and read kappa each time. On bench C, look at the experiment at 50 and then at 100, and notice that the probability was already high before the rule was willing to stop.
Try the wrong prior at Westfield before you believe anything about volume. Nine hundred customers, a prior worth a hundred, and the estimate is still 0.026 away from what the data said. The prior's weight fell to a tenth. Its distance from the truth did not fall at all.
Turn three benches into one defensible number
6 min liveThe bench produces estimates. A defensible number is an estimate plus the prior it rests on, the interval kind and level, and the decision rule it feeds, all written down where a reader can argue with them. The estimate is the part people fight about; the other three are the parts that decide whether the fight is fair.
State the prior as a pseudo-count and a source. "Partial pooling across the twelve outlets, learned kappa 116, which weights Northgate's month at 0.13." A prior nobody can express this way was defaulted, not chosen.
Give the interval with its kind and level. "89 percent equal-tailed." Not "the interval". The level is a tooling default that changed this year and the kind changed with it; a reader who assumes 95 percent HDI will misread every number you give them.
Report the decision rule, not just the probability. "P(B > A) = 0.975; expected loss of choosing B is 0.0005 against a threshold of 0.001, so the rule stops." At n = 50 the probability was 0.915 and the rule said keep going, because the loss was 0.0029. The probability alone would have stopped too early.
State the measured error rate of the rule. "Across 200 replays at this sample size, the rule stopped 23 times and 2 of those were on the wrong arm." That is a count, not a promise, and it is the sentence that stops "Bayesian tests have no peeking problem" from being said in your name.
Name what the method did not fix. Northgate is still at 0.124 against a truth of 0.192. A report that says the estimate improved is true; a report that says the outlet is now well understood is not.
Three questions
On the real Halloway data partial pooling scores 0.025 against 0.031 for complete pooling and 0.054 for none. A colleague concludes partial pooling should always be used. What does the bench actually show?
The method's value is that the pooling strength is estimated rather than asserted. Complete pooling collapses to 0.145 in the wildly-different world; partial pooling reads the spread off the data and lands at 0.030. The lesson is adaptiveness, not a permanent winner.
At n = 50 per arm, P(B > A) is 0.915. Why does the rule say keep going?
The rule is on expected loss, not on the probability. At n = 100 the probability is 0.975 and the loss is 0.0005, so it stops. There is no significance cut-off and no minimum sample in the rule; the stake does the work.
Across 200 replays of the Westfield experiment, the rule stopped at n = 100 in 23 of them and on the wrong arm in 2. What is the right way to report that?
The expected-loss rule controls the cost of a wrong decision, not the frequency of one. The frequency is what the 200 replays measure, and reporting it is what makes the rule defensible rather than merely convenient. The peeking argument itself belongs to the experimentation course.
After the track
45 minTake a rate your team estimates for several small units, regions, stores, cohorts, segments, and build the pooling ladder on it. Observed rate per unit, grand rate for all, and the empirical-Bayes shrinkage from session 6. You will not have the truth to score against, so report the one thing you can: how far each unit's estimate moved, and whether the units that moved most are the ones with the least data. If they are, the method is doing what it should. If a large unit moved a long way, something else is going on and that is worth a look.