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