# McNemar's test

*34,146*pages on

this wiki

## Redirected from McNemar test

In statistics, **McNemar's test** is a non-parametric method used on nominal data to determine whether the row and column marginal frequencies are equal. It is named after Q. McNemar, who introduced it in 1947. It is applied to 2 × 2 contingency tables with a dichotomous trait with matched pairs of subjects.

In the following example, a researcher attempts to determine if a disease is associated with the presence of a particular gene. Individuals without the disease are controls and individuals with the disease are cases. Within the cases and controls, individuals with the hypothesized disease gene are marked as positive for the presence of the gene and individuals without the gene are marked as negative.

Controls | ||||

+ | - | total | ||

Cases | + | 101 | 59 | 160 |

- | 121 | 33 | 154 | |

totals | 222 | 92 | 314 |

Cells represented in the following manner by the letters *a, b, c* and *d*, The totals across rows and columns *marginal totals*, and the grand total is represented by *n*:

Controls | ||||

+ | - | total | ||

Cases | + | a | b | a+b |

- | c | d | c+d | |

totals | a+c | b+d | n |

Marginal homogeneity occurs when the row totals are equal to the column totals, *a* and *d* in each equation can be cancelled; leaving *b* equal to *c*:

In this example, "Marginal homegeneity" would mean there was no effect of the gene.

The McNemar statistic is shown below:

is a chi-squared statistic with 1 degree of freedom. The formula may be re-written to correct for discontinuity:

The marginal frequencies are not homogeneous, if the the result is significant *p* < 0.05. If *b* and/or *c* are small (*b* + *c* < 10) then χ^{2} is not approximated by the chi-square distribution instead a Fisher's exact test should be used.

This page uses Creative Commons Licensed content from Wikipedia (view authors). |