The Cochran’s Q test calculator gives Q and its p-value to decide whether three matched treatments have different success rates when the same subjects are tested each time.
How the calculation works
- Enter the number of subjects and the successes under each of the three treatments.
- Enter the sum of the squared row totals.
- The calculator gives Q, the p-value on 2 degrees of freedom and the success rate of each treatment.
Example
20 subjects with 14, 9 and 6 successes have a total of 29. With a sum of squared row totals of 61, Q = 2 × (3 × 313 − 841) / (3 × 29 − 61) = 7.538. The p-value is 0.0231, and the success rates are 70.0 %, 45.0 % and 30.0 %.
Why it matters
The calculator helps researchers, students and quality engineers to compare several methods, tests or raters on the same cases, for example three diagnostic tests on the same patients or three checks on the same samples.
Good to know
Build the table with one row per subject and one column per treatment, with 1 for a success and 0 for a failure. The column sums are the successes of each treatment and the row sums give the sum of squares. Order effects can bias the result, so randomize the order in which the treatments are applied. If k is 2, the test reduces to the McNemar test. Q is compared with a chi-square distribution with k − 1 degrees of freedom, and the approximation is acceptable when the number of subjects with mixed results is about 10 or more. The calculator is built for three treatments, and it returns a p-value of 1 if all the subjects have the same result everywhere.
Related tools
The McNemar test calculator handles two treatments, the chi-square test calculator handles independent groups, the chi-square distribution calculator gives p-values and the Fisher exact test calculator handles small samples.