Sample size for a noninferiority comparison of proportions
Plan against an unacceptable loss in outcome risk, using a prespecified margin rather than a superiority difference to detect.
Why this level?
The design family and its defining features have not been specified for this hierarchy. NHMRC 2009 sourceThis page sizes a binary comparison without specifying its assignment mechanism or comparator design. A sample-size calculation alone cannot establish an intervention evidence level; assess the actual trial design separately.
Fit
When to use it, and when not to
Use it when
- You compare a new and reference treatment using a binary outcome.
- You have justified the largest acceptable loss and the direction that means worse.
Not when
- You seek superiority rather than ruling out unacceptable loss. Use two-proportion sizing. Read: Sample size for comparing two proportions
- You seek equivalence within two margins. Plan for the equivalence analysis. Read: Equivalence analysis: two one-sided tests
- People are clustered or outcomes repeated. Use a design-specific calculation. Read: Simulation-based power and sample-size planning
Before you start
What you need
- Reference risk, pRefEnter a proportion strictly between 0 and 1.
- Expected new-treatment risk, pNewA blank value assumes the reference risk. Otherwise enter a proportion strictly between 0 and 1.
- Acceptable absolute loss, marginEnter a positive risk difference less than 1. Justify it clinically before recruitment.
- Direction of harm, worseIsUse higher for harms or lower for benefits. The default is higher.
- One-sided false-positive threshold, alphaThe default is 0.025. It is not automatically halved.
- Target power, powerThe default is 0.9.
- Allocation ratio, ratioEnter the number receiving the new treatment per reference participant; the default is equal groups.
- The margin preserves a clinically acceptable outcome.How to check: Justify the reference evidence and a stable treatment effect in the trial setting.
- The trial can distinguish meaningful loss.How to check: Plan adherence, follow-up and both analysis populations; blurred groups can hide inferiority.
- Independent binary outcomes support the unpooled normal approximation.How to check: Check sparse outcomes and confirm the final analysis matches the planning assumptions.
Plain language
How it works
The engine signs the expected risk difference so positive means worse. It subtracts this expected loss from the margin. If no positive gap remains, it returns no sample size. It adds the one-sided alpha and target-power normal quantiles. Their squared sum multiplies the unpooled risk variance, divided by the squared gap. It rounds reference size up, then rounds its ratio-scaled new-group size up.
This is not the restricted maximum-likelihood procedure discussed by Farrington and Manning. It sizes one comparison at assumed risks. Choosing a sample-size method helps you match the planning question to the right inputs.
Worked example
A worked example
- Setting
- A trial compares remote and clinic follow-up using readmission.
- Question
- What size rules out an excess of 5 percentage points if both risks are 20%, or 20 in 100?
- Approach
- Set pRef=0.20, pNew=0.20, margin=0.05, worseIs=higher, alpha=0.025, power=0.90 and ratio=1.
- Result
- Mallard returns 1,345 reference and 1,345 new participants: 2,690 total. At that total, approximate power is 90.0%.
- What it means
- The count covers one analysis at the assumed risks. A second required analysis population and losses need additional planning.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
The margin must be justified clinically before outcomes are seen. This unpooled normal approximation sizes one analysis and includes no allowance for losses or a joint intention-to-treat and per-protocol requirement.
- Choosing the margin to fit the available sample.Instead: Justify acceptable loss clinically before checking feasibility.
- Using a nonsignificant superiority result to claim noninferiority.Instead: Compare the prespecified bound with the justified margin.
- Ignoring expected loss under the new treatment.Instead: The gap between expected loss and the margin drives the calculation.
Inside Mallard
How Mallard uses this
For noninferiorityProportions, Mallard returns reference and new-group counts, their total and approximate power at a chosen total. It sizes one analysis without losses.
design.sample_size_noninferiority_proportions, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Test statistics and sample size formulae for comparative binomial trials with null hypothesis of non-zero risk difference or non-unity relative risk (opens in a new tab) · Stat Med · doi 10.1002/sim.4780091208
- Reporting of noninferiority and equivalence randomized trials: extension of the CONSORT 2010 statement (opens in a new tab) · JAMA · doi 10.1001/jama.2012.87802