Own Weights

LLM eval statistical significance: is it really better?

Statistical significance for LLM evaluation: use paired tests and confidence intervals to tell a real accuracy gain from noise before you switch models.

Updated

Statistical significance in LLM evaluation means a score gap is bigger than the random noise in your test set. To check a model switch, score the current and new model on the same cases, then compute a confidence interval for the difference between them. If that interval sits fully above zero, the new model is probably better on your data, and a lucky test set is less likely to be the reason.

Start with the small case, not the headline number. The method below needs no statistics background. The llm evaluation guide covers how to build the test set itself.

Is a 2% accuracy improvement significant?

On its own, a 2% gain tells you very little. What matters is how many cases changed results between the two models.

Here is a hypothetical example with round numbers. Your test has 500 cases. The current model gets 400 right, 80%. The new model gets 410 right, 82%. Suppose 25 cases went from wrong to right and 15 went from right to wrong. The net gain is 10 cases, which is the 2 points. The noise in that net count comes from the 40 cases that changed. That gives a standard error of about 1.3 points, so a 95% interval runs from about minus 0.5 to plus 4.5 points. It crosses zero. The data does not yet show a gain.

Hypothetically, the same 2 point gain on 2,000 cases, with 120 going up and 80 going down, gives an interval from about 0.6 to 3.4 points. That clears zero.

A confidence interval for model accuracy alone is less useful for a switch. Each model’s own interval is wide, and the two often overlap even when the gap is real. Compare the difference instead.

What is a paired comparison of two AI models?

A paired comparison scores both models on the same cases and looks only at the cases where their results differ. Cases both models get right, or both get wrong, carry no information about which one is better. A hard case that drags both scores down together cancels out in the difference.

For each case, record one of three outcomes: only the new model is right, only the old model is right, or they match. Two separate averages throw that structure away. An unpaired comparison treats the two result sets as independent and needs more cases to reach the same certainty. Use the paired version whenever both models run on one test set.

How do you get a bootstrap confidence interval for a model comparison?

A bootstrap gives you an interval without assuming the scores follow a neat distribution. The steps:

  1. For each case, record +1 if only the new model is right, minus 1 if only the old model is right, and 0 if they match.
  2. Draw as many cases as your test has, with replacement, and average the values.
  3. Repeat step 2 at least 10,000 times.
  4. Sort the averages. The 2.5th and 97.5th percentiles give the 95% interval.

If the interval excludes zero, the new model is ahead on your data. If it straddles zero, you have not shown a gain. A short script or a spreadsheet can run this.

What sample size do you need to compare two AI models?

The number that matters is not the size of your dataset. It is the number of cases where the two models disagree. If they agree on 90% of cases, only the other 10% can separate them.

Hypothetically, say the models disagree on 10% of cases and you want to detect a real 2 point gap. You need roughly 1,000 cases before the interval reliably excludes zero, so a few thousand gives margin. The required size grows with the inverse square of the gap. Halve the gap and you need about four times as many cases. Small improvements are expensive to prove, which is why a clear result on a small test should make you suspicious, not confident.

To run the check, save one row per case showing which model got it right, decide in advance that the 95% interval for the difference must sit above zero and the gain must be at least the size you would act on, and report the number of disagreements beside the interval. If you score with cross-validation, run the bootstrap on the per-case rows from every fold together, and ask any vendor for the same per-case rows, not only averages. The full method is in how to build a test set.

When should you not switch models?

Keep the current model when the interval crosses zero. Collect more cases where the two models disagree, then test again. A result with no clear gain is still useful information.

A real gain can still be too small to act on. Hypothetically, a one point gain on a task that runs a few hundred times a month may not justify a migration and the review work. Weigh the gain against cost, latency and the effort to move. The accuracy benchmark guide explains what to check in any published score.

No statistic fixes a test set that does not look like production. Sample from real traffic, including the messy cases, or the interval will be precise about the wrong thing.

Fine-tuning is the wrong choice in some cases. It is a poor fit when you do not have enough examples to build a fair test, when the task changes every few weeks, or when your volume is too low to justify running your own model. A test set you can trust is the first thing to build, whatever model you end up with.

Before you test anything, Own Weights can run the free AI cost audit on your code. It shows which AI calls exist and what they cost, so you can pick the one task worth testing.

Questions

What is statistical significance in LLM evaluation?

It is a check that the score gap between two models is larger than the random noise in your test set. A gap that passes the check is unlikely to be luck of the draw. It does not tell you whether the gap matters for your business.

What is a confidence interval for model accuracy?

It is a range that likely contains a model's true accuracy on your kind of data, computed from how many cases you tested and how many were right. A wide range means the test set is too small to pin the score down. A narrow range is only as good as the cases behind it.

How many test cases do I need to compare two AI models?

Count the cases where the two models disagree, since only those cases tell you which one is better. Small gaps need many of them, so plan for a test that produces hundreds of disagreements, not a handful.

What is a paired comparison of two AI models?

Both models score the same test cases, and you look only at the cases where their results differ. Because the difficulty of each case cancels out, a paired test needs fewer cases than comparing two separate averages.

Is a 2% accuracy improvement significant?

Not by itself. Whether a 2 point gain is real depends on how many cases changed results between the two models and how many cases you tested. Run the paired check on your own test set before you decide.