# Uniformly Most Powerful test (UMP) (for Poisson random variables)

Consider testing $$H_0:\theta \leq \theta_0$$ against $$H_1:\theta>\theta_0$$. Let $$0<\alpha<1$$ be given. Suppose $$X_1,...,X_n$$ are i.i.d. Poisson distributed with parameter $$\theta>0$$: for all $$i\in\{ 1,...,n\}$$

\begin{align*} P_\theta(X_i=x)=e^{-\theta}\frac{\theta^x}{x!}, \; x\in\{ 0,1,... \}. \end{align*}

I want to find the UMP (Uniformly Most Powerful) test $$\phi$$ at level $$\alpha$$.

My attempt: I know the following thm.: Suppose $$\mathcal{P}$$ is a 1-d exponential family, i.e. $$p_\theta(x)=\exp(c(\theta)T(x)-d(\theta))h(x)$$ and assume $$c(\theta)$$ is trictly increasing, then a UMP test is \begin{align*} \Phi(T(x)) : \begin{cases} 1 \quad ,T(x)>c \\ q \quad, T(x)=c\\ 0 \quad, T(x) where $$q$$ and $$c$$ are chosen such that $$\mathbb{E}_{\theta_0}[\phi(T)]=\alpha$$.

So, since $$p_\theta=e^{-\theta}\frac{\theta^x}{x!}=\frac{1}{x!}\exp(x\ln(\theta)-\theta)$$ is an exp-familiy with $$c(\theta)=ln(\theta)$$ increasing, the thm. gives a UMP test an we need to find $$q$$ and $$c$$:

\begin{align*} \alpha=\mathbb{E}_{\theta_0}[\Phi(T)]=\mathbb{P}_{\theta_0}[X>c]+q\mathbb{P}_{\theta_0}[X=c] \quad \text{with} \quad X\sim\text{Poisson}(\theta). \end{align*}

Is this correct so far? And how do i get the values $$c$$ and $$q$$ from here?

I learned how to do this in a different way and idk if it helps you but,

you can form the likelihood ratio, $$\Lambda = \frac{l(\theta_1)}{l(\theta)}$$

We take, $$\theta$$ to be the largest value which satisfies $$H_0$$, and $$\theta_1$$ to be some value that satisfies $$H_1$$ and define the test,

$$\Lambda > k$$ for some constant k

$$\to \Pi_{i =0}^n e^{-\theta_1+\theta} (\frac{\theta_1}{\theta})^{x_i} > k$$

$$\to e^{-n\theta_1+n\theta} (\frac{\theta_1}{\theta})^{\sum_{i =0}^n x_i} > k$$

then we can take the ln of both sides since the log is order preserving, $$\to -n\theta_1+n\theta + ln(\frac{\theta_1}{\theta}) \sum_{i =0}^n x_i > k_2$$ $$\to ln(\frac{\theta_1}{\theta}) \sum_{i =0}^n x_i > k_3$$ $$\to \sum_{i =0}^n x_i > k_4$$ now we just need $$p_{\theta}(\sum_{i =0}^n x_i > k_4) =\alpha$$