Free Ebook cover Practical Bayesian Statistics for Real-World Decisions: From Intuition to Implementation

Practical Bayesian Statistics for Real-World Decisions: From Intuition to Implementation

New course

28 pages

Stopping Rules and Sequential Learning Without Statistical Gymnastics

Capítulo 9

Estimated reading time: 0 minutes

+ Exercise

Why Stopping Rules Feel Messy (and Why They Don’t Have to Be)

In real work, you rarely get to run an experiment for a perfectly fixed sample size and then analyze it once. You peek at dashboards, stakeholders ask for updates, budgets change, and sometimes the result is “obvious” early. In classical fixed-sample testing, repeated looks can create false positives unless you apply corrections and carefully pre-register analysis plans. That’s where the “statistical gymnastics” often starts.

Bayesian sequential learning offers a simpler mental model: as new data arrives, you update your uncertainty and make decisions when the decision criteria are met. The key is to separate two ideas: (1) how beliefs update with evidence, and (2) what decision rule you use to stop, ship, or continue. The updating part does not break just because you looked early; the decision rule is what you must design responsibly.

Sequential Learning vs. Optional Stopping: What Changes and What Doesn’t

Sequential learning means you analyze data as it accumulates and potentially stop at a data-dependent time. Optional stopping is a special case where you keep sampling until you like the answer. In practice, teams often do something in between: they monitor results and stop when the evidence is strong enough or when constraints force a stop.

For Bayesian updating, the posterior after observing the data is the same whether you planned to stop at N or you stopped when a threshold was crossed, as long as the data model is correct and you condition on the observed data. What does change is the behavior of your decision process over time: if your stopping rule is “stop when it looks good,” you’ll stop more often in lucky runs. That can still be acceptable if your decision rule explicitly controls the business risk (for example, expected loss), rather than trying to mimic a fixed Type I error rate.

Designing a Stopping Rule That Matches a Real Decision

A practical stopping rule should answer: “When do we have enough evidence to act?” That “enough” should be defined in terms of outcomes you care about, not in terms of a ritualized sample size. A good stopping rule typically combines three ingredients: an evidence threshold, a minimum sample size (or minimum information), and a maximum sample size (or time limit).

Continue in our app.

You can listen to the audiobook with the screen off, receive a free certificate for this course, and also have access to 5,000 other free online courses.

Or continue reading below...
Download App

Download the app

Ingredient 1: Evidence Threshold

Pick a criterion that directly maps to a decision. Common choices in product and operations work include: probability that the effect exceeds a practical minimum, probability that one option is better than another by at least a margin, or expected loss of choosing the wrong action. The point is not to chase certainty; it is to reduce uncertainty enough that the expected downside of acting is acceptable.

Ingredient 2: Minimum Sample Size (Anti-Noise Guardrail)

Early data is volatile. Even with Bayesian updating, a few observations can swing probabilities dramatically. A minimum sample size prevents you from stopping on a fluke. This is not “frequentist correction”; it is simply a pragmatic guardrail against overreacting to noise and against model misspecification in the earliest phase.

Ingredient 3: Maximum Sample Size or Time Limit

Sometimes you cannot wait forever. A maximum sample size (or a deadline) forces a decision. If you hit the cap without meeting the evidence threshold, you choose the best available action under remaining uncertainty—often “do nothing,” “roll out cautiously,” or “collect different data.”

A Simple, Practical Sequential Workflow (Step-by-Step)

This workflow is designed for teams who want to monitor results regularly without complicated corrections, while keeping decisions disciplined.

Step 1: Define the Decision and the Action Set

Write down the actions you might take. Examples: ship feature to 100%, keep at 10% rollout, revert, or run longer. Avoid vague actions like “see what happens.” Each action should have a plausible cost of being wrong.

Step 2: Define the Practical Effect You Care About

Decide what “meaningful improvement” means. For conversion, it might be “at least +0.3 percentage points.” For latency, “at least 20 ms reduction.” This prevents stopping because of tiny effects that are statistically detectable but operationally irrelevant.

Step 3: Choose a Monitoring Cadence and a Minimum Sample

Pick how often you will check (daily, every 1,000 users, every batch) and set a minimum sample before any stop decision is allowed. The cadence should match how quickly the system stabilizes and how costly it is to wait.

Step 4: Choose a Stopping Criterion in Decision Terms

Examples of criteria you can implement without contortions: (a) stop and ship when the probability of a meaningful improvement exceeds a threshold (e.g., 95%), (b) stop and revert when the probability of harm exceeds a threshold (e.g., 90%), (c) stop when the expected loss of choosing the best current option is below a tolerance.

Step 5: Add a “Futility” Rule (Optional but Useful)

Futility means you stop because it’s unlikely you’ll reach a meaningful improvement even if you continue. This saves time and reduces opportunity cost. A futility rule might be: “If the probability that the effect exceeds the minimum improvement is below 10% after the minimum sample, stop and keep the status quo.”

Step 6: Simulate Before You Run (The Non-Gymnastic Safety Check)

Before launching, simulate the experiment under a few plausible truths: no effect, small positive effect, meaningful positive effect, and negative effect. Apply your stopping rule in simulation to see how often you stop early, how often you ship a harmful change, and how long you typically run. This replaces abstract debates with concrete operating characteristics.

Example 1: Sequential A/B Rollout with “Ship / Revert / Continue”

Imagine you are testing a new checkout layout. You care about purchase conversion. You plan to monitor daily. You set a minimum of 5,000 users per variant before any decision. You also set a maximum of 50,000 users per variant.

You define a practical minimum improvement (PMI) of +0.2 percentage points. Your stopping rule is: ship if P(lift > PMI) ≥ 0.95; revert if P(lift < 0) ≥ 0.90; otherwise continue until max sample. You also add futility: if P(lift > PMI) ≤ 0.10 after 20,000 users per variant, stop for futility and keep control.

Operationally, this rule does three things. First, it prevents “shipping on vibes” after a small early bump because you require both a minimum sample and a high probability of meaningful lift. Second, it protects users by allowing early revert when harm is likely. Third, it avoids wasting time when the lift is probably too small to matter.

Example 2: Sequential Monitoring for Rare Harms (Safety and Risk)

Sequential learning is especially valuable when the main concern is avoiding rare but serious harm. Suppose you deploy a new fraud model. The benefit is fewer false declines, but the risk is increased chargebacks. Chargebacks are rarer and slower to observe, so you need a rule that respects delayed feedback.

A practical approach is to monitor a leading indicator (e.g., suspicious approvals) and a lagging indicator (chargebacks) with different cadences. You might check the leading indicator daily with a conservative harm threshold, and check chargebacks weekly with a stricter rule due to noise and delay. Your stopping rule could be: “If the probability that chargeback rate increased by more than 5% relative exceeds 80% at any weekly check after a minimum exposure, pause rollout.”

This is not about squeezing a p-value under repeated looks; it is about continuously quantifying risk and acting when the risk becomes unacceptable.

How to Implement Sequential Checks Without Overreacting

Sequential monitoring can tempt teams into constant decision churn. The fix is not to stop monitoring; it is to make monitoring structured.

Use Decision Bands Instead of Single Thresholds

Instead of a single “ship if ≥ 95%” rule, define three regions: ship, revert, and continue. The continue region should be wide enough that small fluctuations do not trigger action. This is similar in spirit to control charts: you want stability in decisions, not just sensitivity.

Require Persistence Across Checks (Optional)

If your metric is noisy, you can require that the ship or revert condition holds for two consecutive checks. This reduces the chance of stopping due to a transient spike (for example, a weekend traffic mix shift). The trade-off is slower decisions, so use it when volatility is a known issue.

Monitor Data Quality and Non-Stationarity

Sequential learning assumes your data-generating process is reasonably stable. In practice, traffic sources change, instrumentation breaks, and novelty effects appear. Add explicit checks: sample ratio mismatch, missing events, sudden shifts in user mix, or time-of-day effects. If these fail, pause decisions; don’t force the stopping rule to compensate for broken data.

Sequential Learning with Multiple Metrics: Avoiding “Metric Shopping”

In real experiments you track more than one metric: conversion, revenue, retention, latency, support tickets. Sequential monitoring across many metrics can lead to “metric shopping,” where you stop because one metric looks good while ignoring others.

A practical fix is to predefine a metric hierarchy and a decision policy. For example: primary metric must meet the ship criterion; guardrail metrics must not show likely harm beyond a threshold; secondary metrics inform rollout speed but not the ship decision. This keeps sequential decisions coherent without requiring complex multiple-comparison corrections.

When Sequential Stopping Can Mislead You (and What to Do)

Bayesian updating is not magic. Sequential decisions can still go wrong if your model or assumptions are wrong, or if your stopping rule incentivizes biased behavior.

Problem: Stopping on a Noisy Early Spike

Even with a minimum sample, some metrics are extremely volatile. Mitigations: increase the minimum sample, use persistence across checks, or switch to a more stable metric (e.g., revenue per user instead of average order value if the latter is heavy-tailed).

Problem: Non-Independent Observations

Sequential data often violates independence: users return, sessions cluster, and network effects exist. If you treat correlated observations as independent, you will become overconfident too quickly. Mitigations: analyze at the user level, use cluster-robust approaches, or model repeated measures explicitly.

Problem: Delayed Outcomes

Retention and churn take time. If you stop early based on short-term proxies, you may ship something that harms long-term outcomes. Mitigations: include lag-aware guardrails, use staged rollouts, and delay final ship decisions until enough time has passed for key outcomes.

Problem: Changing the Rule Midstream

If you change thresholds after seeing the data, you are effectively optimizing the rule to the realized noise. Mitigations: write the rule down before launch, and if you must change it, treat it as a new decision problem and document why (e.g., instrumentation change, business constraint change).

Simulation Template: Testing Your Stopping Rule Before Launch

You do not need advanced math to validate a stopping rule; you need a simple simulation loop. The goal is to understand how your rule behaves under different realities: how often you ship when there is no meaningful lift, how quickly you detect a real lift, and how often you revert a good change by mistake.

# Pseudocode for simulating a sequential stopping rule (A/B example)  for scenario in [no_effect, small_lift, meaningful_lift, negative_effect]:      repeat many times:          initialize data = empty          for t in monitoring_times:              generate new batch of outcomes for A and B under scenario              update posterior for effect (or sample from posterior)              if n_per_variant < min_n: continue              if P(lift > PMI) >= ship_threshold: record 'ship' and stop              if P(lift < 0) >= revert_threshold: record 'revert' and stop              if futility_condition_met: record 'futility' and stop              if n_per_variant >= max_n: record 'maxed_out' and stop          summarize: ship_rate, revert_rate, avg_sample, time_to_decision

Run this with realistic traffic patterns and noise levels. If the simulation shows you ship too often under no effect, raise the ship threshold, increase the minimum sample, or tighten the PMI. If you rarely ship even under meaningful lift, lower the threshold slightly, increase max sample, or reconsider whether the PMI is too ambitious.

Operational Playbook: A Lightweight Policy Your Team Can Adopt

To make sequential learning routine rather than chaotic, write a one-page policy that everyone follows. It should include: monitoring cadence, minimum and maximum sample, ship/revert/futility criteria, metric hierarchy, and what to do when data quality checks fail.

  • Cadence: when checks happen and who reviews them.
  • Guardrails: minimum sample, persistence rule, and data quality gates.
  • Decision criteria: ship, revert, continue, futility, max-out behavior.
  • Metric policy: primary metric, guardrails, and escalation path if they disagree.
  • Documentation: record each check’s decision state and any anomalies.

This playbook is the opposite of statistical gymnastics: it is a clear, repeatable decision process that respects uncertainty while acknowledging real-world constraints.

Now answer the exercise about the content:

Which stopping rule design best reduces the risk of acting on noisy early results while still supporting timely decisions in sequential Bayesian monitoring?

You are right! Congratulations, now go to the next page

You missed! Try again.

A practical rule combines an evidence threshold with a minimum sample to avoid early noise and a maximum sample or deadline to force a decision if evidence never becomes strong enough.

Next chapter

Mini Case Study: Choosing a Variant Using Expected Loss and a Business Cost Model

Arrow Right Icon
Download the app to earn free Certification and listen to the courses in the background, even with the screen off.