Sample size

On this page
  1. Definition
  2. How to compute
  3. Pitfalls

Definition

Sample size is how many observations you need to detect an effect of a given size at a chosen significance and power. It is a calculation made before the experiment, not a consequence of the data already collected.

How to compute

To compare two means, observations per arm scale with the square of the summed critical values divided by the squared ratio of the effect to the standard deviation. Halving the effect you want to catch quadruples the sample. Take the variance from history and the effect from the MDE the product deems meaningful.

Pitfalls

Computing sample size from the observed effect and then quoting power is circular: a weak effect demands a huge sample, so post-hoc power is almost always low. Underestimating the variance understates the required sample. Several metrics in one test need a correction, or none of them keeps its power.

Related terms

Mentioned in

Connections map

Interactive subgraph: 6 nodes and 12 links around this page. Each node is keyboard-focusable; press Enter or Space to open its page. A full list of nodes and their links follows the graphic.

  • A/B test : Statistical power (Explicit link), Minimum detectable effect (MDE) (Explicit link), Sample size (Explicit link), ab-testing (Thematic link)
  • Bootstrap : Sample size (Explicit link), ab-testing (Thematic link)
  • Minimum detectable effect (MDE) : A/B test (Explicit link), Statistical power (Explicit link), Sample size (Explicit link), ab-testing (Thematic link)
  • Sample size : Statistical power (Explicit link), Minimum detectable effect (MDE) (Explicit link), A/B test (Explicit link), Bootstrap (Explicit link), ab-testing (Thematic link)
  • Statistical power : A/B test (Explicit link), Minimum detectable effect (MDE) (Explicit link), Sample size (Explicit link), ab-testing (Thematic link)
  • ab-testing : A/B test (Thematic link), Bootstrap (Thematic link), Minimum detectable effect (MDE) (Thematic link), Sample size (Thematic link), Statistical power (Thematic link)

Terms, articles and projects connected to this concept. Hover a node to see its name; click to open.

← All terms