[Math] Likelihood ratio test rejection region for uniform parameters

hypothesis testingstatistical-inferencestatisticsuniform distribution

Let $Y_1…Y_n$ be a sample from a uniform distribution over the interval $[0, \theta]$. For $H_0 = \theta_0$, $H_a = \theta_a$, $\theta_a \gt \theta_0$ we know that the most powerful $\alpha$-level test has a rejection region {$y_{max} \gt k$} for some constant k. Find the constant k.

First I tried to write out the likelihood ratio test:

$$\frac{\prod_{i=1}^{n} \frac{1}{\theta_0}}{\prod_{i=1}^{n} \frac{1}{\theta_a}} \lt k$$

$$\left(\frac{\theta_a}{\theta_0}\right)^n \lt k$$

$$\frac{\theta_a}{\theta_0} \lt k, \text{ (k absorbed the root)}$$

$$\theta_a \lt k\theta_0 $$

$$\theta_0 \gt \frac {\theta_a} {k} $$

…and I'm stuck here. My best attempt is as follows:

The MLE of $\theta_0$ is $y_{max}$ and so

$$y_{max} \gt \frac {\theta_a} {k} $$

What we are looking for is k such that $P(y_{max} > \frac{\theta_a}{k}) \le \alpha$.
Since these are uniform random variables, if $\frac{\theta_a}{k} = 1 – \alpha$ then $P(y_{max} > \frac{\theta_a}{k}) \le \alpha$ and so $k = \frac {\theta_a}{1 – \alpha}$

Intuitively thought I feel like it should be just {$y_{max} \gt \theta_a$} since as soon as the max is bigger than your null hypothesis your null hypothesis becomes false.

Best Answer

You're given the test-statistic and the decision rule for the test, which is reject $H_0$ if $y_{max} > k$. Now you want to find $k$ such that the test has size $\alpha$; that is, you want to find the minimum $k$ such that the probability of rejecting the null if it is true is less than $\alpha$.

In math, you want to find the smallest $k$ such that $$ P(y_{max} > k \, | \, \theta = \theta_0) \le \alpha. $$ The probability above is $$ P(y_{max} > k \, | \, \theta = \theta_0) = 1 - P(y_{max} \le k \, | \, \theta = \theta_0) = 1 - P(Y_1 \le k)^n = 1 - \left( \frac{k}{\theta_0} \right)^n. $$ Notice that the second equality follows because the maximum of a random sample is less than $k$ if and only if all of the $Y_i$ are less than $k$, and since they're all independent this is just $P(Y_1 \le k)^n$.

Alright, so now you can solve for $k$ and get $$ k \ge \theta_0 (1-\alpha)^{1/n}. $$ This inequality gives all the possible values of $k$ such that the test has size $\alpha$. You actually wanted the $k$ that maximizes the power. That $k$ should be $\theta_0 (1-\alpha)^{1/n}$ (since it is the smallest $k$ such that the test has size $\alpha$).

Related Question