# Difference between groups

I wanted to test if there is a difference between group levels so I created a contingency table that looks like

Respondents could fall into one of 4 levels of group B and they can pass or fail the test. I wanted to test if there is a difference between 4 levels in success/failure ratio.

Chi2 statistic suggested that I should reject null hypothesis and accept alternative hypothesis, i.e. it suggested that there is a difference between levels.

Since I wanted to know between which levels there is a difference, I used one sample t-test. It showed me that there is a difference between levels II&III and III&IV (I am not interested into differences between levels I&III, I&IV and II&IV).

Is this a proper way to do check for differences or there is some quicker, more proper and more elegant way to to that?

Thanks!

I'm finding the question to be confusing. The mixing of chi-square and t-test seems probably inappropriate, but I cannot tell.

If your data are interval-scale or ratio-scale, then I suggest that you use methods for that kind of data - ANOVA (which has easy-to-do post-hoc tests) or non-parametric tests such as Kruskal-Wallis. If your data are really occurrence-counts, then chi-square is the more appropriate test. In that case, you could run a second chi-square test on the pairs of groups that you are interested in. Note, however, that you will need to adjust your significance level, because you are running two tests on the same data (thus, a per-test significance level of .05 becomes approximately .10 when you repeat a test in this way). Please look up "Bonferroni correction" to learn how to adjust your significance level according to the number of repeated tests.

• Thank you for the answer. My data are occurrence-counts. I didn't know about Bonferroni correction but now I found some helpful examples. Thank you! – user217351 May 15 '18 at 18:37