17.7 Experimental Design and Uncertainty
A candidate succeeds on 56% of cases and the champion on 54%. Does that two-point gap establish progress? First identify the population, the independent units, the paired observations, and the improvement required for a decision. Statistical machinery cannot repair a contaminated test set or an inconsistent evaluation setup.
Two candidates both improve target-task accuracy by 15 percentage points. Open the target improvement scenario and the retention regression scenario. Run each one and compare the retention rows. Which candidate would you release?
Define the Claim Before Measuring It
An estimand is the population quantity you want to estimate. In this exercise it is the mean candidate-minus-champion success difference, giving each independent task cluster equal weight. A cluster may be a document, conversation, repository, or a family of synthetic siblings. Give every related case the same exposure status and split assignment. A traffic-weighted mean answers a different question; choose weights before seeing results.
Let for paired binary outcomes on case in cluster . With clusters and cases per cluster:
For example, the target task in both gain and regression has 80 clusters of four cases. The candidate gets one more case right in 64 clusters and one fewer right in the other 16. Because every cluster has the same size, the mean difference is
or 15 percentage points. What separates these two candidates is their performance on the retention task.
For each system, hold the model revision, prompt, scaffold, tools, decoding budget, and grader fixed. Resample whole clusters with replacement, and keep each pair and all its siblings together. Recompute the same statistic on each sample. Resampling correlated siblings as independent rows exaggerates the effective sample size. Paired resampling means using the same sampled units for both systems [1].
Run the Release Decision Experiment
The exercise uses authored outcomes for two models on the same cases. It resamples whole clusters to estimate uncertainty in the difference. To pass, the target task’s lower bound must exceed +5 percentage points, and the retention task’s lower bound must exceed −2 points.
Release decision lab
Choose a scenario and press Run to download Python from jsDelivr. The experiment runs in this tab without an account or installation.
Preparing browser controls. You can also run the Python file below.
This exercise uses synthetic cases from the 2026-11-25 source snapshot. Pass applies to the offline criteria shown here.
To run the same experiment locally, download paired_release.py and run these commands in its directory. It requires Python 3.10+ and the standard library.
python paired_release.py --scenario gain
python paired_release.py --scenario uncertain
python paired_release.py --scenario regression
python paired_release.py --scenario missing
The target and retention tasks each use the 80-cluster, four-case design above. The script excludes exposed incident clusters, rejects duplicate case IDs and missing pairs, and produces a JSON decision packet using 4,000 bootstrap replicates with seed 23. In a real harness, predeclare whether a timeout counts as failure; never silently drop an unobserved outcome. Here unresolved missing evidence produces Review.
| Scenario | Result | Reason |
|---|---|---|
gain | Pass | Target gain is 15 percentage points; its one-sided 95% lower bound is 11.25 points, above the required 5 points. Retention passes its −2-point margin. |
uncertain | Review | The target evidence does not establish the required improvement. |
regression | Block | The retention slice loses 25 points despite the target gain. |
missing | Review | A paired outcome is unresolved. |
Why does the retention interval have zero width? In regression, the candidate gets one fewer case right in every four-case cluster. Every resample therefore has a mean difference of −25 points. In gain, every cluster difference is zero. Both intervals have zero width, but only one clears the retention threshold. This property of the synthetic data does not establish zero population uncertainty. A percentile bootstrap can have poor coverage with small samples or degenerate empirical distributions like these.
A lower bound above zero establishes evidence of improvement under the method’s assumptions; above 0.05 supports the stronger five-point gate. Noninferiority instead asks whether the lower bound exceeds a prespecified tolerated loss, here −0.02. “No significant degradation” does not establish noninferiority. The script uses separate one-sided bounds; the displayed lower and upper bounds together are a central 90% interval, not a two-sided 95% interval. Pass covers these synthetic offline gates only, not authorization to deploy.
Zero Observed Failures Is Not Zero Risk
For independent Bernoulli trials, zero failures has probability at failure rate . Setting that probability to gives the exact one-sided upper bound [2]. At 95% confidence, 1,000 zero-failure trials give about 0.299%, satisfying the exercise’s 0.5% risk limit. One hundred give about 2.95%. To put the bound below 0.1%, more than independent zero-failure trials are needed, so use at least 2,995.
The safety sample is a separate authored scenario in the script. Correlated retries are not independent trials, and selected red-team prompts do not estimate production prevalence. Production safety also needs threat coverage, severity handling, judge validation, and operational controls; a single binomial rate is insufficient.
Budget, Selection, and Stopping
Plan sample size from a meaningful effect, discordant-pair frequency, cluster variation and desired power, using pilot data outside the sealed release set. Simulate the planned analysis when a closed-form approximation is unsuitable. A larger bootstrap replicate count reduces Monte Carlo noise; it does not create more independent tasks.
Choose checkpoints and hyperparameters on development data. Lock the final comparison before opening the release set. Repeatedly selecting among many candidates or highlighting favorable slices requires multiplicity control or a fresh confirmation set. Requiring all prespecified gates to pass is different from searching for any favorable result; do not advertise all intervals as simultaneous confidence statements without a suitable adjustment.
For canaries, randomize persistently by the user/session unit appropriate to interference. A practical default is a fixed sample size and one terminal efficacy analysis, with immediate safety-abort monitoring throughout. Repeatedly checking an ordinary confidence interval and stopping at its first favorable crossing invalidates its nominal interpretation. Early efficacy decisions need a sequential design; operational hysteresis does not supply one. Specify whether ramp stages reuse observations.
Task resampling for a fixed checkpoint estimates uncertainty over tasks, not variability from retraining. For a recipe claim, repeat training seeds and model that additional hierarchy. To extend this lab, replicate sibling cases under distinct case IDs within each cluster: the cluster estimate must not become more certain merely because the same evidence was copied. Then compare a deliberately incorrect row bootstrap and explain its narrower interval.
Quizzes
Quiz 1: Why bootstrap clusters rather than individual paraphrases?
Paraphrases share information and outcomes. Resampling them as independent units exaggerates effective sample size. Whole-cluster resampling preserves the dependence represented by the grouping.
Quiz 2: Does an interval crossing zero prove retention is acceptable?
No. The lower bound must exceed a prespecified noninferiority margin. An interval can cross zero while still admitting an unacceptable loss.
Quiz 3: Why do 10,000 bootstrap replicates not replace 10,000 independent tasks?
Replicates approximate a sampling distribution from existing observations. They reduce numerical simulation noise but add no new independent evidence about the population.
Quiz 4: When is stopping early appropriate?
Safety or operational aborts can be monitored continuously. Early promotion based on efficacy requires a valid prespecified sequential design; otherwise use the fixed terminal analysis.
References
- SciPy. bootstrap. Paired resampling and interval methods.
- SciPy. BinomTestResult.proportion_ci. Exact binomial intervals.