Likelihood-based hypothesis testing $N_A$ and $N_B$ are variables of the counts of the number of events 'A' and events 'B' respectively. Those variables follow Poisson distributions with parameters $\lambda_A$ and $\lambda_B$.
In nature I made one observation of each variable; I observed $n_A$ events 'A' and $n_B$ events 'B'. From those, I am asking: Are $\lambda_A$ and $\lambda_B$ equal or different?
How can I make a hypothesis testing on the null that the rates $\lambda_A$ and $\lambda_B$ are the same?
I thought about using maximum likelihood methods. I could calculate the confidence intervals (CI) for both the parameters $\lambda_A$ and $\lambda_B$ and then see if the CI overlap (seems wrong to me). Or would it be appropriate to use MLEs for $\lambda_A$ and $\lambda_B$ to make a likelihood ratio test?
 A: As noted in the comments, the Wald statistic is simple, powerful and therefore a good choice for this problem. Now, for two Poisson populations, presumably independent, we wish to test the hypotheses that their parameters are equal, namely:
$$H_0: \lambda_1=\lambda_2\quad \text{vs} \quad H_1 :\lambda_1 \neq \lambda_2$$
The Wald statistic in this case is defined as
$$Z=\frac{\widehat{\lambda}_1-\widehat{\lambda}_2}{\sqrt{var({\widehat{\lambda}_1})+var({\widehat{\lambda}_2)}}}$$
and according to the theory of maximum likelihood it has an asymptotic standard normal distribution. The mle for the parameter $\lambda$ is of course the sample mean, so this is what should go in the numerator.
The denominator is a little more complicated. To see this, note that for the sample mean
$$var(\bar{X})=\frac{\sigma^2}{n}$$
but under the Poisson assumption, $\sigma^2=\mu$, right? So the question is, which estimator should we use for $\sigma^2$, the sample variance or the sample mean? The asymptotic distribution holds either way.
The answer is the sample mean, despite the fact that this might seem counter-intuitive. The reason is that the sample mean in a Poisson distribution is the UMVUE for the parameter $\lambda$ and therefore by using that instead of the sample variance, we gain precision.
We now have everything we need. The test takes the form:
$$Z=\frac{\widehat{\lambda}_1-\widehat{\lambda}_2}{\sqrt{\frac{{\widehat{\lambda}_1}}{n_1}+\frac{{\widehat{\lambda}_2}}{n_2}}}$$
Once you compute it, you can find the two-sided p-value from the Normal distribution or you can square it and look at the one-sided p-value of the $\chi^2 (1) $ distribution. This is often more convenient.
Hope this helps.
