Explore modules

McNemar Exact Test

Track paired binary changes and enumerate the discordant outcomes behind an exact McNemar p-value.

Free theory article

Track paired binary changes and enumerate the discordant outcomes behind an exact McNemar p-value.

Concept & interpretation

The McNemar Exact Test evaluates paired binary responses, such as evaluating successes before and after a treatment. Rather than modeling all outcomes, the exact test conditions only on the discordant pairs—the cases that changed state. Under the null hypothesis of marginal homogeneity, a discordant pair is equally likely to be a loss or a gain, leading to a binomial distribution for the test statistic.

Interactive Experiment

In the interactive module, you can directly adjust the number of losses and gains in a paired experiment setting. The visualizer graphs the probability mass function for the exact conditional binomial distribution.

  1. Adjust the Losses b slider to change the count of pairs transitioning from success to failure.
  2. Adjust the Gains c slider to change the count of pairs transitioning from failure to success.
  3. Observe the dynamically updated Statistic min(b, c) and exact conditional Exact Two-Sided p-value based on the specified pair counts.

Try it out in the matching experiment: https://riano.app/module/mcnemar-exact-test.

Read the full free theory article