McNemar's Test
McNemar's test is a nonparametric test for paired binary data that checks whether the proportion of a yes/no outcome changes between two related measurements, using only the discordant pairs.
McNemar 검정은 두 번 측정된 쌍체 이분형 자료에서 불일치 쌍만을 이용해 예/아니오 비율이 변했는지를 검정하는 비모수 검정이다.
How do I test whether a yes/no outcome changed from before to after in the same people?
같은 사람들에게서 예/아니오 결과가 사전과 사후에 달라졌는지 어떻게 검정하나요?
McNemar's test compares two related proportions, such as the share of the same participants answering yes before and after an intervention. It fits paired or matched binary data arranged in a 2 × 2 table and tests whether the discordant changes are balanced.
When to use McNemar's Test
- The same subjects classified yes/no at two time points (pre/post)
- Matched pairs (e.g., case–control pairs) with a binary outcome
- Comparing two diagnostic tests applied to the same subjects
When to use something else
- The two groups are independent rather than paired: use the chi-square test or Fisher's exact test
- There are three or more related binary measurements: use Cochran's Q test
Assumptions and requirements
- Paired or matched observations
- Dichotomous outcome at both measurements
- Pairs are independent of one another
- Sufficient discordant pairs for the chi-square approximation; otherwise use the exact binomial version
What the analysis reports
- 2 × 2 table of paired outcomes
- McNemar chi-square statistic (or exact p-value)
- p-value
- Odds ratio of discordant pairs with confidence interval
How to report it
A McNemar's test showed a significant change in the proportion of [outcome] from pre- to post-test, χ²(1, N = [n]) = [value], p = [value].
Related methods
- Cochran's Q Test
- Chi-Square Test of Independence
- Sign Test
Run McNemar's Test on Quorant
- Data you need
- a table (CSV or Excel) with a grouping variable
- Price
- 250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 credits.
- Checking
- Python results are cross-checked against R reference outputs in every deployment
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.