Sample size for one mean against a target
Size one sample to detect a meaningful mean difference from a fixed target, using exact noncentral t power.
Fit
When to use it, and when not to
Use it when
- One independent sample provides a continuous outcome.
- The null mean is a fixed target, and the question concerns a difference from that target.
Not when
- The comparator is another estimated sample mean. Size two independent means. Read: Sample size for comparing two means
- The question concerns within-person change. Size paired mean differences. Read: Sample size for a paired mean change
- You must show the mean lies within an acceptable margin. Plan equivalence inference. Read: Equivalence analysis: two one-sided tests
Before you start
What you need
- The meaningful gap from the fixed targetSupply delta as the positive absolute gap. The target itself is not an engine input; it defines the gap.
- The population standard deviationSupply sd in the same units as the mean gap. Use a plausible population spread, not a standard error.
- The two-sided significance levelAlpha is the chance of rejecting a true null under the model. Supply a probability between zero and one.
- The target powerPower is the chance of rejecting the null at the assumed effect. The engine limits this input to 0.5 through 0.999.
- The units counted in the sample size are independent.How to check: Check for shared clinics, families or repeated observations before using an individual-level calculation.
- The effect and spread are defensible planning values.How to check: Use prior data and clinical judgment. Repeat the calculation with smaller effects and larger spreads.
- The target is fixed, and outcomes follow the assumed normal model.How to check: Check where the target came from. Assess skew and outliers in prior outcome data.
Plain language
How it works
The engine tests a mean gap from a fixed value using both tails of the noncentral t distribution. The SD describes individual outcomes.
For N people, noncentrality is delta times the square root of N, divided by SD. Degrees of freedom are N minus one.
The engine searches whole sample sizes for the target power. It does not account for uncertainty in a historical benchmark or add covariate adjustment.
Choosing a sample-size method helps distinguish a fixed target from an estimated comparison mean and a superiority question from a margin-based question.
Worked example
A worked example
- Setting
- A service plans to compare mean blood pressure with a fixed benchmark.
- Question
- How many people are needed to detect a meaningful gap from the target?
- Approach
- Use delta = 3; sd = 10; alpha = 0.05; power = 0.8. The gap and SD are in mmHg.
- Result
- The engine returns 90 people. Power at that total is 80.38%.
- What it means
- The result counts independent people with observed outcomes. It assumes the benchmark has no sampling uncertainty and does not add an attrition allowance.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
The target is treated as fixed and known. A historical mean estimated from another sample has uncertainty this calculation does not include. The result does not establish equivalence or non-inferiority.
- Entering the target value as the meaningful difference.Instead: Supply the magnitude of the gap you need to detect.
- Calling a nonsignificant difference proof of meeting the target.Instead: Plan margin-based inference if the question is equivalence or non-inferiority.
Inside Mallard
How Mallard uses this
For one mean, Mallard returns the required total and power at a supplied total. The model takes the target gap, not the target value.
analysis.sample_size_one_mean, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Statistics review 4: sample size calculations. (opens in a new tab) · Crit Care · doi 10.1186/cc1521
- Use of the one sample t-test in the real world. (opens in a new tab) · J Chronic Dis · doi 10.1016/0021-9681(84)90052-3