Ask Mallard
Core concept

Choosing a sample-size method

6 min read

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

Before you start

What to check in your study

Decide these first
  1. The planning goal and quantity of interestsummaryMeasureframingChoose effect detection or interval precision. A noninferiority margin asks a different question from a superiority difference.
  2. Outcome, groups and dependenceoutcomeTypeclusteredrepeatedMeasuresDistinguish independent groups, paired records, clusters and repeated time points. Match the formula to the planned analysis.
  3. Defensible numerical assumptionsSource the target difference, spread, baseline risk, correlation and losses. Examine less favorable values.
  4. 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.
It rests on these
  1. 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.
  2. 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.

Match the question to the calculation
Three parallel sizing questions: detection of an important effect calls for power; interval width calls for precision; event and parameter counts screen model capacity. A capacity floor establishes neither power nor adequate prediction.Match the assessment to the questionDetect an important effectEstimate with a usefulintervalScreen events andparametersPower for the planneddesignAttainable precisionHistorical capacity floorA floor is not power or adequate prediction. A fixed dataset constrains all three assessments; it does notmake them interchangeable.
Conceptual diagram. It shows the structure of the idea, not data from any study.
Mean outcomes
  • 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.
Proportions and margins
  • 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.
Association, events and precision
  • 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.
Fixed designs

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.

Check the limits before choosing

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

Invented for illustration
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

Searching PubMed…

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.

No Mallard code example points to this page.
Atlas node concept.choosing_sample_size_method, the id a plan cue records.

Related Learn pages

Related designs and methods

Evidence

Sources & further reading

  1. 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
  2. Reporting of sample size calculation in randomised controlled trials: review (opens in a new tab) · BMJ · doi 10.1136/bmj.b1732
Prepared with AI assistance. PubMed source records were checked for title, authors, year and DOI on 2026-11-07. The sources explain the methods; engine tests verify the separate Mallard implementation claims. No independent professional approval is claimed.
Last source review: 2026-11-07
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.