# Hypothesis testing for a Poisson distribution

Let $$\mathbf{X}=\left\{X_{1}, X_{2}, \ldots, X_{n}\right\}$$ be an independent random sample from the Poisson distribution with parameter $$\theta>0$$. (i) Find the rejection region of the most powerful test for hypotheses: $$H_{0}: \theta=1 \text { versus } H_{1}: \theta=2$$ (ii) Find the critical value such that this test has an exact size 0.05.

I could show that the answer to (i) is $$\{\sum_{i=1}^nX_i \ge k\}$$, but I'm don't know how to compute the exact value of $$k$$ in (ii). All I could show is that $$2n=\chi^2_{\alpha=0.95,df=2k}$$

• The critical value is derived solving in $k$ the following probabilty $$\mathbb{P}\left[\sum_{i=1}^{n}X_i\geq k|\theta=1\right]=0.05$$ thus you have to calculate the probabilities of a poisson $Po(n)$ and obviously in most cases to have "exactly" a size of 5% you must use a randomized test, but anyway you cannot do any calculations if you do not fix a certain $n$ – tommik May 7 at 7:54

To get an answer it is necessary to fix a certain $$n$$. So let's set $$n=5$$

as per Neyman Pearson's Lemma, the critical region is

$$\mathbb{P}[Y\geq k]=0.05$$

where $$Y\sim Po(5)$$

It is easy to verify with a calculator (or manually in 5 minutes) that

$$\mathbb{P}[Y\geq 10]=3.18\%$$

and

$$\mathbb{P}[Y\geq 9]=6.81\%$$

It is evident that there's no way to have a non randomized test which gets exactly a 5% size...thus the test must be randomized in the following way:

• If the sum of the observations is 10 or higher I reject $$H_0$$

• If the sum of the observations is 8 or lower I do not reject $$H_0$$

• If the sum of the observations is exactly 9 I toss a fair coin and I reject $$H_0$$ if the coin shows Head.

this can be formalized as follows:

$$\psi(y) = \begin{cases} 1, & \text{if y>9} \\ 0.5, & \text{if y=9} \\ 0, & \text{if y<9 } \end{cases}$$

And the total size is

$$\alpha=0.5\times P(Y=9)+P(Y>9)=0.5000\times0.0363+0.0318=0.0500$$

.., as requested

Let's take $$n = 20$$ for an example. Use $$T = \sum_{i=1}^{10} X_i$$ as your test statistic, retaining $$H_0$$ for small $$T$$ and rejecting $$H_0$$ for large T.

$$T \sim \mathsf{Pois}(\lambda = 10\theta).$$ The critical value $$c=16$$ will have $$P(T \ge c\,|\,\lambda=10)= 0.049 \approx 0.05,$$ but not larger.

qpois(.95, 10)
[1] 15
1 - ppois(15, 10)
[1] 0.0487404


So (without randomization) a test at exactly level 5% is not available because of the discreteness of Poisson distributions. [If you use a normal approximation, you might fool yourself into thinking you can have a teat at exactly 5%, but that would involve a noninteger, thus nonobtainable, $$c.]$$

$$P(T \ge c) = P\left(\frac{T-\lambda}{\sqrt{\lambda}} \ge \frac{c-10}{\sqrt{10}}\right)$$ $$\approx P\left(Z < \frac{c-10}{\sqrt{10}} = 1.645\right) = 0.05,$$ so $$c = 15.20.$$''

However, @Tommik's (+1) randomization method is the only valid way to get a test at exactly level $$\alpha=0.05.$$