KONSİL

Calculator · deterministic

McNemar sample size calculator (paired tests)

Comparing two diagnostic tests on the same patients: cases from the discordant-pair rates.

Calculator

No AI, no sign-up — the arithmetic runs in the server-side deterministic solver, validated against G*Power and R pwr.

Proportion positive on A and negative on B (0–1). From a pilot or a study that applied both tests to the same patients.
Proportion positive on B and negative on A (0–1).

When to use it

When two tests are compared in the same patients (the strongest and most common design in imaging), McNemar is the right tool. The field's most common error is sizing on the DIFFERENCE in sensitivities. The information lives in the discordant pairs — the cases where the tests disagree — and they cannot be derived from published sensitivities.

Where the inputs come from

  • p₁₀ and p₀₁: the rates each test uniquely detects. The source is your pilot, or a publication that applied both tests to the same patients; if you have neither, say so honestly and present a sensitivity table over a plausible range.
  • If the tests agree often (few discordant pairs), even a large apparent difference demands a huge sample — try it in the calculator.

Worked example

If test A uniquely detects 15% of cases and test B 5%, the solver requires 155 diseased cases at 80% power; at 20% losses the target is 194. With 20% prevalence, remember to divide by prevalence to get the number of patients to screen.

How to write it in the protocol

Fill-in methods sentence

“Both index tests will be applied to the same patients and compared with McNemar's test. Assuming discordant proportions p₁₀ = [value] and p₀₁ = [value] [with source], [n] diseased cases were required at 80% power; with [x]% prevalence, approximately [N] patients will be screened.”

Sources

  1. Cohen J. Statistical Power Analysis for the Behavioral Sciences, 2nd ed. Lawrence Erlbaum; 1988.
  2. Faul F, Erdfelder E, Lang A-G, Buchner A. G*Power 3: a flexible statistical power analysis program. Behav Res Methods. 2007;39:175–191.
  3. Champely S. pwr: Basic Functions for Power Analysis (R package).
  4. Connor RJ. Sample size for testing differences in proportions for the paired-sample design. Biometrics. 1987;43:207–211.

Related guides