Analyze matched before after outcomes with confidence. Review chi square tests, odds ratios, and assumptions. Download clean summaries, charts, and tables for faster decisions.
| After Positive | After Negative | Total | |
|---|---|---|---|
| Before Positive | 42 | 12 | 54 |
| Before Negative | 5 | 31 | 36 |
| Total | 47 | 43 | 90 |
This example has 17 discordant pairs. Because B and C differ, the test checks whether the paired proportions changed after the intervention.
Uncorrected McNemar statistic: χ² = (B − C)² / (B + C)
Continuity corrected statistic: χ² = (|B − C| − 1)² / (B + C)
Exact option: The calculator also reports the two sided exact binomial p value using the discordant total B + C and probability 0.5.
Matched odds ratio: OR = B / C when both discordant cells are above zero.
The null hypothesis states that the discordant probabilities are equal. That means B and C should be similar if no paired change exists.
The McNemar test is built for paired nominal data. It is often used with before and after studies. It also fits matched case designs. The method checks whether a binary outcome changed across two linked measurements. It does not treat the observations as independent. That is why it is different from a standard chi square test.
This calculator starts with the classic 2×2 table. Cell A holds pairs that stayed positive. Cell D holds pairs that stayed negative. Cell B shows a change from yes to no. Cell C shows a change from no to yes. The McNemar statistic uses only B and C. Concordant counts still matter for totals and context, but not for the core test statistic.
Small discordant totals can make asymptotic results less stable. That is why this page also reports an exact binomial p value. The exact method focuses on the imbalance between B and C under a null probability of one half. Many analysts prefer this option when discordant pairs are limited. The continuity corrected statistic is also shown for a more conservative large sample approximation.
Start with the selected p value. Compare it with the chosen alpha level. A smaller p value suggests evidence of change in paired proportions. Next, review the discordance rate and positive shift. These values explain how much movement occurred. The matched odds ratio adds direction when both discordant cells are nonzero. Use the chart and tables to report results clearly in audits, medical studies, survey comparisons, quality control reviews, and intervention tracking.
The calculator supports many practical settings. Clinicians can compare symptom status before and after treatment. Researchers can study paired diagnostic outcomes. Survey teams can test whether respondents changed a yes or no answer over time. Quality teams can compare pass and fail results before and after process updates. Education teams can assess paired mastery checks. Any design with the same subject measured twice can benefit from this approach.
Good reporting should show the four cell counts, the discordant total, the selected method, and the p value. It is also helpful to mention whether continuity correction or exact testing was used. Include a short interpretation in plain language. State whether the paired proportions changed. When relevant, report the matched odds ratio and the direction of change. Clear reporting makes audits, manuscripts, and internal reviews easier to understand.
It tests whether paired binary outcomes changed between two related measurements. The method compares discordant counts only, not the full table equally.
Use the exact option when the total discordant count is small. It avoids relying only on the large sample chi square approximation.
A and D are concordant pairs. They show no within pair change. McNemar testing focuses on changes, so only B and C drive significance.
The null hypothesis states that the probability of a yes to no change equals the probability of a no to yes change.
No. Independent groups need a different method, such as a standard chi square test or Fisher exact test, depending on the design.
It means B exceeds C. In practical terms, yes to no changes are more common than no to yes changes in discordant pairs.
There are no discordant pairs. The data show no observed paired change. The test statistic becomes zero and the p value is one.
Yes. It is useful for pre and post treatment studies, matched diagnostics, repeated survey responses, and paired quality assessments.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.