PickMyTest

Cochran's Q Test

Cochran's Q test compares three or more related groups with a binary dependent variable β€” the extension of the McNemar test.

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 kβˆ’1k - 1 degrees of freedom:

Q=k(kβˆ’1)βˆ‘j=1k(Gjβˆ’GΛ‰)2kβˆ‘i=1nRiβˆ’βˆ‘i=1nRi2Q = \frac{k(k-1) \sum_{j=1}^{k}(G_j - \bar{G})^2}{k \sum_{i=1}^{n} R_i - \sum_{i=1}^{n} R_i^2}

Where:

  • kk = number of conditions
  • GjG_j = sum of successes in condition jj
  • GΛ‰\bar{G} = mean of column totals
  • RiR_i = row sum (number of successes) for individual ii

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).

StatisticsResearch MethodsDiagnostics
Passed384230
Failed12820

Calculation: Q=8.67Q = 8.67, df=2df = 2, p=.013p = .013

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 (p=.004p = .004).

Effect Size#

The Cochran's Q coefficient can be reported as an effect size, normalizing the Q value:

EffectΒ size=Qn(kβˆ’1)\text{Effect size} = \frac{Q}{n(k-1)}

This value ranges from 0 to 1. Alternatively, Serlin's S can be used, which indicates the proportion of the maximum possible Q value.

ValueInterpretation
0.01–0.05small effect
0.06–0.15medium effect
> 0.15large 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.