# McNemar Test Calculator

Test paired binary categorical changes with exact binomial or continuity-corrected chi-square McNemar test

> Canonical page: https://elysiatools.com/en/tools/mcnemar-test-calculator

- **Category:** Math & Numbers

- **Keywords:** mcnemar test, paired categorical data, before after test, exact binomial, p value, calculator

## Overview

The McNemar Test Calculator evaluates changes in paired binary data, such as before-and-after studies or matched-pair designs. By analyzing discordant pairs, it determines if a significant shift in proportions has occurred using either the Exact Binomial method or the continuity-corrected Chi-Square test.

## Inputs

- **Before Yes After Yes** (number)
- **Before Yes After No** (number)
- **Before No After Yes** (number)
- **Before No After No** (number)
- **Method** (select)
- **Alpha** (number)
- **Decimal Places** (number)

## When to use

- Analyzing the effectiveness of a treatment in a pre-test/post-test study with binary outcomes.
- Comparing the performance of two different diagnostic tests applied to the same group of subjects.
- Evaluating opinion shifts in a survey where the same individuals are polled at two different time points.

## How it works

- Enter the frequencies for the four possible outcomes: Yes/Yes, Yes/No, No/Yes, and No/No.
- Select the calculation method, choosing between Exact Binomial for small samples or Chi-Square for larger datasets.
- Set your significance level (Alpha) and preferred decimal precision for the results.
- Review the calculated p-value and discordant pair count to determine if the null hypothesis should be rejected.

## Use cases

- Medical researchers comparing patient symptoms before and after a specific clinical intervention.
- Marketing analysts measuring brand awareness among the same focus group before and after an advertising campaign.
- Quality control engineers testing if a machine recalibration significantly changed the pass/fail rate of components.

## Frequently asked questions

### What are discordant pairs in a McNemar test?

Discordant pairs are the cases where the outcome changed between the two observations, specifically the 'Yes to No' and 'No to Yes' counts.

### When should I use the Exact Binomial method?

Use the Exact Binomial method when the total number of discordant pairs is small, typically less than 25, to ensure statistical accuracy.

### Does this tool handle independent samples?

No, the McNemar test is specifically designed for paired or matched data where the same subjects are measured twice.

### What does 'Reject Null' mean in the results?

It indicates that the calculated p-value is less than your specified Alpha, suggesting the observed change is statistically significant.

### Why are concordant pairs ignored in the calculation?

McNemar's test focuses exclusively on the direction of change; concordant pairs (Yes/Yes and No/No) do not provide information about the shift between states.

## Related tools

- [Fisher Exact Test Calculator](https://elysiatools.com/en/tools/fisher-exact-test-calculator): Run Fisher exact test for a 2 x 2 contingency table with exact one-sided or two-sided p-values
- [Kruskal-Wallis Calculator](https://elysiatools.com/en/tools/kruskal-wallis-calculator): Compare three or more independent groups with the nonparametric Kruskal-Wallis H test
- [Mann-Whitney U Test Calculator](https://elysiatools.com/en/tools/mann-whitney-u-test-calculator): Compare two independent samples with the nonparametric Mann-Whitney U rank-sum test
- [P Value Calculator](https://elysiatools.com/en/tools/p-value-calculator): Calculate one-tailed or two-tailed p-values for Z, t, chi-square, and F test statistics
- [Spearman Correlation Calculator](https://elysiatools.com/en/tools/spearman-correlation-calculator): Calculate Spearman rank correlation for paired numeric data with tied-rank handling
- [Two Proportion Z Test Calculator](https://elysiatools.com/en/tools/two-proportion-z-test-calculator): Compare two independent proportions with a pooled two-proportion Z test and confidence interval
- [LED Series Resistor Calculator](https://elysiatools.com/en/tools/led-resistor-calculator): Compute the current-limiting resistor for LEDs in series with power, nearest standard value and wattage rating
- [Binomial Distribution Calculator](https://elysiatools.com/en/tools/binomial-distribution-calculator): Calculate exact, cumulative, and upper-tail binomial probabilities for independent Bernoulli trials

## Samples

- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion
