Cochran’s Q test indicates whether the distribution of binary values appears to differ across three or more columns when the values in a particular row are related. For example, it can be used to assess whether voting patterns significantly differ in three or more elections, where each row represents an individual voter, and each cell takes one of two possible values. Cochran’s Q test is the multi-column equivalent of a McNemar test.
To perform Cochran’s Q test on three or more category columns:
Note that the test will only be performed if the selected columns take on the same set of (two) values, and have the same category labels, if any.