Hypothesis-Testing – Statistical Comparison Between Binomial Distributions for Two Groups

binomial distributioncount-datahypothesis testingz-test

I have a data set with two groups. I have multiple trials with different Ns in each trial, and different numbers of trials for each group. In each trial, for each group, I am counting the number of successes.

How can I estimate the proportion of successes for each group under a binomial distribution (i.e. success or failure), with confidence intervals? How can I test whether the proportion of successes is the same between the two groups?

The standard Z-test for proportions is only described for one trial per group.

This question wasn't sufficient: Determining statistical significance of difference between two binomial distributions

Nor was this: Test if two binomial distributions are statistically different from each other

Best Answer

If I'm understanding your question right (and a couple simple assumptions are met), the second link you have gives you what you're looking for. So a simple probability fact is that if X and Y are independent, X~Bin(n,p) and Y~Bin(m,p) then X+Y~Bin(m+n,p). That means that if the trials in each of your groups are independent then

$\sum_{i=1}^{|G_{1}|}X_{i}$ ~Bin($\sum_{i=1}^{|G_{1}|}N_{i}^{1}$, p) and $\sum_{i=1}^{|G_{2}|}Y_{i}$ ~ Bin($\sum_{i=1}^{|G_{2}|}N_{i}^{2}$,p)

where the G's are the groups, the N_i are the n for each binomial trial (superscript tells the group) and |G| is the size of G. From there, you're back at the problem of estimating proportions and confidence intervals in binomial families. The big things to make sure of are that the trials within groups are independent and that you have no reason to believe the probabilities of success are different between trials within groups.

Related Question