Let's take this non-sense sample data:

   contin1 categor2 smokers lazy
         1        2       1    1
         2        2       1    1
         3        1       1    1
         4        2       0    1
         5        2       1    1
         6        1       0    1
         7        3       1    0
         8        1       1    0
         9        1       0    0
        10        1       0    0

How can I compare smokers (smokers == 1) and lazy people (lazy == 1) with each other?

  • For contin1 (continuous Variable) I would normally use a ttest or utest.
  • For categor2 a Chisq-test.

When comparing lazy ppl with smokers the two groups have duplicated values. How do I deal with that? Whats the right test to see if they are "statistically different" or associated?


Since These are categories you should straight go for Chi-Sq test, i don't understand what duplicate values you are talking about. If you can make the Contingency table from this data this would be like this.

The Values are as per your data.

enter image description here

Please explain what duplicate values you are talking about and whats your hypothesis.

First this is a sample data and second this only a contingency table not the chisq result.

But one thing can be done if you take smoker to be a binary target variable and lazy to be independent variable and run a logistic regression and check the p-value of independent variable and then you can calculate odds, and also derive some relationship if exist.

  • $\begingroup$ @Andre is looking for a way to compare lazy people and smokers. To test if 1. these two populations have the same mean value for a given continuous variable contin1 and 2. If the populations have the same representation of a given categorical variable categor2. We're not looking to see if there is the same number of lazy people as there are smokers in the study. $\endgroup$ – timwiz Feb 6 '19 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.