I have a two groups of data - 1/ All data and 2/ Selected_season, which is only some subgroup of all data. I want to find out: a/ if proportion of BM, HB, etc. groups is the same in All data and Selected_season b. if not - which groups are different?

enter image description here

Which statistical test should I use? Is it implemented in R?


1 Answer 1


You should not compare a subset with the whole, but with everything-but-the-subset (if the subset is different from its complement, it differs from the whole).

Then - if you treat all the data as a sample from the population of interest - you have a standard test of homogeneity of proportions. There are ways of identifying the unusual rows.

If you really regard the whole as the population you could compare the subset with the whole, but you'd need to consider that you're sampling without replacement.

  • $\begingroup$ "...a standard test of homogeneity of proportions..." Do you mean a chi-square test of homogeneity? $\endgroup$
    – Jot eN
    Commented Sep 30, 2014 at 15:17
  • $\begingroup$ Yes -- at least, that would be the most common choice, but it's not the only possible one. $\endgroup$
    – Glen_b
    Commented Sep 30, 2014 at 21:29
  • $\begingroup$ Chi-square test of homogeneity will compare subset with everything-but-the-subset. But, if they're different - how to find out which (BM, HB, etc.) are different? $\endgroup$
    – Jot eN
    Commented Oct 2, 2014 at 12:30
  • $\begingroup$ If you simply want individual comparisons of each, do a set of two-sample proportions tests (2x2 chi squares). If you want an overall test of difference, do the combined test. If you want to do a combined test and then "assign credit/blame" for the rejection, you need a post hoc. One way to do that would be to do the individual 2x2 comparisons with an adjustment for multiple comparisons $\endgroup$
    – Glen_b
    Commented Mar 5, 2015 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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