6
$\begingroup$

$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?

$\endgroup$
  • $\begingroup$ You might want to clarify this a bit, you first state that you know the parameters, and you don't have an estimate. Since you know the parameters you already know if they are the same or not, so why are you doing a test? Then you start talking about CI's for parameters, unless you are doing something Bayesian, your parameters are not stochastic. Remember that you do tests based on the distribution of your estimator, and these tests should reflect the chance that the estimator comes from some null distribution. $\endgroup$ – Jonathan Lisic Jun 3 '15 at 20:15
  • 1
    $\begingroup$ Reading your comment I drastically changed my post. Not to change its meaning but to simplify the question. In short: You observe two values 'n_A' and 'n_B' drawn from two Poisson distributions. You want to know how whether the parameter $\lambda_A$ and $\lambda_B$ of the Poisson distributions from which 'n_A' and 'n_B' are drawn are the same or not. Does it make sense? $\endgroup$ – Remi.b Jun 3 '15 at 20:40
  • 1
    $\begingroup$ Would you consider a Wald test based on the mles? en.wikipedia.org/wiki/Wald_test $\endgroup$ – JohnK Jun 3 '15 at 21:51
  • 1
    $\begingroup$ Indeed Wald test seems like a good solution. I have the same issue than with a likelihood ratio. Can I just chose whichever $\lambda$ I want to be in the numerator (lieklihood ratio) or to be \theta_0 (Wald test)? $\endgroup$ – Remi.b Jun 4 '15 at 0:42
  • 1
    $\begingroup$ @Remi.b What you have to put in the numerator is the difference between the mles, under the null hypothesis that the population parameters are equal. It's quite straightforward and it gives reliable results for even moderately large samples. $\endgroup$ – JohnK Jun 4 '15 at 1:08
7
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ That was a perfect, detailed right to the level I needed answer! +1 Thank you $\endgroup$ – Remi.b Jun 4 '15 at 2:07
  • $\begingroup$ (+1). Why do you think it is "more convenient" to use the squared statistic? $\endgroup$ – Alecos Papadopoulos Jun 4 '15 at 12:41
  • $\begingroup$ @AlecosPapadopoulos This is a personal preference, nothing scientific. $\endgroup$ – JohnK Jun 4 '15 at 12:42
  • 1
    $\begingroup$ @JohnK Certainly, but I was asking exactly about such a personal preference, it is interesting to share such points of view. For example, at that level one could argue in favor of the t-statistic, that it immediately provides also a symmetric confidence interval. $\endgroup$ – Alecos Papadopoulos Jun 4 '15 at 12:47
  • $\begingroup$ @AlecosPapadopoulos The confidence interval is certainly a good point that can be made. I was focusing on computing p-values which I find easier when there is a one-tailed test involved. Less likely to make a mistake this way. In general I find the definition of the two sided p-values outside symmetric distributions $$p=2 \min \left\{ P \left( X\leq x|H_0 \right), P\left( X\geq x |H_0 \right) \right\} $$ a little off-putting $\endgroup$ – JohnK Jun 4 '15 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.