# UMP test of size $\alpha$ for $H_0: \theta=0$ versus $H_1: \theta >0$ with $X_1,X_2,\dots,X_n \stackrel{iid}{\sim} \mathcal{U}(\theta,\theta+1)$

(Note - This is also on MSE but I thought I might have better luck here). I was posed the following question:

Let $X_1,X_2,\dots,X_n \stackrel{iid}{\sim} \mathcal{U}(\theta,\theta+1)$. Consider testing $H_0: \theta=0$ versus $H_1: \theta >0$ via the rule: Reject $H_0$ in favor of $H_1$ if $X_{(1)} >1$ or $X_{(n)} >(1-\alpha)^{1/n}$. The test has size $\alpha$; is it the UMP test of size $\alpha$?

And I'm not sure of the answer. So naturally I wanted to try to construct the UMP test if it exists. The only "sure-fire" ways of constructing a UMP test that I know of are:

1. Neyman-Pearson, which only applies for two simple hypotheses
2. Karlin-Rubin, which only applies when your distribution has Monotone Likelihood Ratio

In this case, $(X_{(1)},X_{(n)})$ is jointly sufficient for $\theta$, so I don't believe the concept of MLR can be utilized since MLR is necessarily one dimensional.

My next thought was to fix $\theta_1 >0$ and test $H_0:\theta =0$ versus $H_1: \theta = \theta_1$ so we can use Neyman-Pearson. Then, if the resulting tests depended on $\theta_1$, we could conclude that no UMP exists. (Is this reasoning correct?)

We'd form the likelihood ratio: $$\Lambda = \dfrac{L(\theta=0;\vec x)}{L(\theta = \theta_1; \vec x)}= \dfrac{\mathbf{1}[0 < x_{(1)} \le x_{(n)} < 1]}{\mathbf{1}{[\theta_1 < x_{(1)} \le x_{(n)} < \theta_1+1]}}$$ and reject if $\Lambda$ is sufficiently small. But how would I form a rejection rule from this?

Assuming the denominator is nonzero, $\Lambda$ would either equal 1 or 0, the latter of which would occur when $1 < x_{(n)} < \theta_1+1$ or when $1 < x_{(1)} \le x_{(n)} \le \theta_1+1$. So the rejection region would be $\{X_{(n)} >c_1\} \cup \{X_{(1)} > c_2\}$, where $c$ is chosen so that $P((X_{(n)} > c_1) \cup (X_{(1)} > c_2); H_0)=\alpha$. And from here I'm stuck.

Overall, I have two questions.

1. Is my reasoning with Neyman Pearson and the calculations with $\Lambda$ and the Rejection Region all correct?
2. If not, then I still need to find the UMP or concoct a test that's more-powerful than the given one. How would I do this, particularly finding the UMP?
• I think it is known that the Neyman Pearson lemma extends to composite alternatives if you there is a monotone likelihood ratio. There have been several examples on this site (3 lately) where a continuous uniform distribution is defined on an interval where the endpoints are determined by a single parameter theta. In these cases it seems that the maximum and minimum values from the sample are sufficient statistics. You reject H0 when the minimum is greater than 1 because if theta =0 then the distribution is U[0,1] and it is impossible for any observation including the minimum to be >1. Dec 30 '16 at 3:54
• The condition that you would reject H0 if X_(n) < (1-alpha)^1/n does not make sense to me. Dec 30 '16 at 4:03
• Sorry Michael - I just corrected that typo. It's the opposite inequality. Dec 30 '16 at 4:05

Fix an alternative $\theta_1 \in (0,1)$.

Now the likelihood ratio is (I prefer to use the null in the denominator and alternative in numerator):

$$\Lambda = \left\{\begin{matrix}0 &, 0<X_{(1)} < \theta_1 \\ 1 &\text{, } \theta_1 \leq X_{(1)} \leq X_{(n)} \leq 1 \\ \infty &, 1 < X_{(n)} < 1 + \theta_1 \end{matrix}\right.$$

These are the only cases to which any mass is assigned under both the null and the alternative, so we don't have to consider anything else.

It will be convenient to consider two further subcases: First let $\theta_1 < (1-\alpha)^{1/n}$.

Then, the test you specified has the following properties:

1. It has size $\alpha$. (easy to be checked)
2. It rejects for $\Lambda > 1$, does not reject for $\Lambda < 1$.

Hence by Neyman-Pearson, it is the most powerful test for $H_0: \theta = 0$ versus $H_1: \theta = \theta_1$.

Similarly, in the case $\theta_1 \geq (1-\alpha)^{1/n}$, the test still satisfies 1. and now 2. reads: The test rejects for $\Lambda > 0$, does not reject for $\Lambda < 0$.

So also in this case the test is most powerful. (Note Neyman Pearson does not force a particular behaviour at the boundary $\Lambda = k$ as long as the size is $\alpha$.)

Hence your test is most powerful against any alternative $\theta \in (0,1)$. Furthermore the test has maximal power (power equal to $1$) for $\theta \geq 1$, hence it is also most powerful then. Thus it is UMP for testing $H: \theta = 0$ vs $H_1: \theta >0$.

• I'm curious about your comment "Neyman Pearson does not force a particular behaviour at the boundary $\Lambda = k$ as long as the size is $\alpha$". Can you describe this in more detail? In particular, if I switched the numerator & denominator for the LRT, the case $\theta_1 \ge (1-\alpha)^{1/n}$ would read: reject for $\Lambda < \infty$ and fail to reject for $\Lambda > \infty$ . . . is this really OK? Jan 7 '17 at 6:09
• Also, it's ok to ignore indeterminate forms for the LRT test? I haven't dealt with that before Jan 7 '17 at 6:10
• Sorry one more comment before I sleep. If I go by this definition of Neymann-Pearson (en.wikipedia.org/wiki/Neyman%E2%80%93Pearson_lemma), then I'd reject for $\Lambda \le 1$, where $$\alpha = P( \Lambda \le 1 ; H_0 ) = P( [1 < X_{(n)} < \theta_1 + 1] \cup [\theta_1 \le X_{(1)} < X_{(n)} \le 1] ; H_0) = P(\theta_1 \le X_{(1)})$$ Then $\alpha$ depends on $\theta_1$, so I fail to see how this can be UMP for all $\theta_1 \in (0,1)$. Jan 7 '17 at 6:19
• What do you mean with "indeterminate" forms? The Wikipedia article is really bad and gives a very weak form of Neyman Pearson. It does not deal at all with randomization and what happens at the boundary. If available to you, look in Romano & Lehmann's "Testing Statistical Hypotheses" textbook for a precise statement of the Neyman-Pearson theorem. I think this will also answer your 1st and 3rd comments.
– air
Jan 7 '17 at 8:26
• Will do - that sounds great. With indeterminate forms,, I meant cases where the LRT gave $0/0$ or $\infty / \infty$ or $0/\infty$ or $\infty/0$. Wasn't sure what to do in those situations. Jan 7 '17 at 14:12