Cochran's Q Test#
Cochran's Q test is the extension of the McNemar test to three or more related samples with a binary dependent variable (yes/no, pass/fail, correct/incorrect). When you want to know whether the success rate of the same individuals differs across multiple conditions, Cochran's Q is your test.
When to Use#
- You have three or more conditions and the same individuals are measured under each condition
- Your dependent variable is binary (0/1, yes/no, pass/fail)
- You want to test whether the proportions (e.g., pass rates) differ across conditions
- You have a repeated measures design with categorical data β Cochran's Q is the nonparametric counterpart to RM-ANOVA for binary outcomes
- With only two conditions, use the McNemar test instead
Assumptions#
- Binary (dichotomous) dependent variable (0 or 1)
- Related samples β the same individuals under all conditions
- Sufficiently large sample size (rule of thumb: n x k >= 24)
Tip: Cochran's Q is an omnibus test β it only tells you that at least one condition differs, not which ones. For pairwise comparisons, use post-hoc McNemar tests with Bonferroni correction.
Formula#
The test statistic Q approximately follows a chi-squared distribution with degrees of freedom:
Where:
- = number of conditions
- = sum of successes in condition
- = mean of column totals
- = row sum (number of successes) for individual
Example#
Practical Example: Exam Pass Rates Across Three Subjects
50 students take three exams (Statistics, Research Methods, Diagnostics). For each exam, it is recorded whether they passed (1) or not (0).
| Statistics | Research Methods | Diagnostics | |
|---|---|---|---|
| Passed | 38 | 42 | 30 |
| Failed | 12 | 8 | 20 |
Calculation: , ,
Interpretation: Pass rates differ significantly across the three exams. Post-hoc tests (McNemar with Bonferroni correction) reveal that Diagnostics has a significantly lower pass rate than Research Methods ().
Effect Size#
The Cochran's Q coefficient can be reported as an effect size, normalizing the Q value:
This value ranges from 0 to 1. Alternatively, Serlin's S can be used, which indicates the proportion of the maximum possible Q value.
| Value | Interpretation |
|---|---|
| 0.01β0.05 | small effect |
| 0.06β0.15 | medium effect |
| > 0.15 | large effect |
Tip: Always conduct post-hoc tests when the result is significant. Without them, you don't know which conditions actually differ.
Further Reading
- Sheskin, D. J. (2011). Handbook of Parametric and Nonparametric Statistical Procedures (5th ed.). Chapman & Hall/CRC.
- Siegel, S. & Castellan, N. J. (1988). Nonparametric Statistics for the Behavioral Sciences (2nd ed.). McGraw-Hill.
- Fleiss, J. L., Levin, B., & Paik, M. C. (2003). Statistical Methods for Rates and Proportions (3rd ed.). Wiley.