Your data analysis solution

Cochran's Q test in Excel tutorial

2016-05-04

This tutorial will help you set up a Cochran's Q test in Excel using XLSTAT. This statistical test compares dependent samples of binary data.
Not sure this is the statistical test you are looking for? Check out this guide.

Dataset to run a Cochran Q test and goal of this tutorial

An Excel sheet with both the data and the results can be downloaded by clicking here.

This tutorial explains how to run a Cochran’s Q test. The data correspond to a survey where several teenagers have been asked to tell if they like packaging of a computer game (answer is Yes in the dataset) or not (answer is No in the dataset). We want to know if there is a significant difference between the packaging options or not, and to decide if one packaging appears to be superior to the other or not before the product goes to production.

As for any test, we need to know what the null and alternative hypotheses are. In our case, the null hypothesis is that there is no difference between the packaging. The alternative hypothesis, that the decision makers would like to be confirmed, is that there is a difference.

Setting up a Cochran's Q test

After opening XLSTAT, select the XLSTAT / Nonparametric tests / Cochran’s Q test, or click on the corresponding button of the Nonparametric tests toolbar.

menu cochran

Once you've clicked the button, the dialog box appears. Select the data on the Excel sheet. The Data are in the B to E columns.

 dialog box cochran

We activate the Multiple pairwise comparisons option in order to identify which packaging (one or more) are responsible for rejecting the null hypothesis in case we reject it.

The computations begin once you have clicked the OK button.

Interpreting the results of a Cochran's Q test

Then, the results of the Cochran’s Q test and their interpretation are displayed.

results cochran Q

We see that the null hypothesis is rejected if we use a significance level of 0.05. As a reminder, choosing a significance level of 0.05 is the same as deciding that we want to be right in 95% of cases (and wrong in 5% of cases) when rejecting H0.

For the decision makers, that means that choosing a packaging at random or using a manager’s preference would not make sense as long as the sample of teenagers has been well chosen. We now want to identify if one or more packaging are responsible for rejecting H0. The following results give us the answer:

 results cochran Q pairwise

We see that the packaging 3 and 1 are different, while the other packaging are not statistically different. However as the packaging that received the more “Yes” is Pack3, it seems to be the best choice.

 

1c26995d494fb3061dd0ae8571ffc0a4@xlstat.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/portal/articles/autocomplete
9283