# Most powerful test of simple vs. simple in $\mathrm{Unif}[0, \theta]$

Say $$X \sim \mathrm{Unif}[0, \theta]$$. Denote the observations as $$x_i$$ $$(i=1, \cdots, n)$$.

Show that any test $$\phi$$ that satisfies the following two conditions is most powerful test of level $$\alpha$$ for $$H_0 : \theta = \theta_0$$ vs. $$H_1 : \theta = \theta_1$$ $$(\theta_1 > \theta_0)$$.

• $$\phi^{*}(x_1, \cdots, x_n) = 1 \ \ (\mathrm{if} \max\{x_1, \cdots, x_n\}) > \theta_0$$

• $$\mathbb{E}_{\theta_0} \phi^{*}(X) = \alpha$$

Try

By Neyman-Pearson lemma, any test that satisfies

• $$\phi^{*}(x_1, \cdots, x_n) = \begin{cases} 1 & (\mathcal{L}(\theta_1 | x_1, \cdots, x_n)/\mathcal{L}(\theta_0 | x_1, \cdots, x_n) > k) \\ \gamma & (\mathcal{L}(\theta_1 | x_1, \cdots, x_n)/\mathcal{L}(\theta_0 | x_1, \cdots, x_n) = k) \\ 0 & (\mathcal{L}(\theta_1 | x_1, \cdots, x_n)/\mathcal{L}(\theta_0 | x_1, \cdots, x_n) < k) \end{cases}$$

(for some $$\gamma \in [0,1]$$)

• $$\mathbb{E}_{\theta_0} \phi^{*}(X) = \alpha$$

is an MP test for $$H_0$$ vs. $$H_1$$.

Since

\begin{aligned} \mathcal{L}(\theta_1 | x_1, \cdots, x_n)/\mathcal{L}(\theta_0 | x_1, \cdots, x_n) &= (\theta_0 / \theta_1)^n I(\max x_i \le \theta_1)/I(\max x_i \le \theta_0) \\ &= \begin{cases} (\theta_0/\theta_1)^n & (\max x_i > \theta_0) \\ \infty & (\max x_i \le \theta_0) \end{cases} \end{aligned}

we have

$$\phi^{*}(x_1, \cdots, x_n) = \begin{cases}1 & (\max x_i > \theta_0) \\ \alpha & (\max x_i \le \theta_0) \end{cases}$$

is an MP test for $$H_0$$ vs. $$H_1$$.

But this does not mean ANY test that satisfies

• $$\phi^{*}(x_1, \cdots, x_n) = 1 \ \ (\mathrm{if} \max\{x_1, \cdots, x_n\}) > \theta_0$$

• $$\mathbb{E}_{\theta_0} \phi^{*}(X) = \alpha$$

is an MP test, but rather just provides an example of MP test.

Is there anyone to help me out?

• You might want to check the inequality signs when you say $\begin{cases} (\theta_0/\theta_1)^n & (\max x_i > \theta_0) \\ \infty & (\max x_i \le \theta_0) \end{cases}$ as I suspect you intended these the other way round. It does not affect the rest of your argument – Henry Nov 30 '18 at 1:44

## 1 Answer

The logic is:

• Any test which satisfies the two conditions has the same significance level $$\alpha$$ and power $$1-\left(\frac{\theta_0}{\theta_1}\right)^n +\alpha\left(\frac{\theta_0}{\theta_1}\right)^n$$ as the particular test you found; the

• Given that your test is most powerful of all tests with significance level $$\alpha$$, all the other tests satisfying the two conditions are also most powerful with significance level $$\alpha$$

If you want to check, consider the significance level and power of these two deterministic tests

• $$\phi^{*}(x_1, \cdots, x_n) = \begin{cases} 1 & \text{ when }\max x_i > \theta_0 \sqrt[n]{1-\alpha} \\ 0 & \text{ when }\max x_i \le \theta_0 \sqrt[n]{1-\alpha} \end{cases}$$
• $$\phi^{*}(x_1, \cdots, x_n) = \begin{cases} 1 & \text{ when }\max x_i > \theta_0 \\ 0 & \text{ when }\theta_0 \sqrt[n]{\alpha} \lt \max x_i \le \theta_0 \\ 1 & \text{ when }\max x_i \le \theta_0 \sqrt[n]{\alpha} \end{cases}$$