# What statistic(s) should I consider when comparing continuous and binary data?

Long time reader, first time writer. As the question suggests, I have a data set that contains a continuous dependent variable (exam scores, 0-50) and answers to some binary survey questions (yes it happened or no it didn't happen). The binary questions ask students what obstacles they faced when studying (work, video games, etc). So students either did, or did not, encounter that obstacle for their exam.

Using that data, I want to test the question "Does Obstacle X have any significant effect on exam score?"

The problem is that I'm not sure what statistical test(s) would be most appropriate for this combination of data. From my extremely limited understanding, it seems like many of the common tests (e.g. chi-square or Pearson's) are not correct because the data is a mixture of binary and continuous.

I've considered combining the exam scores into categories (A/B/C/D/F), but have received conflicting results as to whether that is a good idea or not. I've also considered ranking the exams and trying to use some of those statistics, but my knowledge is not enough to know if that would be useful or counter-productive.

Any advice would be very much appreciated. And if I can supply any useful data or clarify anything, please let me know.

• I have made a slight grammatical edit, but for future reference (and since this is an important grammatical issue when discussing causality) see the difference between effect and affect.
– Ben
Commented Aug 31, 2021 at 19:56

## 2 Answers

One-way ANOVA (analysis of variance) is typically used when you have a categorical independent variable (with two or more categories) and a normally distributed continuous dependent variable (DV). It allows you to test for differences in the mean of the DV across the levels of the independent variable. So, in your case, it would allow you to test the hypothesis that for a particular obstacle variable, students who encountered that obstacle had a different mean exam score than students who did not.

You can read about the assumptions of this test and how to deal with situations when one or more of those assumptions is not met here. There was also a previous question about ANOVA assumptions here.

• Thank you! This is exactly what I was looking for! Commented Apr 6, 2019 at 18:52
• Please accept the answer if you are satisfied. Commented Apr 6, 2019 at 20:01

You can go for Mann-Whitney U test in case of non-parametric data (most of the real world data is in fact non parametric).

• Hi. Please capitalise and correctly spell the scientists' names. Commented Dec 12, 2022 at 8:50
• Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
– Community Bot
Commented Dec 12, 2022 at 9:35