I am struggling with calculating a confidence interval for my data using a Poisson distribution. The context is manufacturing process quality control, and I think that a Poisson distribution is the correct model for my process.
My confusion comes from the fact that my sample observations are not all the same size, and I don't understand how to account for this. Here is a simplified example.
My factory grinds flour. During the grinding, sometimes rocks fall in the flour. This occurs at random time intervals.
I have 500 samples randomly taken from that process, and I found a total of 7 rocks. I would like to calculate a confidence interval for the number of rocks per 1000 kg of flour.
If all the samples were 1 kg, I would just use the formula for an exact Poisson confidence interval. The rate is low, so my understanding is that I have to use the exact form rather than a normal approximation. For 7 observations out of 500 samples, I would calculate the mean as $7/500=0.0140$ with a 95% confidence interval of $(0.0056, 0.0288)$. Converted to a per 1000 kg basis, this would be 5.6 to 28.8 rocks per 1000 kg.
However, in my case, some of the samples are 1 kg, and some of them are 2 kg. Here's a summary of my data:
\begin{matrix} \text{Sample Number} & \text{Size} & \text{Particle Count} \\ 1 & 1 \text{ kg} & 2 \\ 2 & 1 \text{ kg} & 1 \\ 3 & 1 \text{ kg} & 1 \\ 4 & 2 \text{ kg} & 1 \\ 5 & 2 \text{ kg} & 1 \\ 6 & 2 \text{ kg} & 1 \\ 7 \text{ to } 300 & 1 \text{ kg} & 0 \\ 301 \text{ to } 500 & 2 \text{ kg} & 0 \\ \end{matrix}
So, the observed occurrence rate for rocks is 7 rocks per 703 kg of flour, or 9.96 rocks per 1000 kg. How do I calculate a 95% confidence interval for this mean? I considered just treating each 2 kg sample as two separate 1 kg samples, but I am not sure if this is really valid.
I am somewhat familiar with the concept of "offsets" in Poisson regression, but I don't understand how to apply that for calculating a confidence interval.