Method document
Sample size to estimate a paired (McNemar) odds ratio
How many matched pairs are needed to estimate the conditional odds ratio of a binary outcome, from the expected shares of the two kinds of discordant pair, within a chosen factor. Covers non-response.
https://statwisely.com/methods/precision-paired-odds-ratio/
When to use it
- Before–after measurements of a yes/no outcome in the same people, or a binary outcome in 1:1 matched pairs, when the paired odds ratio is to be estimated.
Not for
- Showing that the paired proportions differ. Use McNemar’s test under “Detect an effect”.
- Independent groups. Use the odds ratio for two groups.
Notation
- Number of pairs
- Shares of pairs with the outcome in the first member only, and in the second member only
- Precision factor: the interval runs from OR / f to OR × f
- Standard normal quantile for confidence 1 − α (1.960 for 95%)
- Non-response rate
Formulas
Discordant pairs carry the information
The paired odds ratio is n₁₀ / n₀₁, and its log has variance 1/n₁₀ + 1/n₀₁ [1]. Concordant pairs add nothing, so a rare discordance needs many pairs.
Non-response
The number to approach so that n respond. Applied last, after any clustering.
Parameters
Confidence level
Values: 90%, 95% or 99%
95% is the convention in health research. A higher level widens the interval, so the same margin needs a larger sample.
Precision factor
Values: Above 1
2 means the interval runs from OR / 2 to OR × 2.
Pairs with the outcome in the first member only
Values: Above 0; with p₀₁, at most 1
From a pilot study or a previous paired study.
Pairs with the outcome in the second member only
Values: Above 0
The expected odds ratio is p₁₀ / p₀₁.
Expected non-response rateOptional
Values: 0% up to, but not including, 100%
The share of people approached who will not take part; use the response rate of a comparable study. Approaching more people restores the number of respondents, not their representativeness: if non-responders differ, the estimate can still be biased.
Assumptions
- Pairs are independent of one another, and both members of every pair are measured.
- Non-response is unrelated to the outcome.
Worked examples
Discordance of 20% and 10%
p₁₀ = 0.2 and p₀₁ = 0.1, an odds ratio of 2, factor 2: 3.8415 × (5 + 10) / 0.4805 = 119.9, so n = 120 pairs.
Sample size: 120
Open this example in the calculatorEqual discordance
15% each way, an odds ratio of 1: 3.8415 × 13.33 / 0.4805 = 106.6, so 107 pairs.
Sample size: 107
Open this example in the calculatorAllowing for incomplete pairs
With 10% of pairs expected to be incomplete: 120 / 0.9 = 133.3, so 134 pairs are enrolled.
Needed for analysis: 120 · To approach: 134
Open this example in the calculatorValidation
- Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
- The closed form is recomputed independently in R. Simulating 5,000 samples of 120 pairs at p₁₀ = 0.2 and p₀₁ = 0.1 gave a median interval factor of 2.01 against a target of 2.
How to cite
StatWisely. Sample size to estimate a paired (McNemar) odds ratio. Method document, engine version 1.0.0, reviewed 2026-10-04. https://statwisely.com/methods/precision-paired-odds-ratio/
Cite the original references for the formulas your design uses as well.
References
- 1.Breslow NE, Day NE. Statistical Methods in Cancer Research. Volume I: The Analysis of Case-Control Studies. Lyon: International Agency for Research on Cancer; 1980.