AI Engineeringcalculator

Eval sample size planner

An eval score is a measurement, and every measurement has error. 82% on 200 items and 82% on 2,000 items are not the same result: the true accuracy behind the first could plausibly be anywhere from about 76% to 87%.

What do you want to know?
95% interval

At 95% confidence, the accuracy runs from 76.1% to 86.7%: about ±5.3 pts.

Accuracy82%164 of 200 items
Wilson
Wald

Your numbers

Accuracy 82%

Confidence level

The detail

95% Wilson interval76.1% to 86.7%About ±5.3 pts
95% Wald interval76.7% to 87.3%The textbook p ± z·SE
02040101001K10K100KItems (log scale)Interval width (points)200 items: ±5.3 pts
Wilson intervalWald interval

What it shows

The tool treats each item as pass or fail and assumes the items are a random sample from the tasks you care about. It can’t fix a test set that doesn’t represent real use, or items that leaked into training data.

Pick what you want to know: how sure you can be of one score, whether model A beats model B on the same items, a verdict on two scores you already have, or how many items to run.

How to read it

  • One score: the Wilson interval is the range of true accuracies consistent with your result. The Wald interval is the textbook p ± z·SE. It breaks near 0% or 100% or with few items, and the tool flags it.
  • The chart plots interval width against items: solid is Wilson, dashed is Wald. Halving the width takes four times as many items.
  • Compare two: only items where the models disagree carry evidence. The exact p-value is a binomial test on them. The chi-squared p-value is a large-sample approximation. If they disagree, trust the exact one.
  • Check a result: enter correct and total for each model. Turn on “Both models answered the same items” and add the only-A and only-B counts to use McNemar’s test. Otherwise it runs a two-proportion z-test.
  • Plan a sample: items per model assumes independent samples and detects the gain you set at the chosen significance and power. Items for ± gives the size to report one score within that margin.
  • The verdict compares the p-value with one minus the confidence level. It says whether the gap is distinguishable from noise, not whether it matters.

Questions

Why Wilson and not the usual p ± 1.96 standard errors?

The usual (Wald) interval can have coverage well below its stated level, and it misbehaves near 0% and 100%, where many evals live. Brown, Cai and DasGupta showed this in 2001 and recommended alternatives, including the Wilson interval, which Edwin Wilson published in 1927.

Why does McNemar’s test ignore the items both models got right?

Items both models got right, or both got wrong, look the same whichever model is better, so they carry no evidence about the difference. If the two models were equally good, each disagreement would be equally likely to go either way; the test asks how surprising the actual split is.

Can I use the planning numbers for a paired eval?

They assume each model is scored on its own independent sample, which is the cautious case. Running both models on the same items usually needs fewer, because the items both get right or both get wrong drop out. How many fewer depends on how often the models disagree.

What if my eval uses a graded score, not pass or fail?

This calculator is for pass or fail items. For scores on a scale, the same ideas apply, but the intervals and tests are different.

Does a significant result mean the gain matters?

No. Significance says the difference is unlikely to be noise on this test set. Whether a 1-point gain is worth shipping is a product decision, and a test set that doesn’t match real use can make any result misleading.

Which test should I use to check a result?

If both models answered the same items, use the paired test: it ignores items where they agree and is usually more sensitive. If they answered different items, or you only have totals, use the unpaired test. Using the unpaired test on paired data is valid but loses power.

Why Newcombe’s interval for the difference?

The simple interval for a difference (each score ± 1.96 standard errors) has the same problems as the Wald interval for one score. Newcombe’s hybrid score method builds the difference interval from the Wilson intervals of the two scores, and in his comparison of eleven methods the hybrid score methods held their coverage well, including near 0% and 100%. The paired option uses a simpler Wald interval, which is rough with few disagreements, so read its p-value first.

Sources

Explore further

Last updated

More tools

All tools

Your first senior-level
lesson is free.

Choose a course, open a free lesson, and explore an idea you’ve wanted to understand.