# Finding the most powerful test for composite alternative hypothesis

This is a continuation of the problem in Most powerful test given a sample from a variable with known but not common (I think) distribution

So having found the MP test for the simple hypothesis problem $H_0: \theta=0$ vs $H_1: \theta=2$, the next step asks if this test that was found is also UMP for the following problem:

$H_0: \theta<=0$ $H_1: \theta>0$

My intuition tells me that it should not be the UMP test since it was used only for $H_1: \theta=2$ and now our $H_1$ considers all values of $\theta>0$. However, the generalized test that was found in the first problem was to reject $H_0$ when:

$\frac{c(\theta)^nx^ne^{\frac{\theta}{2}\sum x_i^2}}{c(0)^nx^ne^{\frac{0}{2}\sum x_i^2}}>k$ which is also the same as

$\frac{(\frac{\theta}{e^{\theta/2}-1})^nx^ne^{\frac{2}{2}\sum x_i^2}}{2^nx^n}>k$

I recognize that in this form, every simple hypothesis test $H_1: \theta=\theta_1$ will be of the form $\sum x_i^2> t$ for some constant $t$ and for all $\theta_1>0$. Is this the UMP test that is being asked? Technically, it still is not the exact same test as the one when the value of $\theta$ in the alternative is fixed, right?

Note that your pdf $g(\theta)xe^{\theta \frac {x^{2}}{2}}$ is from the exponential family and has sufficient statistic $\sum X_i^2$.
Moreover, the pdf has monotone increasing likelihood. By Karlin-Rubin Theorem, the UMP test is to reject $H_0$ in favor of $H_1$ if $\sum X_i^2 \ge x_0$, where $x_0$ is chosen so that $P( \sum X_i^2 \ge x_0 ; \theta=0) = \alpha$.