Neyman-Pearson hypothesis testing with uniform random variables This question is quite simple. We have a random sample $X_1, X_2, ..., X_n$ from $U(\theta, \theta + 1)$ and we want to test $H_0: \theta=0$ vs $H_0: \theta=\theta_1$ for some $0 < \theta_1 < 1$. We want to use Neyman-Pearson's lemma to find the most powerful test. The likelihood-ratio is
$\lambda = \frac{L_0}{L_1} = \frac{L(\theta_0 , x_1,x_2,...,x_n)}{L(\theta_1 , x_1,x_2,...,x_n)} = \frac{I_{(0, \infty)}(y_1)I_{(-\infty,1)}(y_n)}{I_{(\theta_1, \infty)}(y_1)I_{(-\infty,\theta_1 + 1)}(y_n)}$, where $y_1 = min(x_1,...,x_n)$ and $y_n = max(x_1,...,x_n)$.
According to Neyman-Pearson, the most powerful test is $\Lambda \leqslant k$ for some $k$. If we want the test to have size $\alpha$ then we have to find $k$ such that $P_{\theta = 0}(\Lambda \leqslant k) = \alpha$.
If $\theta = 0$, $\Lambda$ equals just $\frac{1}{I_{(\theta_1, \infty)}(y_1)}$ so now we have to find $k$ such that $P_{\theta = 0}(\frac{1}{I_{(\theta_1, \infty)}(y_1)} \leqslant k) = \alpha$.
I don't know how to find such a $k$ and feel like I may be misunderstanding something.
 A: The likelihood ratio requires a bit more careful study here.
Pdf of the sample $X_1,\ldots,X_n$ is $$f_{\theta}(\mathbf x)=\prod_{i=1}^n \mathbf1_{\theta<x_i<\theta+1}=\mathbf1_{\theta<x_{(1)},x_{(n)}<\theta+1}\quad,\,\theta\in\mathbb R$$
I would define the ratio as $\Lambda=f_{H_1}/f_{H_0}$, for which I get the following cases:
\begin{align}
\Lambda(\mathbf x)=\frac{f_{H_1}(\mathbf x)}{f_{H_0}(\mathbf x)}&=\frac{\mathbf1_{\theta_1<x_{(1)},x_{(n)}<\theta_1+1}}{\mathbf1_{0<x_{(1)},x_{(n)}<1}}
\\\\&=\begin{cases}1&,\text{ if }\theta_1<x_{(1)},x_{(n)}<1 \\ \infty &,\text{ if }x_{(1)}>\theta_1,1<x_{(n)}<\theta_1+1 \\ 0&,\text{ if }0<x_{(1)}<\theta_1,x_{(n)}<1\end{cases}
\end{align}
By N-P lemma, you are to reject $H_0$ for large values of $\Lambda$. Can you give it a try now?

I found a similar exercise here that asks to prove that a UMP test for testing $H_0:\theta\le 0$ vs $H_1:\theta>0$ is of the form
$$\varphi(\mathbf x)=\begin{cases}1&,\text{ if }x_{(1)}\ge k\,\,\text{ or }\,\,x_{(n)}\ge 1 \\ 0&,\text{ otherwise }\end{cases}$$
, where $k$ can be easily found so that size of $\varphi$ is $\alpha$.
This is exercise 6.6.18 of Mathematical Statistics by Shao (page 456, 2nd edition).
If you can see this page, then maybe you can use this exercise to verify your final results.
