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.

  • $\begingroup$ You will need to explore the possibility of data for which the likelihood under one hypothesis is $1$ and under the other hypothesis is $0.$ In these cases your expression for $\Lambda$ is undefined, so you had better not rely on it. $\endgroup$ – whuber May 6 '19 at 15:14
  • $\begingroup$ So Neyman-Pearson's lemma is inapplicable in this situation? $\endgroup$ – Noppawee Apichonpongpan May 6 '19 at 16:40
  • $\begingroup$ It has to be carefully interpreted in this situation. Consider rewriting the event $\Lambda \le k$ as $L_0 \le kL_1.$ $\endgroup$ – whuber May 6 '19 at 16:45
  • $\begingroup$ Thank you, I will try that. $\endgroup$ – Noppawee Apichonpongpan May 6 '19 at 16:46
  • 1
    $\begingroup$ I don't think the theorem asserts you can create a test of exactly the intended size--but you definitely can control it. $\endgroup$ – whuber May 7 '19 at 13:27

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.

| cite | improve this answer | |
  • $\begingroup$ Thank you, you are wonderful. I am still digesting your answer. $\endgroup$ – Noppawee Apichonpongpan May 8 '19 at 15:08
  • $\begingroup$ You should verify the expression for $\Lambda$ first of all and then proceed accordingly. $\endgroup$ – StubbornAtom May 8 '19 at 15:15
  • $\begingroup$ I think I am supposed to use a randomised test, right? If $\theta_1 < x_{(1)}$ then I reject $H_0$ with some probability that makes the size of the test $ \alpha $. $\endgroup$ – Noppawee Apichonpongpan May 8 '19 at 15:20
  • $\begingroup$ @NoppaweeApichonpongpan No need for randomisation here. $\endgroup$ – StubbornAtom May 8 '19 at 21:25
  • $\begingroup$ No randomisation? I thought I understood but now I am back to being confused. The test I got is ---- reject $H_0$ if $X_{(n)} > 1$ (in this case $Y_{(1)} > \theta_1$) ---- accept $H_0$ if $X_{(n)} < 1$ and $X_{(1)} < \theta_1$ ---- if $X_{(n)} < 1$ and $X_{(1)} > \theta_1$ then reject $H_0$ with probability $\frac{\alpha}{(1-\theta_0)^n}$ This test has size $\alpha$ and I think (but is not sure) is most powerful. Is this incorrect? $\endgroup$ – Noppawee Apichonpongpan May 9 '19 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.