Sample size for a paired mean change
Size a mean change by treating each complete pair as one difference, using the standard deviation of those differences.
Fit
When to use it, and when not to
Use it when
- Each person has two continuous measurements, or each observation has a prespecified matched partner.
- The primary question concerns the mean within-pair difference.
Not when
- The groups contain different, unmatched people. Size two independent means. Read: Sample size for comparing two means
- You have several visits or clustered pairs. Plan power for the intended repeated-measures or clustered model. Read: Mixed-effects models
- The outcome is binary. A paired mean calculation cannot size a McNemar test. Read: McNemar’s test
Before you start
What you need
- The meaningful mean changeSupply delta as the positive magnitude of the mean within-pair difference to detect.
- The standard deviation of differencesSupply sd from within-pair differences in the same units as delta. The engine does not infer it from visit SDs or correlation.
- 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.
- Within-pair differences follow the assumed normal model.How to check: Plot changes from prior data. Check skew, outliers and floor or ceiling effects.
Plain language
How it works
Compute one difference per pair. The engine uses the meaningful mean change and the SD of differences to evaluate two-sided noncentral t power.
For N pairs, noncentrality is delta times the square root of N, divided by the SD of differences. Degrees of freedom are N minus one.
The engine searches whole pair counts for the target power. It takes the SD of differences directly; it does not calculate that SD from correlation.
Choosing a sample-size method helps distinguish this mean-change target from a binary paired outcome or a model with several visits.
Worked example
A worked example
- Setting
- A clinic plans blood pressure measurements before and after care.
- Question
- How many complete pairs are needed to detect the planned mean change?
- Approach
- Use delta = 4; sd = 8; alpha = 0.05; power = 0.8. The SD describes within-pair changes in mmHg.
- Result
- The engine returns 34 complete pairs. Power at that pair count is 80.78%.
- What it means
- Each complete pair supplies one difference. The number of visits is not the sample size. A before-after change alone does not show causation.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
Use the SD of within-pair differences, not the SD at one visit. The output counts complete pairs. Missing partners, extra visits and clustered pairs need separate planning.
- Entering the final-visit standard deviation.Instead: Compute within-pair differences and use their SD.
- Counting people with only one measurement as complete pairs.Instead: Plan retention and missing-data handling. The engine does not add a recruitment allowance.
Inside Mallard
How Mallard uses this
For paired means, Mallard returns the required complete-pair count and power at a supplied pair count. It does not add missing-pair or attrition allowances.
analysis.sample_size_paired_mean, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Sample sizes for clinical trials with normal data. (opens in a new tab) · Stat Med · doi 10.1002/sim.1783
- 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