# What Is Statistical Significance in Evals?

> Why a 3-point gap between two models can be luck, how to measure the noise, and how to report it honestly for your AI interview.

**In short:** Statistical significance asks whether the gap between two models is bigger than the luck of which test questions were picked. You measure that luck as a range around each score, and when both models take the same questions, a paired test gives a tighter range.

AI and LLM interview question Q279, Evaluation and observability. Advanced, occasional (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/statistical-significance-in-evals

## Say it in 30 seconds

Statistical significance tells me whether a gap between two models is real or just luck in which questions we picked. I measure that wobble as a range around each score. When both models take the same questions, I use a paired test, because questions both models get right or wrong cancel out. If the range for the gap excludes zero, the gap is probably real. Not significant doesn't mean equal, so I add more questions before I decide.

## Say it in 2 minutes

An eval gives each model a score, but the score is an estimate. A different set of questions would give a slightly different number. Statistical significance asks whether a gap between two models is bigger than that wobble. If it isn't, the gap may just be luck in which questions we picked.

The wobble is measured as a standard error. For a right-or-wrong score on independent questions, it is roughly the square root of p times one minus p, divided by the number of questions, written sqrt(p(1-p)/n). A 95 percent range is the score plus or minus about 1.96 standard errors. Evan Miller, who is affiliated with Anthropic, wrote the paper that shows how to do this for evals.

The key trick is the paired test. If two models take the same 400 claims, the claims both get right or both get wrong cancel out, and only the disagreements count. In my worked example, a 3-point lead has a range from minus 1.4 to plus 7.4 points when treated as two unrelated runs, so it could be luck. Compared claim by claim, the range runs from 0.4 to 5.6 points, so the gap is probably real, though small.

Not significant does not mean equal. It often means too few questions. And a real gap is not automatically worth shipping: I weigh the cost, the risk and which errors matter. I also don't try ten prompt versions and pick the best, because one of them will look better by chance.

## What is statistical significance in evals, in plain words?

An eval is a fixed set of test questions with a rule for scoring each answer. A model's score is only an estimate, because a different set of questions would give a slightly different number. Statistical significance is the check that asks whether a gap between two models is bigger than that wobble.

Think of a quality inspector who checks 400 parts from each of two machines. Machine A shows three fewer defects. Before buying it, you ask whether that would hold on a fresh batch, or whether the inspector simply drew an easier pile. A claims team at an insurer faces the same question: model A gets 90.0% of 400 past claims right, and model B gets 87.0%. Is A really better?

- **Eval:** A fixed set of test questions, plus a rule that marks each answer right or wrong.
- **Standard error:** How much a score would wobble if we had drawn a different set of questions.
- **Confidence interval:** A range built from the scores, so that over repeated tests about 95 in 100 such ranges contain the true score.
- **Paired test:** A comparison that uses the same questions for both models, so shared luck cancels.
- **P-value:** How surprising a gap this big would be if the two models were really equal. It is not the chance that one is better.

## How do you measure the noise in an eval score?

The noise is the standard error. For a right-or-wrong score on independent questions, it is roughly the square root of p times one minus p, divided by the number of questions, written sqrt(p(1-p)/n). The formula rests on the Central Limit Theorem, which applies to evals with finite-variance scores and a large number of questions. With 400 claims at 90%, the wobble is about 1.5 points. Adding and subtracting 1.96 of those wobbles gives a 95% range of about 87.1 to 92.9%.

*Diagram, A score is a range, not one number: One score is one estimate. A fresh set of 400 claims would likely land a little off, so the honest report is a range, about 87 to 93 percent, not a single 90.*
1. Another set of claims would give a slightly different score.
2. Add and subtract 1.96 wobbles to get the 95% range.

> "The standard deviation (or width) of that normal distribution is commonly known as the standard error of the mean, or SEM." (Anthropic)

This works when the questions are independent. Real evals often break that rule. Several questions may share one passage of text. Statisticians call this clustering. Grouped questions act like one bigger question, so the wobble is larger than the simple formula says.

## Why compare two models on the same questions?

When two models take the same test, their mistakes overlap. A hard claim can fool both, and an easy one helps both. A plain comparison counts that shared luck as if it were new, so its range is too wide. A paired test ignores the claims both got right or both got wrong, and looks at the disagreements.

> "Paired-difference analysis thus represents a "free" variance reduction technique that is very well suited for AI model evals." (Anthropic)
>
> "The naive comparison above misses an opportunity to reduce the standard error when two models evaluate the same set of questions." (Evan Miller's paper)

*Diagram, The same gap, checked two ways: The same 3-point gap, checked two ways. Treated as two unrelated runs, its 95% range includes zero. Compared claim by claim, the range excludes zero, so the gap is probably real, though its low end is small.*
1. Treated as two unrelated runs, the range is wide.
2. Compared claim by claim, only the disagreements count.
3. Its range includes zero, so luck is still possible.
4. Its range excludes zero, so the gap is probably real.

Here is the same check in plain Python, using only the standard library. The 400 claims split into 340 both right, 20 only A right, 8 only B right and 32 both wrong. Only the 28 disagreements carry the gap.

```python
# A claims team compares two models on the same 400 past claims.
import math
from statistics import NormalDist

N = 400
A_RIGHT, B_RIGHT = 360, 348            # 90.0% vs 87.0% correct
BOTH_RIGHT = 340
ONLY_A = A_RIGHT - BOTH_RIGHT          # 20 claims only model A got right
ONLY_B = B_RIGHT - BOTH_RIGHT          # 8 claims only model B got right

def report(name, gap, se):
    z = gap / se
    p = 2 * (1 - NormalDist().cdf(abs(z)))
    half = 1.96 * se
    print(f"{name}: gap {100 * gap:.1f} points, 95% range {100 * (gap - half):.1f} "
          f"to {100 * (gap + half):.1f}, p = {p:.3f}")

# Unpaired: treat the two runs as unrelated samples.
pa, pb = A_RIGHT / N, B_RIGHT / N
se_a = math.sqrt(pa * (1 - pa) / N)
se_b = math.sqrt(pb * (1 - pb) / N)
report("Unpaired", pa - pb, math.sqrt(se_a ** 2 + se_b ** 2))

# Paired: only the claims where the two models disagree add information.
diff = (ONLY_A - ONLY_B) / N
var = ((ONLY_A + ONLY_B) - (ONLY_A - ONLY_B) ** 2 / N) / (N * (N - 1))
report("Paired", diff, math.sqrt(var))
```

Output:

```text
Unpaired: gap 3.0 points, 95% range -1.4 to 7.4, p = 0.183
Paired: gap 3.0 points, 95% range 0.4 to 5.6, p = 0.023
```

The unpaired range runs from -1.4 to 7.4 points and includes zero, with a p-value of 0.18. The paired range runs from 0.4 to 5.6 points and excludes zero, with a p-value of 0.02. The gap is the same in both runs. Only the measuring changed.

## How many questions do you need before a gap can show?

Power is the chance that a test finds a gap that really exists. Small evals have wide ranges, so only big gaps can clear them. A 2-point lead on 150 questions will often look like noise, even when it is real.

Anthropic's team says the same in plain words: confidence intervals on a small eval tend to be wide, and small differences will likely go undetected. Miller's paper gives a sample-size formula for planning a test, so you can pick the number of questions before running it.

> **Tip:** Asked how big an eval should be? Say what gap matters to the business, then work out how many questions a paired test needs to see it. Don't promise a gap is real because the number is big.

Clustering makes it worse. Anthropic found that on popular evals, clustered standard errors can be over three times the naive ones. Ignoring that can make a team think a difference exists when none does.

Trying many versions adds risk too. If you test ten prompt versions and keep the best, one will look better by chance alone, so the winner's gap is often overstated.

### How would you report a model swap to a product lead?

The lead asks: should we switch to model A? The team has 400 past claims, and A scored 3 points higher on the same set.

- **Bare score: A is 3 points better.** One number, no range, no test. It sounds sure, and it can be wrong on a small set.
- **Range and test: A is probably ahead, by a little.** Paired range 0.4 to 5.6 points on the same 400 claims, plus the claim types where A loses. Then a decision on cost and risk.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A score is an estimate: give a range, not one number.
- [ ] The standard error and the 95% range, in plain words.
- [ ] A paired test on the same questions, and why it narrows the range.
- [ ] Significant does not mean worth shipping.
- [ ] Not significant does not mean equal: add questions or power the test.
- [ ] Clustered questions, and trying many versions, can make a win look real.

**Common traps**

- Trap: "A 3-point lead means the new model is better." Better: Check the range first. Unpaired, a 3-point lead on 400 claims can be luck. Paired, it can be real but small.
- Trap: "Overlapping error bars mean there is no difference." Better: A paired test can show a gap even when each model's own range overlaps the other's.
- Trap: "A p-value of 0.02 means a 98% chance the new model is better." Better: A p-value says how surprising the gap would be if the models were equal. It is not the chance that one is better.

## Can you spot the overclaim?

**Spot the overclaim:** Which line from a team's eval report overstates the result?

A. Model A: 90.0% on 400 claims, 95% range 87.1 to 92.9.
B. Same 400 claims, paired: A ahead by 3.0 points, 95% range 0.4 to 5.6.
C. Unpaired: A 90.0%, B 87.0%, range for the gap -1.4 to 7.4, so luck is possible.
D. A is 3 points better on every kind of claim, so switch all claims to A.

**Answer:** D. A gap is an average. A paired gap of 3 points does not show that A wins on every kind of claim, and its low end is only 0.4. Break the results down by claim type before switching.

**Quick check:** Model A beats model B by 2 points on a 150-question eval, and the 95% range for the gap includes zero. What is the honest next step?

A. Ship A, a 2-point lead is a win
B. Say it could be luck, then add questions or run a paired test
C. Conclude that B is better
D. Add a longer system prompt to A and re-run

**Answer:** B. The range includes zero, so the test cannot yet tell the models apart. More questions, or a paired comparison, may settle it. Whether to ship is a separate choice.

## Can you answer these from memory?

**Flash cards**

- **What is statistical significance?** Whether a gap between two models is bigger than the luck of which questions were picked.
- **What is the standard error?** How much a score would wobble with a different set of test questions.
- **Why use a paired test?** Both models answer the same claims, so shared luck cancels and the range narrows.
- **What is a p-value?** How surprising a gap this big would be if the two models were really equal.
- **Is not significant the same as equal?** No. The test could not tell them apart. More questions may show a real gap.
- **Why do small evals mislead?** Wide ranges, so only big gaps can show. Real but small gaps go undetected.

## Likely follow-up questions

- Q268 How many eval examples are enough? https://designervenkat.online/interview/ai/how-many-eval-examples-are-enough
- Q275 Eval scores dropped but the model is unchanged. How do you debug? https://designervenkat.online/interview/ai/eval-scores-dropped-model-unchanged
- Q280 Design an eval harness for a model release. https://designervenkat.online/interview/ai/design-an-eval-harness-for-a-model-release
- Q278 How do you evaluate an LLM classifier (confusion matrix)? https://designervenkat.online/interview/ai/how-do-you-evaluate-an-llm-classifier-confusion-matrix
- Q271 What are error analysis and transcript reading? https://designervenkat.online/interview/ai/what-are-error-analysis-and-transcript-reading

## Learn it in depth

- [Inferential statistics](https://designervenkat.online/learn/machine-learning/inferential-statistics)
