AI Infra
0%
Part VII · Chapter 48

Statistical Reliability as a Decision Contract

AuthorChangkun Ou
Reading time~15 min

A benchmark score is an estimate only when the evaluation design says what it estimates. On a fixed set of deterministic questions, 73% is simply the fraction answered correctly. It becomes evidence about future tasks only after the team names a target population, a sampling process, and the sources of variation that the analysis is meant to cover.

That distinction changes the release question. “Did B score higher than A?” is usually too weak. A useful question is closer to this:

On the target task population, under the production decoding and scoring protocol, is B better than A by enough to matter, without violating any guardrail?

This chapter turns that question into an analysis contract. It separates item variation from run and scorer variation, preserves pairing, plans for a decision-relevant effect, and distinguishes an uncertain result from a biased instrument. The benchmark contract in Chapter 47 defines what is measured. This chapter defines how strongly the observed data support a decision.

2026-06-23T18:50:31.888652 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/ Model A Model B Model C 68 70 72 74 76 78 score estimate with 95% CI visible gap, weak evidence clearer separation
Figure 48.1. Three schematic score estimates with individual 95% confidence intervals. The figure shows that point estimates carry uncertainty; overlap or non-overlap between separate intervals is not itself a valid paired comparison. Compare the interval for the model difference instead. These are illustrative values, not measured data.

Name the Quantity Before Its Interval

An interval cannot rescue an undefined target. Start with an estimand: the exact quantity the evaluation is intended to estimate. For a system ss, one general form is

θs=EUP,RQ,JH[m(s,U,R,J)].\theta_s = \mathbb{E}_{U \sim P,\, R \sim Q,\, J \sim H} \left[m(s, U, R, J)\right].

Here UU is an independent sampling unit drawn from target population PP; RR is a run configuration drawn from production distribution QQ; JJ is a human or automated scorer drawn from scoring protocol HH; and mm is the predeclared metric. The expectation may average over one, two, or all three sources. The evaluation must say which.

This notation prevents several common category errors:

Source of variation Example Independent unit to preserve Question it supports
Items support tickets sampled from next month's workload ticket, user, or tenant How will the system perform on comparable work?
Runs stochastic decoding or changing tool state repeated run nested inside one task How stable is the deployed policy?
Scorers annotators or judge-model samples verdict nested inside one response or pair How sensitive is the result to judgment?
Time traffic collected across days or releases time block, if conditions vary by block Does the estimate survive operational drift?

The row count is not automatically the sample size. Twenty attempts on one repository are still one repository for claims about repositories. Fifty turns from one conversation are not fifty independent conversations. Treating correlated rows as independent creates narrow intervals without creating new evidence.

There is also an important fixed-set case. If a deterministic model is evaluated on every item in a frozen manifest and the claim is only about that manifest, the mean is a complete descriptive result; there is no item-sampling error to estimate. An item bootstrap adds a hypothetical population assumption. That can be useful, but the report should state it rather than presenting the interval as a property of the fixed file. Run or scorer uncertainty may still remain.

Match the Estimator to the Design

For nn independent binary items with xx successes, observed accuracy is

p^=xn.\widehat{p} = \frac{x}{n}.

Here xx is the success count, nn is the number of independent items, and p^\widehat{p} is the observed success proportion.

The familiar normal, or Wald, approximation gives the 95% half-width

hWald1.96p^(1p^)n.h_{\mathrm{Wald}} \approx 1.96 \sqrt{\frac{\widehat{p}(1-\widehat{p})}{n}}.

Here hWaldh_{\mathrm{Wald}} denotes the approximate distance from the point estimate to either endpoint. The square-root factor represents the estimated standard error, and 1.96 is the usual standard-normal multiplier for a two-sided 95% interval.

It is a useful planning sketch: precision improves at roughly the square root of sample size, so halving a half-width requires about four times as many independent items. It is not a universal production interval. Its coverage is poor for small samples and proportions near zero or one. For an independent binomial proportion, use a method with better coverage, such as a Wilson interval, and record the method (Brown et al. 2001).

Most evaluations need something else:

  • For a mean rubric score, estimate uncertainty for the mean under the actual sampling design; do not convert the score to fake Bernoulli trials.
  • For tasks clustered by user, repository, document, or conversation, resample or model the cluster, not each row inside it.
  • For repeated stochastic runs, keep repeats nested within the task. First define how run outcomes combine into the task-level quantity, then aggregate tasks.
  • For a weighted metric, apply the same declared weights in every resample and report the effective support behind heavily weighted slices.
  • For a ratio, pass rate, quantile, or nonlinear composite, resample the independent units and recompute the whole estimator rather than bootstrapping already-aggregated cells.

The bootstrap is valuable because it can approximate an estimator's sampling distribution without deriving a new closed form (Efron 1979). Recent work applies the same design discipline directly to language-model evaluations (Miller 2024). It does not discover the correct unit or repair a biased sample. A row-wise bootstrap over correlated rows faithfully automates the wrong design.

A 95% confidence interval also has a procedural meaning. Under repeated samples from the assumed design, the interval-producing procedure covers the fixed target at its nominal rate. It is not a statement that this realized frequentist interval has a 95% probability of containing the target. If a Bayesian posterior interval is used instead, name the model and prior; do not silently switch interpretations.

Figure 48.2. This precision screen uses the simple independent-binomial approximation above. It illustrates the square-root relationship between sample size and interval width; it is not a power analysis, a paired comparison, or a release rule.

Compare Systems on the Same Units

When A and B receive the same tasks, analyze their paired outcomes. Here ygAy_{gA} and ygBy_{gB} denote the task-level scores for independent unit gg. Define

dg=ygBygA,Δ^=1Gg=1Gdg.d_g = y_{gB} - y_{gA}, \qquad \widehat{\Delta} = \frac{1}{G}\sum_{g=1}^{G} d_g.

Here dgd_g is B's change on unit gg, GG is the number of independent units, and Δ^\widehat{\Delta} is the estimated mean change. Build the interval from the dgd_g values, or resample paired clusters. Separate intervals around A and B throw away their covariance. This is why “the error bars overlap” and “the error bars do not overlap” are both unreliable shortcuts for deciding whether the paired difference is supported.

For binary outcomes, retain the disagreement table:

B correct B wrong
A correct n11n_{11} n10n_{10}
A wrong n01n_{01} n00n_{00}

Here only n10n_{10} and n01n_{01} distinguish the systems: they represent the two directions in which A and B disagree. McNemar's test is built around that paired evidence (McNemar 1947). The common large-sample statistic is

χ2=(n10n01)2n10+n01.\chi^2 = \frac{(n_{10}-n_{01})^2}{n_{10}+n_{01}}.

Here the numerator measures the squared imbalance between the two disagreement directions, while the denominator is their total count.

When disagreement counts are small, use the exact paired-binomial form rather than leaning on this asymptotic approximation. In either case, retain the effect estimate and its interval. A test can indicate incompatibility with a zero-difference model; it does not say whether the difference matters.

Per-unit retention also exposes engineering tradeoffs hidden by an average. The mean can improve while a safety slice regresses, or while B exchanges one failure class for another. Store task ids, both raw outputs, run ids, scorer versions, parsed outcomes, and pairwise differences. Statistical reliability begins with reconstructable records.

Define What Would Change the Decision

A zero-effect threshold is rarely the product threshold. Before collecting the decisive sample, define a smallest effect of interest, δ\delta. Here δ\delta means the smallest gain or loss large enough to change the decision after cost, latency, and risk are considered.

For a higher-is-better metric, a confidence interval for Δ=θBθA\Delta = \theta_B-\theta_A can support different claims. Here θA\theta_A and θB\theta_B are the two systems' target values, so Δ\Delta represents B's improvement over A:

Intended claim Interval condition Possible action
Superiority by a meaningful amount Entire interval is above +δ+\delta Consider shipping if guardrails pass
Non-inferiority Entire interval is above δ-\delta Accept no material regression, perhaps for a cheaper system
Practical equivalence Entire interval lies inside [δ,+δ][-\delta,+\delta] Treat quality as tied; decide on other constraints
Unresolved Interval crosses the relevant boundary Keep baseline, collect data, or narrow the claim

These are different study designs, not labels to choose after seeing the plot. Equivalence requires evidence that effects outside the predeclared band are implausible under the procedure; failing to reject an exact zero is not evidence of equivalence (Lakens et al. 2018). Guardrails need their own one-sided margins. A safety metric normally asks whether a harmful regression has been excluded, not whether its point estimate happened to improve.

Statistical power belongs here. Power is the probability that a specified procedure will detect a specified effect under stated assumptions. A useful sample-size plan therefore needs the effect or margin, error rate, desired power, outcome variance, pairing, and clustering. “Use 1,000 examples” is not a power analysis. NLP studies are often underpowered for the small improvements they try to claim, which makes both missed effects and exaggerated selected wins more likely (Card et al. 2020).

The plan should also include invalid or missing outcomes. Timeouts, parser failures, refusals, and scorer errors cannot disappear because they complicate the statistic. Predeclare whether each state is a failure, a separate outcome, or grounds for a rerun. Report its rate either way.

Repeated Looks and Many Claims Spend Evidence

Running the same test every hour and stopping on the first favorable interval is not the fixed-sample procedure the interval assumed. Optional stopping increases the chance of a false win. Choose one of two honest designs:

  1. Freeze a sample and analysis time, then decide once.
  2. Use a sequential design whose error guarantee remains valid under repeated looks, such as a confidence sequence, and record the stopping rule (Howard et al. 2021).

The same problem appears across a dashboard. A suite may contain tasks, languages, prompt templates, judges, slices, and decoding settings. If enough cells are searched, some will look favorable by chance. Define the family of claims before the run and assign each result a role:

  • Primary claim: the single comparison allowed to justify the planned release decision.
  • Guardrails: predeclared one-sided checks that can block the release.
  • Confirmatory secondary claims: a bounded family analyzed with a stated multiplicity procedure.
  • Exploratory findings: leads for a new evaluation, not wins established by this one.

Family-wise error-rate control limits the chance of any false rejection in the declared family. False-discovery-rate procedures, including Benjamini--Hochberg, control the expected false-discovery proportion under their assumptions and are often more useful for broad exploratory families (Benjamini and Hochberg 1995). Neither procedure legitimizes selecting the family after seeing the results. Report all tested claims and preserve failed as well as favorable comparisons.

Repeated model and prompt selection on the same benchmark creates a second adaptive loop. Correcting one report's pp-values does not undo information already leaked through months of leaderboard feedback. Record the selection history, keep a confirmation set inaccessible during development, and evaluate the chosen candidate once on that locked set. Reusable-holdout methods can limit information leakage under defined query mechanisms, but ordinary unrestricted reuse eventually turns the benchmark into development data (Dwork et al. 2015).

A pp-value, when used, measures how incompatible the data are with a specified statistical model. It is not the probability that the null is true, the probability that the result arose “by chance,” or a measure of effect size or product importance (Wasserstein and Lazar 2016). Report the estimate, interval, assumptions, and decision boundary alongside it.

Precision Cannot Repair Bias

Uncertainty describes variation under the declared protocol. Bias describes a systematic difference between that protocol and the target claim. They require different responses:

Observation Likely issue Response
Wide interval too few independent units or high variation collect more units, pair the design, or narrow the claim
Narrow interval on contaminated items invalid sampling frame replace or qualify the instrument
Stable judge preference with position bias scorer bias randomize order, audit judges, or use another protocol
Repeated-run variance hidden by one seed incomplete estimand sample production-like runs and report their distribution
Slice improvement found after searching hundreds selection bias mark exploratory and confirm on new data

A precise estimate can be precisely wrong. Confidence intervals do not cover contamination, label errors, population drift, an unrepresentative prompt mix, or a judge that rewards verbosity. Those threats belong in the benchmark's validity and audit record.

Calibration is a related but separate estimand. A model is calibrated when outcomes assigned confidence qq occur at rate qq in the target population (Guo et al. 2017). Measuring it requires probability-bearing predictions, a declared binning or proper-scoring method, and uncertainty at the appropriate unit. Accuracy alone cannot establish calibration, and a clean calibration curve on yesterday's traffic does not guarantee calibration after distribution shift.

The Result Is a Reproducible Decision Record

A scalar is not enough. Each release-grade result should resolve to a versioned record:

EvaluationResult:
  decision_id
  evaluation_spec_hash
  target_population
  system_a_revision
  system_b_revision
  item_manifest_hash
  run_protocol_revision
  scorer_revision
  estimand
  estimator
  independent_unit
  cluster_keys
  repeat_policy
  primary_claim
  effect_margin
  interval_method
  confidence_level
  sequential_rule
  multiplicity_family
  selection_history
  confirmation_set_version
  estimate_a
  estimate_b
  paired_delta
  interval
  invalid_outcome_counts
  slice_and_guardrail_results
  known_validity_limits
  decision

The operational procedure is short:

  1. Write the decision, target population, estimand, independent unit, and system boundary.
  2. Freeze the manifest, model, harness, run policy, scorer, and missing-outcome rules.
  3. Declare the primary claim, guardrails, practical margin, analysis family, and stopping rule.
  4. Plan sample size from the design and the smallest effect the decision cares about.
  5. Run A and B on the same units; preserve raw outputs and nested repeat or scorer records.
  6. Compute the declared estimator and paired interval at the independent-unit level.
  7. Report every planned claim, invalid outcome, guardrail, and known source of bias.
  8. Apply the predeclared decision rule. If the result is unresolved, say so.

Three invariants make the record auditable: no row silently changes the sampling unit, no result silently changes the claim family, and no release decision silently changes the practical margin after seeing the data.

What's contested

Frequentist intervals, Bayesian posterior intervals, randomization tests, and hierarchical models encode uncertainty differently. No single method is correct for every evaluation. The non-negotiable part is the contract: name the estimand, independent unit, assumptions, decision boundary, and interpretation. Methodological sophistication cannot compensate for an undefined population or a biased scorer.

Lower-layer constraint

The serving and orchestration layers determine which analyses remain possible. Without stable task, user, conversation, run, tool, model, and scorer identifiers, the evaluation layer cannot reconstruct pairs, clusters, or sequential looks. Observability therefore preserves the experimental design, not just the debugging trail. Chapter 87 turns those records into a continuous evaluation loop.

The next chapter, Chapter 49, moves inside one especially important scorer. It asks how an instruction, rubric, annotator pool, and adjudication process create the human label that the statistical analysis otherwise treats as data.

Further reading

  • Brown et al., “Interval Estimation for a Binomial Proportion,” 2001. projecteuclid.org
    Brown, Cai, and DasGupta show that the common Wald interval has erratic coverage and recommend better-performing alternatives, including the Wilson score interval.
  • Lakens et al., “Equivalence Testing for Psychological Research: A Tutorial,” 2018. doi.org
    The tutorial explains how predeclared equivalence bounds can support evidence that an effect is smaller than a practically meaningful threshold; a nonsignificant zero-effect test cannot.
  • Card et al., “With Little Power Comes Great Responsibility,” 2020. aclanthology.org
    Card et al. find that underpowered NLP experiments are common and show how low power makes meaningful differences harder to detect while exaggerating selected positive findings.
  • Howard et al., “Time-Uniform, Nonparametric, Nonasymptotic Confidence Sequences,” 2021. projecteuclid.org
    Howard et al. develop confidence sequences whose coverage guarantee holds uniformly over time, enabling valid inference under repeated looks when their assumptions hold.
  • Wasserstein & Lazar, “The ASA's Statement on p-Values: Context, Process, and Purpose,” 2016. doi.org
    The ASA statement explains that p-values do not give the probability that a hypothesis is true and do not measure effect size or practical importance.
  • Dwork et al., “The Reusable Holdout: Preserving Validity in Adaptive Data Analysis,” 2015. pubmed.ncbi.nlm.nih.gov
    The paper formalizes why ordinary holdout guarantees fail under adaptive reuse and develops a controlled mechanism for answering repeated queries while limiting overfitting.
  • Efron, “Bootstrap Methods: Another Look at the Jackknife” (bootstrap intervals for fragile evals), 1979. doi.org
    Efron's paper introduces the bootstrap as a general resampling method for estimating uncertainty without deriving a closed-form sampling distribution.
  • Miller, “Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations” (error bars for LLM evals), 2024. arXiv:2411.00640
    An Anthropic treatment of LLM evaluation as statistical inference: report standard errors, use clustered standard errors when questions come in groups, analyze paired differences between models, and plan sample sizes with power analysis.
  • McNemar, “Note on the Sampling Error of the Difference Between Correlated Proportions or Percentages” (paired binary comparisons), 1947. doi.org
    McNemar's test compares paired binary outcomes by focusing on examples where two systems disagree, which is often the right design for benchmark A/B comparisons on the same items.
  • Benjamini & Hochberg, “Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing” (leaderboards make many comparisons), 1995. doi.org
    Benjamini and Hochberg introduce false-discovery-rate control, a less conservative alternative to family-wise error control for settings with many simultaneous tests.
  • Guo et al., “On Calibration of Modern Neural Networks” (confidence is a measured property), 2017. proceedings.mlr.press
    Guo et al. show that modern neural networks can be accurate yet miscalibrated, and that simple temperature scaling can substantially improve probabilistic calibration.

Comments

Log in to comment