Definition
The test is applied to a 2 × 2 contingency table, which tabulates the outcomes of two tests on a sample of n subjects, as follows.
Test 2 positive | Test 2 negative | Row total | |
Test 1 positive | a | b | a + b |
Test 1 negative | c | d | c + d |
Column total | a + c | b + d | n |
The null hypothesis of marginal homogeneity states that the two marginal probabilities for each outcome are the same, i.e. pa + pb = pa + pc and pc + pd = pb + pd.
Thus the null and alternative hypotheses are
Here pa, etc., denote the theoretical probability of occurrences in cells with the corresponding label.
The McNemar test statistic is:
The statistic with Yates's correction for continuity is given by:
An alternative correction of 1 instead of 0.5 is attributed to Edwards by Fleiss, resulting in a similar equation:
Under the null hypothesis, with a sufficiently large number of discordants (cells b and c), has a chi-squared distribution with 1 degree of freedom. If either b or c is small (b + c < 25) then 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, b is compared to a binomial distribution with size parameter equal to b + c and "probability of success" = ½, which is essentially the same as the binomial sign test. For b + c < 25, the binomial calculation should be performed, and 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 statistic to the right tail of the chi-squared distribution, the p-value that is found is two-sided, whereas to achieve a two-sided p-value in the case of the exact binomial test, the p-value of the extreme tail should be multiplied by 2.
If the result is significant, this provides sufficient evidence to reject the null hypothesis, in favour of the alternative hypothesis that pb ≠ pc, which would mean that the marginal proportions are significantly different from each other.
Read more about this topic: Mc Nemar's Test
Famous quotes containing the word definition:
“No man, not even a doctor, ever gives any other definition of what a nurse should be than thisdevoted and obedient. This definition would do just as well for a porter. It might even do for a horse. It would not do for a policeman.”
—Florence Nightingale (18201910)
“... if, as women, we accept a philosophy of history that asserts that women are by definition assimilated into the male universal, that we can understand our past through a male lensif we are unaware that women even have a historywe live our lives similarly unanchored, drifting in response to a veering wind of myth and bias.”
—Adrienne Rich (b. 1929)
“The definition of good prose is proper words in their proper places; of good verse, the most proper words in their proper places. The propriety is in either case relative. The words in prose ought to express the intended meaning, and no more; if they attract attention to themselves, it is, in general, a fault.”
—Samuel Taylor Coleridge (17721834)