# Mean of Poisson distribution experimentally

Suppose I approximate a variable (events of certain type) by a Poisson distribution and I would like to write a program and measure the mean experimentally. The idea is that I have an algorithm which outputs an event which is either of our interest or not.

I m measuring the mean as follows. Start a counter N and let T then number of events found after N iterations of the algorithm. Then, I compute T/N and keep increasing N until there is not significant change in 2nd decimal place. Is there any more formal way to set a stopping condition for finding T/N with some desired precision?

You could use the SE of the estimate, which, because it's Poisson, is estimated by $SE \approx \sqrt{(T/N)/N} = \sqrt T /N$ (i.e., the square root of the estimated mean, divided by the square root of the sample size). Then with about 95% confidence, the true mean is within $\pm2\cdot SE$ of the true mean. That is, you could stop when $2\sqrt{T}/N < .005$ to obtain 2 decimal places accuracy with 95% confidence
The conjugate prior of the Poisson distribution with mean $\lambda$ is Inverse-Gamma with shape $T$ and rate $N$. Increase $N$ until the precision of the prior distribution satisfies some concentration requirement.