Statistics
Textbooks
Boundless Statistics
Other Hypothesis Tests
Nonparametric Statistics
Statistics Textbooks Boundless Statistics Other Hypothesis Tests Nonparametric Statistics
Statistics Textbooks Boundless Statistics Other Hypothesis Tests
Statistics Textbooks Boundless Statistics
Statistics Textbooks
Statistics
Concept Version 7
Created by Boundless

Comparing Two Populations: Paired Difference Experiment

McNemar's test is applied to 2×22 \times 22×2 contingency tables with matched pairs of subjects to determine whether the row and column marginal frequencies are equal.

Learning Objective

  • Model the normal approximation of nominal data using McNemar's test


Key Points

    • A contingency table used in McNemar's test tabulates the outcomes of two tests on a sample of nnn subjects.
    • The null hypothesis of marginal homogeneity states that the two marginal probabilities for each outcome are the same.
    • The McNemar test statistic is: χ2=(b−c)2b+c{ \chi }^{ 2 }=\frac { { \left( b-c \right) }^{ 2 } }{ b+c }χ​2​​=​b+c​​(b−c)​2​​​​.
    • If the χ2{ \chi }^{ 2 }χ​2​​ result is significant, this provides sufficient evidence to reject the null hypothesis in favor of the alternative hypothesis that pb≠pcp_b \neq p_cp​b​​≠p​c​​, which would mean that the marginal proportions are significantly different from each other.

Terms

  • binomial distribution

    the discrete probability distribution of the number of successes in a sequence of n independent yes/no experiments, each of which yields success with probability ppp

  • chi-squared distribution

    A distribution with kkk degrees of freedom is the distribution of a sum of the squares of kkk independent standard normal random variables.


Full Text

McNemar's test is a normal approximation used on nominal data. It is applied to 2×22 \times 22×2 contingency tables with a dichotomous trait, with matched pairs of subjects, to determine whether the row and column marginal frequencies are equal ("marginal homogeneity").

A contingency table used in McNemar's test tabulates the outcomes of two tests on a sample of nnn subjects, as follows:

2×22 \times 22×2 Contingency Table

A contingency table used in McNemar's test tabulates the outcomes of two tests on a sample of nnn subjects.

The null hypothesis of marginal homogeneity states that the two marginal probabilities for each outcome are the same, i.e. pa+pb=pa+pcp_a + p_b = p_a + p_cp​a​​+p​b​​=p​a​​+p​c​​ and pc+pd=pb+pdp_c + p_d = p_b + p_dp​c​​+p​d​​=p​b​​+p​d​​. Thus, the null and alternative hypotheses are:

H0:pb=pc{ H }_{ 0 }:{ p }_{ b }={ p }_{ c }H​0​​:p​b​​=p​c​​

H1:pb≠pc{ H }_{ 1 }:{ p }_{ b }\neq { p }_{ c }H​1​​:p​b​​≠p​c​​

Here pap_ap​a​​, etc., denote the theoretical probability of occurrences in cells with the corresponding label. The McNemar test statistic is:

χ2=(b−c)2b+c\displaystyle{{ \chi }^{ 2 }=\frac { { \left( b-c \right) }^{ 2 } }{ b+c }}χ​2​​=​b+c​​(b−c)​2​​​​

Under the null hypothesis, with a sufficiently large number of discordants, χ2{ \chi }^{ 2 }χ​2​​ has a chi-squared distribution with 111 degree of freedom. If either bbb or ccc is small (b+c<25b+c<25b+c<25) then χ2{ \chi }^{ 2 }χ​2​​ is not well-approximated by the chi-squared distribution. The binomial distribution can be used to obtain the exact distribution for an equivalent to the uncorrected form of McNemar's test statistic. In this formulation, bbb is compared to a binomial distribution with size parameter equal to b+cb+cb+c and "probability of success" of 12\frac{1}{2}​2​​1​​, which is essentially the same as the binomial sign test. For b+c<25b+c<25b+c<25, the binomial calculation should be performed. Indeed, most software packages simply perform the binomial calculation in all cases, since the result then is an exact test in all cases. When comparing the resulting χ2{ \chi }^{ 2 }χ​2​​ statistic to the right tail of the chi-squared distribution, the ppp-value that is found is two-sided, whereas to achieve a two-sided ppp-value in the case of the exact binomial test, the ppp-value of the extreme tail should be multiplied by 222.

If the χ2{ \chi }^{ 2 }χ​2​​ result is significant, this provides sufficient evidence to reject the null hypothesis in favor of the alternative hypothesis that pb≠pcp_b \neq p_cp​b​​≠p​c​​, which would mean that the marginal proportions are significantly different from each other.

[ edit ]
Edit this content
Prev Concept
Comparing Two Populations: Independent Samples
Comparing Three or More Populations: Randomized Block Design
Next Concept
Subjects
  • Accounting
  • Algebra
  • Art History
  • Biology
  • Business
  • Calculus
  • Chemistry
  • Communications
  • Economics
  • Finance
  • Management
  • Marketing
  • Microbiology
  • Physics
  • Physiology
  • Political Science
  • Psychology
  • Sociology
  • Statistics
  • U.S. History
  • World History
  • Writing

Except where noted, content and user contributions on this site are licensed under CC BY-SA 4.0 with attribution required.