For a binary dependent variable, there is a form of the chi-square test for within-subjects
designs called McNemar's chi-square. As with the paired t-test or the within-subjects ANOVA,
the McNemar test is used whenever the same individuals are measured (or surveyed) twice,
matched on some variable (e.g., yoked by age), participants are paired in some way (e.g., twins
or married couples), or responses on two measures are used (e.g., favorability to gun control
compared to favorability for abolishing the second amendment).
For instance, we might examine the favorability of voters for gun control legislation in April and
in June.
June
No Yes
April No 80 100 180
Yes 10 110 120
90 210 300
To compute McNemar's, the following formula is used: