Checking if two Poisson samples have the same mean This is an elementary question, but I wasn't able to find the answer.  I have two measurements: n1 events in time t1 and n2 events in time t2, both produced (say) by Poisson processes with possibly-different lambda values.
This is actually from a news article, which essentially claims that since $n_1/t_1\neq n_2/t_2$ that the two are different, but I'm not sure that the claim is valid.  Suppose that the time periods were not chosen maliciously (to maximize the events in one or the other).
Can I just do a t-test, or would that not be appropriate?  The number of events is too small for me to comfortably call the distributions approximately normal.
 A: To test the Poisson mean, the conditional method was proposed by Przyborowski and Wilenski (1940). The conditional distribution of X1 given X1+X2 follows a binomial distribution
whose success probability is a function of the ratio two lambda. Therefore,
hypothesis testing and interval estimation procedures can be readily developed from
the exact methods for making inferences about the binomial success probability.
There usually two methods are considered for this purpose,


*

*C-test

*E-test


You can find the details about these two tests in this paper.
A more powerful test for comparing two Poisson
means
A: You're looking for a quick and easy check.
Under the null hypothesis that the rates (lambda values) are equal, say to $\lambda$, then you could view the two measurements as observing a single process for time $t = t_1+t_2$ and counting the events during the interval $[0, t_1]$ ($n_1$ in number) and the events during the interval $[t_1, t_1+t_2]$ ($n_2$ in number).  You would estimate the rate as
$$\hat{\lambda} = \frac{n_1+n_2}{t_1+t_2}$$
and from that you can estimate the distribution of the $n_i$: they are Poisson of intensity near $t_i\hat{\lambda}$.  If one or both $n_i$ are situated on tails of this distribution, most likely the claim is valid; if not, the claim may be relying on chance variation.
A: How about:
poisson.test(c(n1, n2), c(t1, t2), alternative = c("two.sided"))

This is a test which compares the Poisson rates of 1 and 2 with each other, and gives both a p value and a 95% confidence interval.
