{{ message }}

McNemar's Test for Categorical Shift

Consider an experiment in which a subject can take two states, denoted here as 0 and 1, under two treatments. We can think of the states as 'normal' or 'abnormal'. A categorical shift occurs when observations shift from one state to another between the two treaments. To test the existance of this shift, we use McNemar's Test.

Let \(x_ij\) be the binary response of the \(i^{th}\) subject in the \(j^{th}\) treatment. Define two quantities:

\[ p_{01} = P(x_{i1} = 0, x_{i2} = 1) \]


\[ p_{10} = P(x_{i1} = 1, x_{i2} = 0) \]

McNemar's test tests the hypothesis that \(p_{01} = p_{10}\).

Power Calculation Parameters

To input multiple values, seperate them by a comma.

{{ this.errors }}

Power Calculation Explanation

Solve For
The unknown you are interested in solving for.
The sample size used to test the hypothesis.
The \(\alpha\) (Type I error rate) level of the hypothesis test.
The power (1 - Type II error rate) of the hypothesis test.
The estimated value of the \(p_{01}\) defined above.
The estimated value of the \(p_{01}\) defined above.

Calculation Results

No calculation has been generated yet.

Sign Up to Save Power and Sample Size Calculators!
N Alpha Power \(p_{01}\) \(p_{10}\)
{{ val }}

Power Graph

There are no results to graph yet.


  • Chow, S., Shao, J., & Wang, H. (2003), Sample size calculations in clinical research, New York: Marcel Dekker.