Definition
McNemar’s test is used to analyze paired nominal data (same samples are used for both conditions), particularly in before-and-after studies or matched-pair designs.
The test statistic is defined as
Examples
| After treatment / No insomnia | After treatment / Insomnia | |
|---|---|---|
| Before treatment / No insomnia | 45 | 15 |
| Before treatment / Insomnia | 25 | 15 |
Consider a null hypothesis The treatment is not effective. We can not reject the null hypothesis.