What hypothesis test should I use to test for equal "success" probabilities in paired binary data?  I have the following data set:
  70 participants, who answered arithmetic questions of different length.
  A wrong answer coded as 0, a correct answer coded as 1. 
  I want to know if there is a overall difference between the two question types.
  Since every participant filled out both kinds of questions, which procedure should I use to
  find out whether they differ or not as my data set is dependent.
I would like to do the analysis in R. 
Will the following give me correct results?
A McNemar test with the following cont. table:
        short  long
correct  w       x
Wrong    y       z

Can anyone help?
 A: The data may be thought of as arising from a table of the form
\begin{array}{c|cc}
\phantom{} & {\rm Question \ 1 \ -Yes} & {\rm Question \ 1 -No} \\ 
\hline
{\rm Question \ 2 \ - Yes} & a & b \\ 
{\rm Question \ 2 \ - No} & c & d \\ 
\end{array}
with corresponding cell probabilities $p_a, p_b, p_c, p_d$. Therefore, if the marginal "success" probabilities are the same for both questions, then $$p_a + p_b = p_a + p_c$$ and $$ p_c + p_d = p_b + p_d $$ Either way you look at it $p_b$ and $p_c$ have to be the same for the two questions to have the same marginal probabilities. Thus, we test 
$$ H_0 : p_b = p_c $$
and rejection of the null hypothesis indicates there is a difference. McNemar's Test gives an approximate (read: asymptotic) way of testing this hypothesis, which is a good approximation when the $b$ and $c$ cells are not too sparse. The test statistic is 
$$ M = \frac{ (b-c)^2 }{b + c} $$ 
and is approximately $\chi^2$ distributed with 1 degree of freedom. To do this is R you simply need to calculate the cell counts, compute m=(b-c)^2 / (b+c) and in get the approximate $p$-value with 1-pchisq(m,1). 
A: Paired proportions have traditionally been compared using McNemar's test but an exact alternative due to Liddell (1983) is preferable.
https://stats.stackexchange.com/a/152257/77102
