# Finding UMPT for uniform distribution with varying support

$\textbf{Problem}$ Let $X_1,\dots,X_n$ be a random sample from $f(x;\theta) = 1 / \theta$, where $0 < x < \theta$. We want to test $H_0: \theta \leq \theta_0$ versus $H_1: \theta > \theta_0$. Obtain the uniformly most powerful test with size $\alpha$. You must describe how to calculate $\alpha$ to get a full credit.

Here I attempted to appeal to Karlin-Rubin's theorem by calculating the likelihood ratio. The likelihood function is $L(\theta) = \frac{1}{\theta^n} I[X_{(n)}<\theta]$ where $X_{(n)}$ is $\max X_i$. Hence, for $\theta > \theta_0$, $L(\theta_0) / L(\theta) = \left(\frac{\theta}{\theta_0} \right)^n \frac{I[X_{(n)} < \theta_0]}{I[X_{(n)} < \theta]}$. I cannot however make further progress from here.

I have a hunch that the best critical region should be given by "$H_0$ is rejected if $X_{(n)} \geq C$," where $C$ is determined by $P[X_{(n)} \geq C \vert H_0] = \alpha$. But I'm not quite sure how to deduce it. I'm having trouble mainly because the support of distribution depends on the unknown parameter. Does the ratio of indicator function, $\frac{I[X_{(n)} < \theta_0]}{I[X_{(n)} < \theta]}$ play any role here? Any help would be deeply appreciated.

• I think you calculated inverse of the ratio, it should be $\frac{L(\theta)}{L(\theta_0)}$. Now you have to show that this ratio is non-decreasing for statistic $T(X) = X_{(n)}$, for any $0 < x_1, \dots , x_n < \theta$. To calculate $\alpha$ (or $c$ given $\alpha$) you need to calculate cdf of $X_{(n)}$. Hope it helps – Łukasz Grad Feb 8 '17 at 9:08
• @ŁukaszGrad Thank you for your comment. The only part I don't under stand is "for any $0<x_1,\dots,x_n<\theta$." Do we not need to consider the case where $X_{(n)}$ exceeds $\theta$? That is exactly when the ratio of indicator function becomes messy (especially when the denominator becomes zero) – myang Feb 9 '17 at 1:01
• You need to consider a case where $X_{(n)}$ exceeds $\theta_0$, but not $\theta$. When denominator becomes $0$ you should treat it, informally, as $\infty$ – Łukasz Grad Feb 9 '17 at 1:13