I have data of existence of a feature in n samples represents m groups. I want to find features with significantly different proportion in a group. I was thinking about the followings, and will be glad to get your input.
1) testing the proportions in each group using proportion test. The expected proportion of group i will be the relative frequency of samples in group i (# of sample in i/ all samples(n)). The observed will be the number of samples in group i in which the feature exists relative to all samples with the feature (from all groups). So if I have 100 samples, 20 in group i, in 10 samples of group i the feature exists out of 30 samples totally. The expected will be 20/100 and the observed will be 10/30.
2) Testing using contingency table.
- 2x2 table for each group in which I'll check the group i relative to all the other groups together. So the cells in the table will be existence in group i, existence in all other group, not exist in group i not exist in all groups. Back to the mention example- the table will look like:
- 2xm (m is number of groups) contingency table.
For the 2x2 I'll prefer using fisher exact test for its accuracy (and it is not limited by sample size). For the 2xm I think to use chi-square since it can be followed by Marascuillo procedure, unless there is a similar alternative for checking pairs of proportions followed by fisher.
I'll be very thankful for any input!