# Comparing multiple sample proportions between two groups where one group is a subset of the other

I have 2 populations which I want to test if the proportions between group A and B are the same for each location or not by using hypothesis testing. It's very much as this problem described here: Comparing multiple sample proportions between two groups. However in my case it's not between two independent groups but group B population is a subset of group A's. Can I still use the method described in the link or do I have to think differently? Is there a fallacy I am missing out here? My data looks like this:

Group A    Group B
Location 1                 20090      17
Location 2                 24604      10
Location 3                 12284      5
Location 4                 14843      12
Location 5                 20592      9
Location 6                 8715       4

I am thinking because I have such a low count in group B, Fisher's exact test should be better suited here if I am gonna use something similar as the link.

• If these are truly populations then just compare the proportions: they are whatever they are. If they are samples, then just compare group $B$ to everything that's in $A$ but not in $B.$ The chi-squared test will work fine.
– whuber
Apr 25, 2021 at 13:59
• Please clarify what the proportions are in reference to...and to make sure I'm understanding the question, the last location has 4 B, 8715 A, and thus 8711 A-which-are-not-B...¿is this correct? Apr 25, 2021 at 17:06
• @GreggH yes that is correct. Apr 26, 2021 at 8:33
• And you are just asking if the distribution across locations is the same as for B as for A-not-B. If so, this is just a multinomial comparison. Apr 26, 2021 at 21:31
• Yeah, after your input I realize I could do a Fischer exact test with simulated p-values in R. It would give me a p-value which meant I couldn't reject H_0 Apr 27, 2021 at 6:40