McNemar's Test is a nonparametric statistical test used to determine if there is a significant difference in proportions between two related groups when the outcome is binary (e.g., yes/no, success/failure). It is beneficial when we have paired data, such as pre-test/post-test designs, where the same subjects are measured under two different conditions. The test is named after the statistician Quinn McNemar, who introduced it in 1947. It is commonly used in situations where subjects are measured before and after a treatment or in matched-pair study designs.
Assumptions of McNemar's Test
For McNemar's test to produce valid results, the following assumptions must be met:
Applicability and Conditions
McNemar's test is particularly suited for the following situations:
McNemar's test is a valuable tool for analyzing paired nominal data, particularly in medical and psychological research, where pre-post designs and matched-pair studies are commonly used. By understanding and meeting the assumptions of the test, researchers can apply McNemar's test to draw reliable conclusions about differences in proportions between two related groups.
McNemar's test applies to paired nominal data presented in two-by-two contingency tables. This is a special case of randomized block design, where individuals are evaluated only twice.
For example, an ant species is evaluated in an experimental setting for its response to the artificial odor of its potential prey.
30 individuals are subjected to test arenas measuring 5 and 10 cm, one half of which is infused with the odor, and the other is a control.
The ants that move toward the odor are scored +, and the ones that move towards the control are scored -. Next, the two-by-two contingency table for 5 and 10 cm arenas is as follows.
Here, the null hypothesis is that the proportions in these two trials are the same, mathematically expressed as follows. If the change in the proportion between two trials is significant, the null hypothesis is rejected.
McNemar's test statistic is computed by the following expression.
As these values approximate chi-square distribution, the degree of freedom is one, and there is no evidence of any significant change in the behavioral response.