BIOSTATISTICS • SAMPLING & ESTIMATION

Sample Size Planning

Determining the number of observations needed to detect meaningful effects with confidence and statistical power.

Historical Context & Motivation

The question of how many observations are needed to draw reliable conclusions has preoccupied scientists for well over a century. Early experimentalists in agriculture, medicine, and psychology often collected data in an ad hoc fashion, relying on intuition or convention to decide when they had gathered "enough" data. The consequences of this informal approach were substantial: studies frequently failed to detect real effects because they enrolled too few participants, or they wasted scarce resources by enrolling far more than necessary. Sample size planning emerged as a formal discipline precisely to address these twin problems — ensuring that studies are both powerful enough to detect genuine effects and efficient enough to avoid unnecessary cost and participant burden.

1925
Fisher's Statistical Methods
Ronald A. Fisher publishes Statistical Methods for Research Workers, formalizing hypothesis testing and significance levels. While Fisher did not develop explicit sample size formulas, his framework of p-values and the null hypothesis provided the conceptual scaffolding on which later power analysis would be built.
1933
Neyman–Pearson Framework
Jerzy Neyman and Egon Pearson introduce the concepts of Type I error (α) and Type II error (β), establishing the theoretical foundation for statistical power (1 − β). Their framework made it possible to ask, for the first time, how likely a test is to reject a false null hypothesis.
1969
Cohen's Power Analysis
Jacob Cohen publishes Statistical Power Analysis for the Behavioral Sciences, providing standardized effect-size conventions (small, medium, large) and practical tables for computing required sample sizes. This work democratized power analysis for applied researchers.
1990s
Regulatory Mandates & Software
Regulatory bodies such as the FDA and ICH begin requiring formal sample size justifications in clinical trial protocols. Software tools like PASS, G*Power, and SAS PROC POWER make sample size calculation accessible to researchers without extensive mathematical training.
2010s–Present
Precision-Based & Adaptive Designs
Contemporary biostatistics embraces precision-based approaches (targeting confidence interval widths rather than only power) and adaptive designs that allow sample size re-estimation during ongoing trials, reflecting a more nuanced understanding of uncertainty.

The central question that sample size planning addresses is deceptively simple: How many participants or observations must a study include to have a high probability of detecting a clinically or scientifically meaningful effect, while controlling the risk of false-positive findings? Answering this question requires simultaneously balancing statistical significance, power, effect size, and variability — the four pillars explored in the sections that follow.

Core Principles & Definitions

Sample size planning rests on the interplay of several fundamental quantities. Understanding each of these quantities — and how they relate to one another — is essential before applying any formula. The four primary ingredients are the significance level, statistical power, the expected effect size, and the variability of the outcome measure. A fifth consideration, the study design itself (e.g., paired vs. independent, one-sided vs. two-sided), modifies the specific formula used but does not alter the underlying logic.

1

Significance Level (α)

The probability of committing a Type I error — rejecting a true null hypothesis. Conventionally set at 0.05, meaning we accept a 5% chance of declaring a false positive. Lowering α (e.g., to 0.01) demands a larger sample.
2

Statistical Power (1 − β)

The probability of correctly rejecting a false null hypothesis — detecting a real effect when it exists. The Type II error rate β is typically set at 0.20 or 0.10, yielding power of 80% or 90% respectively.
3

Effect Size (δ or d)

The magnitude of the difference or association the study aims to detect. This may be expressed as a raw difference (e.g., 5 mmHg reduction in blood pressure) or a standardized metric (e.g., Cohen's d = 0.5). Smaller effects require larger samples.
4

Variability (σ)

The standard deviation of the outcome variable in the target population. Greater variability (noise) makes it harder to detect a signal, requiring more observations to achieve the same power.
5

Study Design Parameters

Whether the test is one-sided or two-sided, whether groups are independent or paired, the allocation ratio between groups, and the anticipated attrition rate all modify the required n. Two-sided tests and unequal allocation ratios generally require larger samples.
KEY TAKEAWAY
Think of sample size planning as tuning a radio receiver. The effect size is the strength of the broadcast signal, variability is the static noise, and sample size is the quality of your antenna. A weak signal (small effect) in a noisy environment (high variability) requires a very good antenna (large n) to pick it up clearly. Increasing power is like upgrading to a more sensitive antenna — you need more data to hear the signal above the noise.

Visual Explanation: The Power–Sample Size Relationship

The relationship between sample size and statistical power is not linear — it follows a sigmoidal curve that rises steeply at first and then plateaus as power approaches 1.0. The following diagram illustrates how three different effect sizes (small, medium, and large) produce distinct power curves as a function of sample size per group, holding α = 0.05 for a two-sided, two-sample t-test.

Each curve plots statistical power (1 − β) on the y-axis against sample size per group on the x-axis for a two-sample t-test at α = 0.05 (two-sided). The dashed line marks the conventional 80% power threshold. Note that detecting a small effect (d = 0.2) at 80% power requires roughly 400 participants per group, whereas a large effect (d = 0.8) needs only about 25 per group — a 16-fold difference.

Several insights emerge from this graph. First, the power curves are monotonically increasing but exhibit diminishing returns: once power exceeds approximately 90%, each additional participant contributes only marginally. Second, the vertical distance between the three curves at any given sample size vividly demonstrates how much the expected effect size drives the required n. Third, the horizontal dashed line at 0.80 illustrates a practical planning threshold — most funding agencies and institutional review boards expect at least 80% power, and many clinical trials target 90%. By reading the intersection of each curve with this threshold, researchers can estimate the minimum sample size for their anticipated effect.

Mathematical Framework

The mathematical foundations of sample size planning derive from the Neyman–Pearson lemma and the distributional properties of test statistics under both the null and alternative hypotheses. Although specific formulas differ by study design and statistical test, most follow a common structural pattern: sample size increases with the square of the critical-value components and decreases with the square of the standardized effect size. We present the most widely used formulas below.

Two-Sample t-Test (Equal Groups)

SAMPLE SIZE PER GROUP — TWO-SAMPLE T-TEST
n = (z₁₋α/₂ + z₁₋β)² × 2σ² / (μ₁ − μ₂)²
Where n = sample size per group; z₁₋α/₂ = upper (1 − α/2) quantile of the standard normal (1.96 for α = 0.05, two-sided); z₁₋β = upper (1 − β) quantile (0.842 for 80% power, 1.282 for 90% power); σ = common standard deviation; (μ₁ − μ₂) = true mean difference between groups.

When the effect size is expressed in standardized form as Cohen's d = (μ₁ − μ₂) / σ, the formula simplifies because σ cancels partially. The equation can be rewritten as n = 2(z₁₋α/₂ + z₁₋β)² / d². This form is particularly convenient during the planning stage when an exact σ may not be available but a standardized effect size can be estimated from prior literature or pilot data.

STANDARDIZED FORM
n = 2 × (z₁₋α/₂ + z₁₋β)² / d²
Where d = Cohen's d = (μ₁ − μ₂)/σ. Cohen's benchmarks: small = 0.2, medium = 0.5, large = 0.8.

Sample Size for Estimating a Proportion

PROPORTION — CONFIDENCE INTERVAL WIDTH
n = z₁₋α/₂² × p(1 − p) / E²
Where p = anticipated proportion; E = desired margin of error (half-width of the confidence interval). When p is unknown, use p = 0.5 for the most conservative estimate.

Comparison of Two Proportions

TWO-PROPORTION TEST (EQUAL GROUPS)
n = (z₁₋α/₂√[2p̄(1−p̄)] + z₁₋β√[p₁(1−p₁)+p₂(1−p₂)])² / (p₁ − p₂)²
Where p₁ and p₂ are the expected proportions in each group; = (p₁ + p₂)/2 is the pooled proportion under the null hypothesis.
Adjusting for Attrition
In practice, not all enrolled participants will complete the study. To account for anticipated dropout, inflate the calculated sample size by dividing by (1 − dropout rate). For example, if 15% attrition is expected: nadjusted = n / (1 − 0.15) = n / 0.85.

Detailed Breakdown: Factors That Drive Sample Size

Understanding the directional influence of each parameter on the required sample size is critical for practical planning. The table below summarizes how changing each input — while holding all others constant — affects n. Following the table, a detailed diagram illustrates the relationships among these factors visually.

Directional effects of key parameters on required sample size
ParameterChangeEffect on Required nRationale
Significance level (α)Decrease (0.05 → 0.01)↑ IncreasesA stricter threshold requires more evidence to reject H₀
Power (1 − β)Increase (0.80 → 0.90)↑ IncreasesHigher sensitivity to detect true effects requires more data
Effect size (d or Δ)Decrease (smaller effect)↑ IncreasesSubtler differences are harder to distinguish from noise
Variability (σ)Increase↑ IncreasesMore noise obscures the signal, requiring more observations
Test sidednessOne-sided → Two-sided↑ IncreasesTwo-sided tests split α across both tails, raising the z critical value
Allocation ratio (k)Unequal (e.g., 2:1)↑ Increases total NUnbalanced groups are less efficient than equal allocation
This influence diagram shows how each input feeds into the required sample size. Arrows converge on the central Required n box, with the directional effect annotated beneath each input parameter. Lowering α, increasing power, reducing the target effect size, or increasing population variability all push n upward.

Notice that sample size is inversely proportional to the square of the effect size. This quadratic relationship has a profound practical implication: halving the effect size you wish to detect quadruples the required sample size. Conversely, moving from 80% to 90% power — a seemingly modest increase — raises the z₁₋β value from 0.842 to 1.282, which typically increases n by about 30%. These nonlinear sensitivities underscore why careful thought about the minimally clinically important difference (MCID) is so consequential during the planning phase.

Worked Example: Planning a Clinical Trial

A research team is designing a randomized controlled trial to test whether a new antihypertensive drug reduces systolic blood pressure (SBP) more effectively than standard therapy. Based on pilot data, the common standard deviation of SBP change is σ = 12 mmHg. The team considers a clinically meaningful difference of 5 mmHg between treatment and control. They want 80% power at a two-sided significance level of 0.05, and they anticipate a 10% dropout rate.

Sample Size for a Two-Sample t-Test with Attrition Adjustment
1
Step 1 — Identify Given ValuesWe have the following inputs: the clinically meaningful difference Δ = μ₁ − μ₂ = 5 mmHg, the common standard deviation σ = 12 mmHg, the significance level α = 0.05 (two-sided), the desired power 1 − β = 0.80, and the anticipated dropout rate = 10%.
Δ = 5, σ = 12, α = 0.05, power = 0.80, dropout = 10%
2
Step 2 — Look Up z-ValuesFor a two-sided test at α = 0.05, the critical z-value is z₁₋α/₂ = z₀.₉₇₅ = 1.960. For 80% power, z₁₋β = z₀.₈₀ = 0.842.
z₁₋α/₂ = 1.960, z₁₋β = 0.842
3
Step 3 — Apply the FormulaUsing n = (z₁₋α/₂ + z₁₋β)² × 2σ² / Δ², we substitute: n = (1.960 + 0.842)² × 2 × (12)² / (5)². First compute (1.960 + 0.842)² = (2.802)² = 7.851. Then 2σ² = 2 × 144 = 288. The denominator is Δ² = 25.
n = 7.851 × 288 / 25 = 2261.1 / 25 = 90.4
4
Step 4 — Round UpSince we cannot enroll a fraction of a participant, we round up to the nearest whole number. The unadjusted sample size per group is 91.
n = 91 per group (unadjusted)
5
Step 5 — Adjust for AttritionDividing by (1 − dropout rate) to account for 10% attrition: n_adjusted = 91 / (1 − 0.10) = 91 / 0.90 = 101.1, which rounds up to 102.
n_adjusted = 102 per group → Total N = 204
Verification via Cohen's d
As a sanity check, Cohen's d = 5/12 ≈ 0.417, which falls between the "small" (0.2) and "medium" (0.5) benchmarks. For d = 0.5, the rule-of-thumb n is about 64 per group; for d = 0.2, it jumps to roughly 394. Our result of 91 per group for d ≈ 0.42 is consistent with these benchmarks, sitting between the two extremes.

Power-Based vs. Precision-Based Planning

The formulas presented so far represent the power-based approach, which focuses on achieving a desired probability of rejecting the null hypothesis. An alternative philosophy, the precision-based approach (also called accuracy in parameter estimation, or AIPE), targets the width of a confidence interval rather than the probability of a significant test. Both approaches have distinct strengths and limitations, and modern biostatistical practice increasingly recognizes the value of considering both.

Comparison of power-based and precision-based sample size planning approaches
FeaturePower-Based (NHST)Precision-Based (AIPE)
Primary goalAchieve a high probability (e.g., 80%) of rejecting H₀ when H₁ is trueObtain a sufficiently narrow confidence interval around the estimate
Key inputsα, β, effect size, σDesired CI half-width (margin of error), σ, confidence level
Typical applicationConfirmatory trials (Phase III), superiority/non-inferiority designsDescriptive studies, prevalence surveys, pilot studies estimating parameters
StrengthsDirectly tied to hypothesis testing decisions; widely understood and required by regulatorsDoes not require specifying an effect size; focuses on estimation quality
LimitationsRequires specifying an anticipated effect size, which is often uncertain; focuses on a dichotomous reject/fail-to-reject decisionMay not guarantee sufficient power for a formal test; less commonly required by regulatory agencies
KEY TAKEAWAY
Power-based planning asks, "Will my study produce a statistically significant result if the effect is real?" Precision-based planning asks, "Will my study produce an estimate precise enough to be useful?" Think of it like navigating with a compass: power-based planning ensures the compass needle will reliably point north (detecting the true direction), while precision-based planning ensures the bearing is accurate to within a few degrees (narrow confidence interval). Both matter, and the best study protocols consider both perspectives.

Connections to Advanced & Adaptive Methods

The classical fixed-sample approach described in this lesson assumes that all planning parameters (σ, effect size, dropout rate) are known with reasonable certainty before the study begins. In reality, these quantities are often estimated from limited pilot data and may be inaccurate. Modern biostatistics has developed several advanced strategies that relax this assumption, offering greater flexibility and often improved efficiency.

Classical vs. advanced sample size planning approaches
Classical ApproachAdvanced ApproachKey Innovation
Fixed sample size determined before study beginsAdaptive sample size re-estimationInterim analysis of blinded or unblinded data allows n to be adjusted mid-trial without inflating Type I error
Single primary endpointGroup sequential designsMultiple interim looks at the data with spending functions (e.g., O'Brien–Fleming) that allocate α across analyses, potentially stopping early for efficacy or futility
Frequentist (z or t) frameworkBayesian sample size determinationIncorporates prior distributions on parameters; sample size chosen to achieve a desired posterior probability or Bayes factor threshold
Simple randomizationCluster-randomized designsAccounts for intra-cluster correlation (ICC) using a design effect: n_effective = n × [1 + (m − 1) × ICC], where m = cluster size

These advanced techniques represent a natural evolution of the principles covered in this lesson. Adaptive designs are particularly relevant in modern clinical trial practice, where regulatory agencies (FDA, EMA) now have formal guidance documents for their implementation. The key insight is that the classical formulas you have learned here provide the conceptual bedrock — they define the trade-offs among α, power, effect size, and variability — while advanced methods offer practical mechanisms to handle the inevitable uncertainty in these inputs. A strong understanding of the fixed-sample framework is therefore essential before moving to adaptive or Bayesian extensions.

🔭 Looking Ahead
If you pursue graduate coursework in biostatistics or clinical trial methodology, you will encounter simulation-based sample size planning, where thousands of virtual trials are generated under plausible parameter distributions to identify the sample size that meets performance criteria (e.g., average power ≥ 80% across a range of scenarios). This approach is especially valuable when no closed-form formula exists for complex designs.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why halving the effect size you wish to detect quadruples (rather than merely doubles) the required sample size, referencing the structure of the sample size formula.
PROBLEM 2BASIC CALCULATION
Calculate the required sample size per group for a two-sample t-test with the following parameters: α = 0.05 (two-sided), power = 0.80, σ = 10, and clinically meaningful difference Δ = 4. Use z₁₋α/₂ = 1.960 and z₁₋β = 0.842.
PROBLEM 3INTERMEDIATE
A researcher has computed n = 64 per group for a study with 80% power. The funding agency requests 90% power instead. By what factor does the required n increase, and what is the new sample size per group? (Use z₀.₈₀ = 0.842 and z₀.₉₀ = 1.282.)
PROBLEM 4APPLIED
A public health team plans a survey to estimate the prevalence of hypertension in a community. They want the 95% confidence interval to have a margin of error of ±3 percentage points. Prior studies suggest the prevalence is approximately 30%. How many individuals should be surveyed? If the dropout rate is expected to be 20%, what is the adjusted sample size?
PROBLEM 5CRITICAL THINKING
A colleague plans a two-arm clinical trial and calculates n = 50 per group based on a large effect size (d = 0.8) from a single pilot study with only 15 participants. Critique this approach. What are the risks, and what alternative strategies would you recommend for a more robust sample size justification?

Summary

Sample size planning is the process of determining the number of observations required for a study to achieve its inferential goals — whether that means detecting a true effect with high statistical power or estimating a parameter with sufficient precision. The four pillars of any power-based calculation are the significance level (α), power (1 − β), the anticipated effect size, and the variability (σ) of the outcome measure. The canonical formula for a two-sample t-test, n = 2(z₁₋α/₂ + z₁₋β)² / d², reveals the critical quadratic relationship between effect size and required n.

In practice, researchers must also account for attrition, choose between power-based and precision-based approaches, consider design parameters such as sidedness and allocation ratio, and conduct sensitivity analyses across plausible parameter ranges. Advanced methods including adaptive sample size re-estimation, group sequential designs, and Bayesian determination extend the classical framework to handle uncertainty in planning parameters. Mastering these concepts ensures that studies are designed to be both scientifically rigorous and ethically responsible — enrolling enough participants to answer the research question but no more than necessary.

Varsity Tutors • Biostatistics • Sample Size Planning