McNemar's test tests symmetry in a 2 × 2 table of paired binary observations. The paired counterpart to chi-square / Fisher.
When the same subject is measured twice (before/after, two raters), the resulting 2 × 2 table has two off-diagonal cells (b = before yes / after no; c = before no / after yes) that capture all the information about change. McNemar's test asks whether b = c (no net shift) using χ² = (b − c)² / (b + c) ∼ χ²₁ under H₀.
For small (b + c) (< 25 or so), use the exact binomial version: under H₀, b ∼ Binomial(b + c, 0.5). We run the exact form automatically when the count is small.
Applying a regular chi-square to paired data is wrong — it treats the two columns as independent and discards the pairing. If your design pairs, McNemar is the right test.
Two binary columns paired by row.
χ² statistic, df = 1, p-value (exact for small counts).
A significant McNemar test means the proportion changing from 0 → 1 differs from the proportion changing 1 → 0. Report the two discordant counts alongside the test.
If the question is 'did the marginal positivity rate change?' (rather than 'is there net asymmetry'), the answer is the same — McNemar's test of symmetry is equivalent to testing whether the marginal rates differ in paired binary data.