Obtaining the power of most powerful test Let X be a random variable having the probability density function f which belongs to 
$f_{0}$,$f_{1}$. The $f_{0}$ is from uniform distribution, $U(0,1)$ while $f_{1}$ is also uniform with $U(0,2)$. 
For testing the null hypothesis $H_{0}:f=f_{0}$ versus the alternative hypothesis $H_{1}:f=f_{1}$ based on a single observation on X, the power of the most powerful test of size $\alpha =0.05$ will be?
I know, from the Neyman Pearson lemma, that the most powerful test is the ratio of likelihood functions under the alternative and null hypothesis. But, all the problems that I solved, the critical region used to come as a function of sample values. But in this problem, I am not able to get a critical region. If someone help me in the critical region, I am able to find the power of the test. Thanks in advance.
 A: The most reasonable test has power 50% and significance 0. Not a formal proof, but:


*

*If the null hypothesis is true, the single observation X will lie in $(0,1)$

*If the null hypothesis is false, the single observation X will lie in $(0,2)$

*Therefore, the only reasonable test (for any $\alpha$ below 50%) is to accept the null hypothesis if X lies in $(0,1)$ and reject it if it lies in $(1,2)$.

*If the nul hypothesis is false, the probability of getting X in $(1,2)$ is 50%, and then power of the test is 50%.


However, you could increase the power by using $\alpha=0.05$. You just need to reject the null hypothesis for a 5% of observations falling within $(0, 1)$, and since both under the null and the alternative hypothesis all points in $(0, 1)$ have the same probability, it doesn't matter how you decide for which 5% of points you reject the null hypothesis. For example, the following methods would be fine:


*

*Rejecting the null hypothesis for all values over 0.95

*Randomly deciding whether to reject with probability 5% in $(0, 1)$ and always rejecting in $(1, 2)$ (as suggested in Björn's comment).


This way, if the null hypothesis is false the, probability of rejecting it (aka power) is $0.5·0,05+0.5=0.525$, although you wouldn't use this test for a practical purpose.
