I want to identify the effect of a feature on a number of events. Each observation has >= 0 events and is assigned to one group, A or B. Each observation was assigned to a group by random sampling, and observations in group A were exposed to a treatment that group B was not exposed to.
I have a very large amount of observations (> 300K). This is an idea of what my table looks like:
Obs Nb_events Group
1 0 A
1 0 B
1 0 B
1 2 A
1 0 A
...
The overall probability of having at least one event is 0.04. If the observation is in group A, it's 0.00442, and if it's in group B, it's 0.00436.
The mean for group A is 0.01 and for group B it is 0.012.
The standard deviation of the number of events is 0.292 for group A and 0.234 for group B.
I want to estimate, as simply as possible, a confidence interval of the effect of being in group B on the number of events and the probability of having at least one event. I have read that my data seems to follow a negative binomial distribution model, or a highly dispersed Poisson model because sample variance > sample mean.
However, I don't know how to find a confidence interval given this. It seems like I can't use a normal approximation, and a Poisson approximation does not seem to fit my data either. Given this, how can I estimate a standard 95% confidence interval as simply as possible for my data?
I also want to find a confidence interval for the probability of having at least one event. I wanted to use the usual confidence interval based on normal approximations, for two samples.
But this also posits a normal approximation using Central Limit Theorem and that does not seem to be verified because my p is extremely low.
Edit: I haven't found an answer to this yet besides using an exact test, which is, I believe, computationally intensive given my sample sizes.
Instead of finding a confidence interval, I think simply measuring whether the difference between my proportions is significant would be approproate.
I believe a chi square goodness of fit test would work well here, based on [this question][1]
. However, I think it would not be applicable to my count data. Can you confirm this?