Compare proportions on paired data.
McNemar's test is the non-parametric equivalent of the paired t-test for binary data. It compares two proportions measured on the same subjects (before/after, two conditions) and tests whether the change is significant.
Context : Vaccine evaluation: 100 patients tested positive for a virus before and after vaccination.
Result : McNemar χ²(1) = 8.1, p = 0.004, OR = 0.21
Interpretation : Significant reduction in positive cases after vaccination (p < 0.01). The odds ratio of 0.21 indicates the risk of being positive after vaccination is 5 times lower.