# Nonparametric tests and binary data?

I'm having data which represent two groups, one that used tool 1 and the other that used tool 2. I asked a series of questions (10 questions). The questions were true or false. I also measured the time it took them to answer a question and calculated efficiency (number of correct answers / sum of time per participant).

Now, I was wondering, can I analyse specific questions as well? E.g. I want to measure if the means for each question was significantly different.

A sample data for question 1 (Q1) for participants that used tool 1 and tool 2:

Tool-1 0

Tool-1 0

Tool-1 1

Tool-1 0

Tool-1 1

Tool-2 1

Tool-2 1

Tool-2 1

Tool-2 1

Tool-2 1

# --------

I have 40 participant per tool, I just provided a sample of the data. 1 means that the participant answered the questions correctly and 0 that the answer was wrong.

Now, I analysed normality of data in SPSS and got the following warning: "Q1 is constant when Groups = Tool-2. It will be included in any boxplots produced but other output will be omitted."

The data can still be analysed using non-parametric tests, but I was wondering if that is the correct test? After all, I have binary data (1 or 0) - is there a more appropriate test?

Thank you again for your help!

Your main question seems to be how you would go about analyzing this binary data. I will get to that in just a second, first I would note why your data are not Normal. Normal data are continuous (i.e. they can take any value in a range) but your data are not, they are binary or more generally categorical data. Thus you cannot say they are Normally distributed.

As to what test you should use, there are specific tests for categorical data. A good introductory text is Agresti's Categorical Data Analysis. A nonparametric test would be used when data violates the assumptions of the traditional test you would use. While this data violates the assumptions of a test based on Normality it does not violate the assumptions of a test based on the binomial distribution, which is probably what you should use to model this data.

One type of analyses that immediately comes to mind is logistic regression. In logistic regression you are modeling the probability of a success(traditionally a 1 would be a success, but this is dependent on the situation) given some explanatory variable (in your case tool). So you would be testing to see if the model that takes tool into account does a better job of estimating the success probability(average number of 1's per tool group) than a model that assumes a constant probability regardless of tool group.

If you don't have access to Agesti's CDA book a basic intro that incorporates SPSS is found here http://www.appstate.edu/~whiteheadjc/service/logit/intro.htm And some of the assumptions of the test are pointed out here: https://statistics.laerd.com/spss-tutorials/binomial-logistic-regression-using-spss-statistics.php

In conclusion your data are not Normal, but you do not need to use a nonparametric test. I would suggest logistic regression. By learning some of these Categorical techniques you will greatly broaden the types of analysis you can do.

• Perfect! This is really useful information. I have just a few more questions: productivity can be still preformed by using nonparametric tests, correct? Regarding the logistic regression, in my case the independent variable would be the type of tool (tool-1 and tool-2), whereas the dependent variable would be the results for a question (1 correct, 0 incorrect)? – uglycode Feb 3 '16 at 15:46
• In general if your data are parametric(meaning they well described or come from some family of distributions, in your case the Binomial seems fitting) then you should use a parametric test. You should use a parametric test because it will be more powerful. One caveat is whether or not your sample size is large enough. F0r your second question Independent Variable would be the group means, so the sum of successes over the total amount of people responding in Tool group 1 and 2. For logistic regression you are modeling the probability of success(you want to see if tool group changes it.) – Robert Montgomery Feb 3 '16 at 15:58
• This is a good answer, but I want to take issue with your comment. Data are neither parametric nor nonparametric and I think applying the adjective to them is misleading. Models or procedures can parametric or nonparametric -- it's a feature of what people do with data, not of the data themselves. That the data might be reasonably well described by any number of parametric models doesn't mean much: since parametric models include (for example) mixture distributions, it's quite hard to come up with a set of data that could not be fairly well described by some form of parametric model. – Glen_b Feb 3 '16 at 22:39
• @Glen_b thank you for that clarification, I spoke too quickly. You are right what I said is misleading and is not an accurate way to determine whether or not you should be using a parametric test. – Robert Montgomery Feb 4 '16 at 4:38