- In short
- Sample size for an LLM experiment is calculated from three inputs: the minimum detectable effect, the baseline metric value, and the required confidence level. Because LLM output variance is higher than for deterministic systems, LLM experiments generally need larger samples than traditional software A/B tests to reach significance. An underpowered experiment cannot distinguish a real effect from noise. Statistical significance and practical significance are separate: a significant result can still be too small to justify the cost of shipping and maintaining the change.
The number that decides whether the result means anything
You can have a perfect hypothesis, random assignment, and a pre-specified metric, and still learn nothing, if the experiment is too small. Sample size is the component that determines whether the difference you observe between treatment and control is a real effect or just noise. The apply-level skill here is knowing what inputs set the required sample size, why LLM systems push that number higher, and why even a statistically significant result still has to clear a second, separate bar before you act on it.
- Sample size and statistical power
- Statistical power is an experiment's ability to detect a real effect if one exists. The required sample size is computed from three inputs: the minimum detectable effect (the smallest change worth catching), the baseline metric value, and the required confidence level. LLM systems, being probabilistic, have higher output variance and generally need larger samples. An underpowered experiment cannot separate signal from noise, and statistical significance does not by itself imply the effect is large enough to matter.
What sets the sample size
Three inputs determine how many observations per group you need. The minimum detectable effect is the smallest difference you care about catching, if you want to detect a 2% improvement you need far more data than if a 10% improvement is the smallest that would interest you, because small effects hide more easily in noise. The baseline metric value is where the control currently sits, which shapes the variance around the measurement. And the required confidence level is how sure you insist on being that the result is not chance, higher confidence demands more data.
These three feed a sample-size calculation you run before the experiment, not after. Running first and asking about power later is how teams end up with a result they cannot interpret. The confidence side is usually anchored to two conventions: a required confidence of about 95% (a 5% significance level) and 80% statistical power. To make the scale concrete, detecting a 5-point improvement over a 70% baseline success rate at those conventions needs on the order of 1,500 sessions per arm, so a live split running 800 requests a day reaches a usable sample in roughly four days. The number climbs steeply as the effect you want to catch shrinks.
Why LLM experiments need more data
The variance of the thing you are measuring drives how much data you need to see through it, and LLM outputs are noisier than deterministic software. The same prompt can produce different outputs, and quality varies across inputs in ways a deterministic system does not exhibit. That extra variance raises the noise floor, so a real effect of a given size is harder to distinguish, and the sample needed to distinguish it is correspondingly larger.
The practical takeaway is a rule of thumb: an LLM experiment generally needs a bigger sample than a traditional software A/B test aiming for the same confidence and the same effect size. Sizing an LLM experiment as if it were a deterministic one systematically underpowers it.
Two failures: underpowered, and significant-but-small
An underpowered experiment is one whose sample is too small for the effect it is trying to detect. Its defining property is that it cannot tell a real effect from noise, no matter how the numbers look. A team that eyeballs a 6-point gap on 50 sessions per arm and calls it a win has an underpowered experiment: the gap is inside the noise floor and can vanish at scale. The results looking convincing is not evidence; underpowered results always look like something.
The second failure is confusing statistical with practical significance. A statistically significant result means the observed difference is unlikely to be chance given the sample. It does not mean the difference is big enough to be worth having. A change can be significant yet tiny, and shipping it means taking on the operational cost of maintaining a new version for a gain too small to justify it. Both questions, is it real, and is it big enough to matter, must be answered before declaring a winner.
What the exam trips candidates on
The first trap is running a comparison on a small sample, such as 50 sessions per group, and treating an observed gap as a real effect without checking statistical power. A scenario will show a small-sample comparison with an encouraging difference; the credited reading identifies it as underpowered, the gap within the noise floor, and refuses to conclude an effect without an adequate sample.
The second trap is declaring a statistically significant result a winner without asking whether the effect size justifies the operational cost. A scenario will present a significant but small improvement and ask whether to ship; the correct answer separates statistical from practical significance and weighs the effect against the cost of shipping and maintaining the change.
Worked example
A team compares a new prompt to the current one over 50 sessions per arm and sees task success rise from 62% to 68%. They want to ship. Later, they run a much larger experiment and a genuinely significant 1.5% improvement appears. Should they ship in either case? Walk through the reasoning.
Take the two situations separately, because they fail on different bars.
The 50-session comparison is underpowered. Task success is a noisy metric on a probabilistic system, and a 6-point gap on samples that small is well within the range random variation can produce. The correct move is to compute the sample needed to detect a 6-point effect at the desired confidence, given the baseline and the elevated LLM variance, which will run into the hundreds per arm, and recognize that 50 cannot distinguish a real effect from noise. So the first "win" is not evidence of anything; shipping on it risks maintaining a version no better than the old one. The right action is to run the properly powered experiment, not to act on the small one.
The larger experiment then yields a statistically significant 1.5% improvement. Now the first bar, is the effect real, is cleared. But the second bar remains: is 1.5% large enough to justify the cost of shipping and maintaining the new prompt? Statistical significance says the effect is unlikely to be chance; it says nothing about whether 1.5% is worth the operational overhead, the added version to maintain, any cost or latency it carries, the switching risk. If secondary metrics held and 1.5% moves a business number the team cares about enough to outweigh the overhead, ship; if the gain is real but trivial relative to the cost, a significant result is still not a reason to ship.
The lesson is two-staged: first earn statistical significance with an adequately powered sample, then separately judge whether the significant effect is practically large enough to act on.
Common misreadings to avoid
Misconception
If a small comparison shows a clear gap, that gap is a real effect worth acting on.
What's actually true
Misconception
A statistically significant result is automatically worth shipping.
What's actually true
How this shows up on the exam
Domain 4 questions on this knowledge point present either a small-sample comparison treated as conclusive or a significant-but-tiny result treated as a win. The reliable moves are to size the experiment in advance from the minimum detectable effect, baseline, and confidence, allow for higher LLM variance, and separate statistical significance from practical significance before acting.
This quantifies the sample-size component of the five components of an A/B test and takes the numeric threshold from a falsifiable hypothesis as its minimum detectable effect. Undersizing is one leg of an underpowered, outcome-shopped experiment, the choice of test volume interacts with live versus shadow testing, and the variance intuition connects to token distribution skew, where averages likewise mislead.
A team sees task success rise from 62% to 68% over 50 sessions per arm and wants to deploy. What is the soundest response?
People also ask
How do you calculate sample size for an A/B test?
Why do LLM experiments need larger samples?
What is the difference between statistical and practical significance?
Watch and learn
Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.
No videos curated for this concept yet
We are still curating the best official and community videos for this topic.
Official prep for this domain
Anthropic's own free prep module for this part of the syllabus, on the official prep course. Free with an Anthropic Academy sign-in.
References & primary sources
Master this concept with Archie
Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.