Choosing a sample-size method
Choose what the study must learn, then match the sizing method to its outcome, comparison and dependence structure.
Fit
When it matters, and when it does not
It matters when
- You must choose between detecting an effect, estimating with useful precision or assessing a fixed design.
- Several calculators seem plausible, but their outcomes, comparisons or sampling units differ.
It matters less when
- The sample cannot grow. Start with attainable precision or a meaningful effect chosen before analysis. Read: Planning when the sample size is already fixed
- The design falls outside the supported calculations. Specify and validate a study-specific simulation. Read: Simulation-based power and sample-size planning
Before you start
What to check in your study
- The planning goal and quantity of interestsummaryMeasureframingChoose effect detection or interval precision. A noninferiority margin asks a different question from a superiority difference.
- Outcome, groups and dependenceoutcomeTypeclusteredrepeatedMeasuresDistinguish independent groups, paired records, clusters and repeated time points. Match the formula to the planned analysis.
- Defensible numerical assumptionsSource the target difference, spread, baseline risk, correlation and losses. Examine less favorable values.
- What can actually changeRecruitment may vary while wards, periods or time points stay fixed. A fixed-design power result is not a required recruitment total.
- The calculation sizes the planned question and analysis.How to check: Read its inputs and limits. A familiar test name alone does not establish a match.
- The numerical inputs represent plausible future data.How to check: Record sources and uncertainty. Never increase the assumed effect just to fit the budget.
Plain language
How it works
Start with the quantity that would change a decision. Detecting an effect needs power; estimating a value needs a useful interval width. A fixed design asks what the available observations can achieve. A model-capacity floor answers none of those questions on its own.
- Sample size for comparing two means: two independent groups and a continuous outcome.
- Sample size for a paired mean change: within-person differences, with the spread of those differences.
- Sample size for one mean against a target: a continuous mean and a fixed reference.
- Sample size for comparing three or more group means: a planned omnibus comparison across independent groups.
- Sample size for comparing two proportions: a difference between independent group risks.
- Sample size for one proportion against a benchmark: one risk compared with a fixed reference.
- Sample size to estimate a proportion to a set precision: an acceptable interval half-width.
- Sample size for a noninferiority comparison of proportions: a prespecified risk-difference margin.
- Sample size for a correlation: the association between two continuous measurements.
- Events and sample size for a log-rank test: event information first, then the expected event fraction.
- Sample size for estimating kappa: agreement precision, allowing for category frequency.
- Sample size for a diagnostic accuracy study: sensitivity and specificity precision, with disease prevalence.
Power for an interrupted time series simulates a count level-change test at fixed time points. Power for a stepped wedge trial uses a cross-sectional cluster-period variance at fixed clusters and periods. Both return power without a headline sample size.
Clustering, pairing, changing exposure and missing outcomes can require a different calculation. A generic simulation route records a specification; it does not execute a study-specific simulation. Use sourced inputs and inspect why a route gives no headline number.
Worked example
A worked example
- Setting
- A trial compares two independent groups on a continuous score, with equal allocation.
- Question
- Which route detects a clinically meaningful mean difference of 5 points?
- Approach
- Use comparing two means, with standard deviation 10, two-sided alpha 0.05 and target power 80 percent. Mallard uses the exact noncentral t.
- Result
- Each group needs 64 of 128 adults, or 50 in 100. Power at that total is 80.15 percent.
- What it means
- This is an independent-means example. It does not size paired change, a ward rollout, a precision goal or missing outcomes.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
A sizing method must match the question, outcome and dependence structure. A power result, precision requirement and events-per-variable floor are different answers.
- Using a superiority calculation for noninferiority.Instead: Prespecify the noninferiority margin and use a method for that question.
- Calling events per variable the final sample target.Instead: Treat it as a screening floor. Prediction models need modern performance-based planning beyond that rule.
- Forcing every route to yield a patient count.Instead: A fixed design can yield power alone. Unsupported or unrun methods need further planning before a target is justified.
Inside Mallard
How Mallard uses this
Mallard has distinct power, precision, fixed-design and guidance routes. This guide organizes their purposes; it does not change plan routing or run unsupported calculations.
concept.choosing_sample_size_method, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Statistical primer: sample size and power calculations-why, when and how? (opens in a new tab) · Eur J Cardiothorac Surg · doi 10.1093/ejcts/ezy169
- Reporting of sample size calculation in randomised controlled trials: review (opens in a new tab) · BMJ · doi 10.1136/bmj.b1732