**#BA = , #AB = ,
p <= **

This non-parametric test uses matched-pairs of labels (

McNemar's Test is generally used when the data consist of paired observations of labels. An example is an identification experiment in which each subject has to identify two different "versions" of each stimulus. The labels are

*H0:*

*AB* pairs are as likely as *BA* pairs.

*Assumptions:*

Only that the pairs are matched.

*Scale:*

Nominal

*Procedure:*

Ignore the pairs with identical labels, count the pairs AB (n+) and the pairs
BA (n-).

*Level of significance:*

n+ and n- are
binomial distributed with *p* = *q* = 1/2
and *N* = (n+) + (n-).

If k is the smaller of (n+) and (n-) then:

p <= 2 * Sum (i=0 to k) {*N*!/(i!*(*N*-i)!)}/4

(with k! = k*(k-1)*(k-2)*...*1 is the factorial of k and 0! = 1)

*Approximation:*

If (n+) + (n-) = *N* > 25, then
*Z* = (| n+ - n- | - 1)/sqrt( *N* )
can be approximated with a
Standard Normal distribution. In our example, we calculate the exact
probabilities upto *N* = 100.

For *N* > 30, the Student t-test can be used.

*Remarks:*

For McNemar's Test, the same remarks hold as for the
&negative=

Return to: Statistics