McNemar’s Test Calculator

McNemar’s test is used to test whether or not counts are consistent across two groups. It is often used to test if the counts between a treatment group and control group are equal.

Given the following 2×2 table:

McNemar test example

The test statistic X2 is computed as (|b-c|-1)2 / (b+c) and follows a chi-square distribution with one degree of freedom.

To perform McNemar’s test for a given dataset, simply enter the values in the cells below and then press the “Calculate” button.

Test 2
Positive Negative
Test 1 Positive
Negative

2 Replies to “McNemar’s Test Calculator”

  1. How can a= BOTH the positive results from test 1 AND the positive results from test 2? The table headings create an impossible task.

    1. In this example, “a” represents the count of observations that had a positive result for both test 1 and test 2.

      For example, suppose we test whether or not a new treatment can help people with knee pain. We recruit 100 people and find out if they have knee pain, to which they may respond yes (“positive” for test 1) or no (“negative” for test 1). Then, after we give them the treatment we again ask them if they have knee pain, to which they may respond yes (“positive” for test 2) or no (“negative” for test 2).

      Suppose 31 total people responded yes to having knee pain both before and after the treatment. In this case, a = 31.

Leave a Reply

Your email address will not be published.