McNemar Test vs Chi-Square: Which One for Paired Data?
Short answer. Paired yes/no data needs the McNemar test. The chi-square test assumes two independent groups, so it throws away the pairing and can reverse the conclusion. With 200 paired subjects and discordant counts of 18 and 6, McNemar gives p=0.0247 and the same counts analysed as two independent groups give p=0.1713.
What "paired" means
A pair is one subject measured twice: before and after, left and right, or the same person rating two designs. Each pair gives two yes/no answers, so the whole sample goes into one 2x2 table with four cells: both yes (a), only A yes (b), only B yes (c), both no (d).
Only the discordant cells b and c carry information about the difference. Pairs that agree in both columns cannot show which condition is more likely to say yes. That is why the McNemar statistic uses b and c alone.
Worked example
A usability study records whether each of 200 people completes a task on the old design (A) and on the new design (B). The four counts are a=40, b=18, c=6, d=136.
McNemar statistic = (|b - c| - 1)^2 / (b + c)
= (|18 - 6| - 1)^2 / (18 + 6)
= 121 / 24 = 5.0417
p = chi-square upper tail, 1 df = 0.0247
The exact conditional version, which does not use the chi-square approximation, gives p=0.0227. Both are below 0.05, so the two completion rates differ.
What the wrong test does
If you collapse the pairs into two independent groups you get A: 58 yes and 142 no, B: 46 yes and 154 no. A chi-square test on that table gives p=0.1713 and reports no difference. The same raw answers now support the opposite decision.
This is not a small numerical difference. The pairing carries the information, and the independent test discards it.
When the chi-square test is correct
- Two separate groups of different people, each person counted once.
- One outcome per person, and no natural pairing between a row and a column.
For that design use the chi-square test calculator. For small independent tables use the Fisher-Freeman-Halton calculator.
Which McNemar p value to report
The McNemar test calculator returns four two-sided values from the same table: asymptotic, continuity corrected, exact conditional, and mid-p. Report the one you chose before the analysis. The continuity-corrected and exact values are the safer choices when b + c is small.
Related reading
The choice between an exact and an approximate test for independent groups is a separate question, covered in Fisher's exact test vs chi-square.