How does test set size affect the uncertainty of a test-set metric?

Quick Overview

Explains how the size of a test set controls the standard error of an evaluation metric such as accuracy or recall. Tests whether you can size a test set, reason about effective sample size, and tell a real model improvement from sampling noise.

How does test set size affect the uncertainty of a test-set metric?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How does test set size affect the uncertainty of a test-set metric? For example, how much more precise is an accuracy estimate computed on 10,000 examples than one computed on 1,000, and what does that mean when you compare two models on the same test set? ```hint Start from a proportion Accuracy is the mean of 0/1 outcomes. Write down its standard error and look at how it changes with n. ``` ```hint Count what really drives n For recall, subgroup metrics, or data with several rows per user, ask how many independent observations the metric actually rests on. ``` ### What a Strong Answer Covers - How the standard error of a metric scales with test set size, and what that implies about the value of adding more test data. - A worked interval for a concrete metric such as accuracy at two different test set sizes. - Why the effective sample size can be much smaller than the row count (rare positives, subgroups, correlated rows). - How test set size limits the smallest model difference you can detect, including paired comparisons and sizing by power calculation. - How to report the metric, and what repeated reuse of one test set does to the reported number. ### Follow-up Questions - How would you put a confidence interval on AUC or F1, where there is no simple closed-form standard error? - Two models are scored on the same 2,000 examples and differ by 0.8 percentage points in accuracy. How do you decide whether the difference is real? - Each user contributes many rows to your test set. How do you compute an interval that accounts for that? - Your team has evaluated dozens of model variants on the same test set. Why is the best score now optimistic, and what would you change?

Overview: Explains how the size of a test set controls the standard error of an evaluation metric such as accuracy or recall. Tests whether you can size a test set, reason about effective sample size, and tell a real model improvement from sampling noise.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

How does test set size affect the uncertainty of a test-set metric?

For example, how much more precise is an accuracy estimate computed on 10,000 examples than one computed on 1,000, and what does that mean when you compare two models on the same test set?

What a Strong Answer Covers Guidance

  • How the standard error of a metric scales with test set size, and what that implies about the value of adding more test data.
  • A worked interval for a concrete metric such as accuracy at two different test set sizes.
  • Why the effective sample size can be much smaller than the row count (rare positives, subgroups, correlated rows).
  • How test set size limits the smallest model difference you can detect, including paired comparisons and sizing by power calculation.
  • How to report the metric, and what repeated reuse of one test set does to the reported number.

Follow-up Questions Guidance

  • How would you put a confidence interval on AUC or F1, where there is no simple closed-form standard error?
  • Two models are scored on the same 2,000 examples and differ by 0.8 percentage points in accuracy. How do you decide whether the difference is real?
  • Each user contributes many rows to your test set. How do you compute an interval that accounts for that?
  • Your team has evaluated dozens of model variants on the same test set. Why is the best score now optimistic, and what would you change?