Sampling Noise Lab

Why your scorecard lies when n is small

The Scenario

You’ve built an AI system (a chatbot, a summarizer, a classifier). To evaluate it, you run it on n test queries and have an LLM judge score each output from 1 to 5 on four metrics: Correctness, Helpfulness, Tone, and Completeness. You average the scores and get a scorecard. That scorecard is your basis for shipping (or not).

The problem: that scorecard is one random sample. Run the same evaluation again with a different set of n queries from the same population, and you’ll get different numbers. At small n, the numbers can be wildly different — different enough to change your decision.

What to Try

  1. Set the true scores on the left (these are the “real” quality of your system, which you normally don’t know).
  2. Set n = 20 and click Run Evaluation several times. Watch the scorecard change each time — same system, different measurement.
  3. Now set n = 500 and click again. The scorecard barely moves. That’s the effect of sample size.
  4. Click Run 100 Evaluations to see the full sampling distribution — how much the measured mean varies across repeated experiments.
  5. Toggle on Beta posteriors and Bootstrap distributions to see two ways of quantifying the uncertainty.

The Key Insight

A single evaluation gives you a point estimate, not the truth. The truth is a distribution of possible measurements. Without a confidence interval, your scorecard is meaningless — you don’t know if “4.1” means “somewhere between 3.5 and 4.7” (useless) or “between 4.0 and 4.2” (actionable).

Three Ways to Quantify Uncertainty

Method How it works When to use
Confidence interval mean ± z · (std / √n). Assumes approximate normality (works well for n > 30 by CLT). Quick sanity check. Always report this alongside any point estimate.
Beta posterior Binarize scores (≥4 = “good”). Count successes k out of n. Posterior is Beta(k+1, n−k+1). The full curve shows your uncertainty about the “good rate.” When you care about a pass/fail threshold (e.g., “what fraction of outputs are good enough?”). Exact — no normality assumption needed.
Bootstrap Resample your n scores with replacement 5,000 times. Each resample gives a different mean. The spread of these means is your uncertainty. Works for any statistic (mean, median, percentile) and any distribution. No assumptions. The workhorse method.

Does More Data Help?

Yes — this is the one source of uncertainty where more data is a clean fix. The standard error of the mean shrinks as 1/√n. Double n, uncertainty shrinks by ~30%. Quadruple n, it halves. The beta posterior tightens, the bootstrap distribution narrows. Try it: drag n from 20 to 200 and watch the uncertainty collapse.

But beware: this only fixes sampling noise. If your sample is biased, your judge is noisy, or your prompt is brittle, more data gives you a very precise wrong answer. Sampling noise is source #1 of 9 — the easy one.

Setup: True Scores

Set the true average score and spread for each metric. Spread controls how much individual scores vary around the mean: high spread means some outputs score 2 and others score 5, even though the average is 3.8. Low spread means most outputs score close to the mean.

Correctness
3.8 / 5
medium
Helpfulness
4.1 / 5
medium
Tone
4.3 / 5
medium
Completeness
3.6 / 5
medium

Run Evaluation — Draws n random samples from the true score distribution and computes the average for each of the 4 metrics. You'll see scorecard bars, a histogram of sampled scores, and 95% confidence intervals. Each click re-randomizes — the scores jitter around the truth, and that jitter IS the lesson.

Run 100 Evaluations — Repeats the evaluation 100 times and plots the sampling distribution of the mean. Shows how the average itself is a random variable, with a bell-shaped spread around the true score. The CI overlay shows the 95% range across runs.

Analysis Options
Set true scores and sample size,
then hit Run Evaluation

Click repeatedly to see how much the scorecard wobbles