# Cochran's Q

This test is a non-parametric equivalent of Repeated Measures ANOVA which is applicable with binary data (i.e., proportions). The test statistic is:

${\displaystyle Q={\frac {c(c-1)\sum _{j=1}^{c}(\sum _{i=1}^{n}w_{i}x_{ij}-{\frac {1}{c}}\sum _{i=1}^{n}w_{i}u_{i})^{2}}{c\sum _{i=1}^{n}w_{i}u_{i}-\sum _{i=1}^{n}w_{i}u_{i}^{2}}}}$

where:

${\displaystyle x_{ij}}$ is the data for ${\displaystyle j}$th of ${\displaystyle c}$ categories of the ${\displaystyle i}$th of ${\displaystyle n}$ observations,
${\displaystyle x_{ij}\in {0,1}}$,
${\displaystyle w_{i}}$ is the Calibrated Weight, and
${\displaystyle u_{i}=\sum _{j=1}^{c}x_{ij}}$
${\displaystyle p\approx \Pr(\chi _{c-1}^{2}\geq Q)}$