Ask Mallard
Analysis method

Sample size for a paired mean change

5 min read

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

Before you start

What you need

Decide these first
  1. The meaningful mean changeSupply delta as the positive magnitude of the mean within-pair difference to detect.
  2. 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.
  3. The two-sided significance levelAlpha is the chance of rejecting a true null under the model. Supply a probability between zero and one.
  4. 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.
It rests on these
  1. 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.
  2. 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.
  3. 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.

The test model

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.

What the engine counts

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.

Match the planned analysis

Choosing a sample-size method helps distinguish this mean-change target from a binary paired outcome or a model with several visits.

The method at a glance
Sample size for a paired mean change: Mean change and SD of differences. Then Exact two-sided noncentral t power. Then Required number of complete pairs.Sample size for a paired mean changeMean change and SD ofdifferencesExact two-sided noncentralt powerRequired number ofcomplete pairsUse the SD of within-pair differences, not the SD at one visit. The output counts complete pairs. Missingpartners, extra visits and clustered pairs need separate planning.
Conceptual diagram. It shows the structure of the idea, not data from any study.

Worked example

A worked example

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

Searching PubMed…

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.

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

Related Learn pages

Related designs and methods

Evidence

Sources & further reading

  1. Sample sizes for clinical trials with normal data. (opens in a new tab) · Stat Med · doi 10.1002/sim.1783
  2. 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
Prepared with AI assistance. PubMed records checked on 2026-11-06 by title, authors, year and DOI: record verified, confirm it supports this use. No independent professional or methodological approval is claimed. The sources provide context for mean inference and sample-size planning. The worked figures come from Mallard’s engine, not a table copied from a source.
Last source review: 2026-11-06
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.