StatsToDo : McNemar Test for Paired Changes in Proportions Explained
Explaination References
 + - + a(n++) b(-+) - c(n+-) d(--)
The McNemar's test evaluates changes in related or paired binomial attributes, whether in one direction is significantly greater than that in the opposite direction.

The data structure is as shown in the table to the right, where columns represents before and rows represents after.

• a(n++) represents the numbers with positive attribute, unchanged
• d(n--) represents the numbers with negative attribute, unchanged
• b(n-+) represents the numbers with positive attribute that changed to negative
• c(n+-) represents the numbers with negative attribute that changed to positive
• b and c are used to calculate Chi Square
Chi Squares = (abs(b-c)-1)2 / (b+c)    degree of freedom = 1.

Example

We are going to study whether a major speech by the leader of a political party will affect the voting intentions of the public.

We recruited 250 subjects, and recorded their voting intensions before and after the speech.

There were 130 subjects who intended to vote against the party before the speech, 45 (18% of the total) of them changed their voting intension towards favouring the party after the speech.

There were 120 subjects who intended to vote for the party before the speech, 24 (9,6% of the total) of them changed their voting intension to against the party after the speech.

we found Chi Square = 5.8, df = 1, p=0.02. This indicates that the speech was effective in changing voting intensions towards favouring the party.

Sample Size for McNemar Test is discussed in Sample Size for McNemar Test of Paired Changes in Proportions Explanation and Table Page . However, in consideration of sample size in the example on this page. If the research question is whether the political speech changes the voting intentions, then the Two Tail model should be assumed. However, if the question is whether the speech improves the voting intention for that politician, then the more powerful One Tail model can be assumed.