Saturday, 30 November 2013

McNemar's Test Calculator

This blog post implements an online McNemar's Test on a 2 by 2 contingency table.

Referring to the contingency table below, the Null Hypothesis for the McNemar test is that the marginal probability of Test 1 being positive is equal to the marginal probability of Test 2 being positive as well. The Null Hypothesis is also that the marginal probability of Test 1 being negative is equal to the marginal probability of Test 2 being negative. If we denote the following:

  1. $p_a$=Probability of Test 1 being positive and Test 2 being positive
  2. $p_b$=Probability of Test 1 being positive and Test 2 being negative
  3. $p_c$=Probability of Test 1 being negative and Test 2 being positive
  4. $p_d$=Probability of Test 1 being negative and Test 2 being negative

The Null Hypothesis is $p_a+p_b=p_a+p_c$ or $p_b+p_d=p_c+p_d$, which leads to $p_b=p_c$. In other words, the Null Hypothesis depends on only the off-diagonal terms of the contingency table.

A low value of the calculated p-value (< 0.05) could be considered a significant result, rejecting the Null Hypothesis.

Please fill in the four text areas with integers greater than or equal to zero.

Test 2 positive: Test 2 negative:
Test 1 positive:

Row Sum 1

Test 1 negative:

Row Sum 2

Column Sum 1

Column Sum 2

Total





Results pending...