Sample size and statistical power
What question does this help answer?
“How much information is needed for this study to estimate the effect precisely enough or have a reasonable chance of detecting a scientifically important effect?”
Why it matters
A sample-size calculation is meaningful only after the primary objective, outcome, analysis, and clinically important effect or precision target are clear.
What power looks like
How Mallard may use this concept
Mallard may recommend a power or precision calculation after it has specified the primary estimand, outcome type, comparison, and analysis. It should avoid generating a single sample-size number from vague assumptions.
When ordinary power is not the right answer
- Precision: choose a confidence-interval width that is narrow enough to change a clinical or operational decision.
- Fixed design: when the available dataset, time grid, clusters or eligible studies are fixed, report attainable precision or a prespecified minimum detectable effect rather than reverse-engineering a target sample.
- Rule of thumb: events-per-variable or subjects-per-variable is a model-stability floor, not statistical power and not a final recommendation when a better effect- or precision-based method exists.
- Bespoke simulation: use the complete data-generating and analysis models when clustering, repeated measures, mediation, recurrent events or another structure defeats the standard formulas.
- Not applicable: an interval method, sensitivity analysis or presentation step is not sized on its own; size the primary scientific analysis it supports.
What a reproducible simulation reports
Prespecify the estimand, data-generating model, analysis model, nuisance parameters, missingness and fit-failure rules. Report the random seed, attempted replicates, successful fits, failed fits, estimated power and Monte Carlo standard error; a percentage with none of those is not a reproducible operating characteristic.
How the plan, Learn page and code stay connected
Each Mallard aim records its sizing approach, why that approach fits, the inputs still required and the next action. The generated R or Python code is selected from that same route in the public Mallard Code Library, so the plan cannot quietly point to a different calculation from the one its code runs.
Inputs commonly required
- Primary outcome and effect measure
- Clinically meaningful effect or target precision
- Outcome prevalence, variance, or event rate
- Type I error rate when hypothesis testing is used
- Desired power
- Allocation ratio
- Attrition or missingness assumptions
- Clustering, repeated measures, design effects, or number of events when applicable
What to watch out for
Using an optimistic effect size can make a study look artificially feasible. A nonsignificant result from a low-powered study is not evidence of no effect. A model-stability rule is only a floor, not power. A simulation without its seed, successful and failed fits, and Monte Carlo uncertainty is not reproducible. Conversely, a very large study can identify effects that are statistically precise but clinically trivial.
Clinical example
For an RCT with a binary primary outcome, estimate the required number of participants using the expected event rates in each arm, the target power, alpha, allocation ratio, and expected attrition.
- Sample Size Considerations: Basics for Preparing Clinical or Basic Research (opens in a new tab) · Ann Nucl Cardiol · doi 10.17996/anc.20-00122
- 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