McNemar's Test Calculator
Test paired nominal data with McNemar's chi-square.
McNemar's test compares paired before/after categorical results.
How the Math Works
McNemar's Test evaluates whether there is a significant change in the proportions of paired nominal data by comparing discordant pairs. The formula, chi-square = (|b - c| - 1)^2 / (b + c), calculates a test statistic where 'b' and 'c' represent the counts of discordant pairs (cases where the two measurements differ). The absolute difference between b and c is adjusted by subtracting 1 (a continuity correction for small samples), squared, then divided by their sum. This produces a chi-square value, which is compared to a critical value from the chi-square distribution with 1 degree of freedom to assess statistical significance.
Practical Applications
To apply McNemar's Test, first construct a 2x2 contingency table for paired observations (e.g., pre- and post-treatment outcomes). Extract the counts of discordant pairs (b and c). Compute the chi-square statistic using the formula, then determine the critical value from a chi-square table (typically at α = 0.05). If the calculated value exceeds the critical value, reject the null hypothesis of no association between the paired categories. This test is ideal for matched-pair studies, such as evaluating treatment efficacy or inter-rater agreement, where the same subjects are measured under two conditions.
Day-to-Day Use
McNemar's Test helps in everyday scenarios where paired data comparisons matter. For example, a teacher could use it to assess if a new teaching method improved student pass rates by comparing pre- and post-intervention results. Similarly, a product manager might apply it to determine if a software update reduced customer complaints by analyzing paired survey responses. It also aids in medical research, like testing drug effectiveness by tracking symptom changes in the same patients over time. By identifying significant shifts in paired categories, it empowers decisions based on statistical evidence rather than intuition.
Worked example
b 25, c 12 gives chi-square about 4.32 (significant at 0.05).
FAQ
When do I use it?
For paired binary data, like the same subjects before and after a treatment.