AAI Agentic Handbook
Evals & LLMOps

Statistical significance

Senior levelReviewed Oct 2026In 7 interview questionsIn 3 posts

Whether an eval or A/B delta is bigger than the noise; report confidence intervals, use paired tests on shared items, and size n before you run.

In plain English

When you run an eval twice, or on a different sample, the score changes a bit even if nothing improved. Statistical significance asks: is the difference I see bigger than this random wobble?

The practical tool is the confidence interval: a range like '80% ± 12 points' that says how precisely you measured. Small test sets give wide ranges, so a 3-point improvement on 40 questions tells you almost nothing.

Analogy

Flipping a coin 10 times and getting 7 heads does not prove the coin is biased; flip it 1,000 times and 700 heads would.

Common pitfall

Declaring a winner from overlapping or missing error bars, or slicing the results 15 ways until one slice is 'significant'. Both are how teams ship regressions with a spreadsheet that says they improved.

How it actually works

For a pass rate p on n independent cases, the 95% CI half-width is ≈ 1.96·√(p(1−p)/n): ±12.4 points at n=40 and p=0.8, ±5.5 at n=200, ±2.5 at n=1,000. Width shrinks with √n, so halving it costs 4× the cases. Near 0% or 100% use a Wilson interval; the normal approximation breaks down.

Comparing two variants on the same cases, use a paired test (McNemar for binary outcomes, paired bootstrap or paired t-test on per-case scores): the variance comes only from cases where the variants disagree, which typically halves the CI width. Miller (2024) also recommends clustered standard errors when cases share a source (e.g., 5 questions per document) and resampling several generations per case to separate model sampling noise from item difficulty. Multiple comparisons inflate false positives: testing 10 slices at α = 0.05 gives ~40% odds of one spurious 'significant' slice, so correct (Holm, Benjamini–Hochberg) or pre-register the slices that matter. And significance is not importance: with n = 50,000 a 0.2-point gain is significant and irrelevant.

What I'd ship on day one

Report every eval score as rate ± 95% CI (Wilson for rates near 0 or 1). Compare variants paired on the same cases with McNemar (statsmodels.stats.contingency_tables.mcnemar) or a 10,000-resample paired bootstrap; cluster by source document; pre-register critical slices and apply Holm correction to the rest.

Worked example

A RAG answer-quality eval on financial filings. Variant B scores 82.5% vs A's 80.0% on 400 questions. Unpaired, each CI is about ±3.8 points and the intervals overlap. Paired: the variants disagree on 46 questions, B wins 28 and A wins 18; McNemar χ² = (28−18)²/46 ≈ 2.2, p ≈ 0.14: not significant. To detect a 2.5-point gain at this discordance rate with 80% power you need roughly 1,400 questions, or more samples per question.

In the interview

Say: "I size the eval from the effect I care about, compare paired on the same items, and report the interval, not just the delta." Expect: "how many cases do you need?": walk the √n arithmetic (±12 at 40, ±5.5 at 200, ±2.5 at 1,000 for an 80% pass rate).

20501002005001,00005101520n=40: ±12 ptsEval cases (n) (log scale) →95% CI ± points →
80% pass rate95% pass rate
CI width falls with √n: quadruple the cases to halve the error bars.

Numbers worth knowing

95% CI half-width at 80% pass
±12.4 (n=40), ±7.8 (n=100), ±5.5 (n=200), ±2.5 (n=1,000)normal approximation, independent cases
Cost of halving the CI
4× the caseswidth ∝ 1/√n
Chance of ≥1 false 'significant' slice
≈ 40%10 independent slices at α = 0.05, no correction

How to decide

WhenDo this
Both variants can run on the same casesUse a paired test; it typically halves the CI width for free.
Cases come in clusters (several questions per document or per user)Use clustered standard errors or bootstrap by cluster, or you will overstate precision.
The delta you care about is smaller than the CI half-widthIncrease n (or samples per case) before running; don't run and hope.

Cost maths

Required n for a target half-width h at pass rate p ≈ 1.96²·p(1−p)/h². For ±3 points at 80%: 3.84 × 0.16 / 0.0009 ≈ 680 cases. At ~$0.019 per case-sample (Sonnet 4.6-class generation plus Haiku-class judge, Oct 2026 list) and 3 samples, ≈ $39 per run, $19 on the Batch API. Labelling 680 cases by hand is the real cost, which is why paired designs and judges matter.

Operating it

Time to scale up when…
  • Eval deltas you act on are routinely below 3 points: grow the golden set toward 700+ cases or move to paired designs with more samples.
  • You report more than 5 slices per run: add multiple-comparison correction to the harness.
What to monitor
  • Run-to-run spread of the baseline (re-run weekly, unchanged): alert if it exceeds the reported CI.
  • Share of shipped changes whose online effect matched the offline sign: review quarterly, alert below 70%.

When it goes wrong

What users saw

Over a quarter, a team shipped 6 'improvements' to a legal-research assistant, each +2 to +4 points on a 60-case eval; the quarter-end re-run on a fresh 500-case set showed no net change.

How it was caught

A new hire re-ran the original baseline 5 times and got scores spanning 9 points.

Root cause

n=60 has a ±10-point CI at an 80% pass rate; every 'improvement' was inside the noise, and the team had picked the best of several runs each time.

Fix

Grew the set to 500, switched to paired McNemar with 3 samples per case, and required the CI lower bound above zero before claiming a gain.

Sources

  1. Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations — Miller (Anthropic), 2024paper
  2. Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing — Kohavi, Tang & Xu, 2020book

Check yourself

Three questions. Every option is explained once you answer.

1ConceptWhy does a paired test usually give a narrower interval than comparing two independent scores?
2ScenarioYou report 12 slices and one shows a 'significant' gain at p = 0.04. What is the right interpretation?
3CalculationAt an 80% pass rate, about how many cases give a ±3-point 95% CI?