Likelihood ratio test for the uniform distribution

2.8k Views Asked by At

Suppose that $X_1,\ldots,X_n$ are iid random variables having the uniform distribution on $[0,\theta]$, $\theta>0$, with the density given by $$ f(x)= \begin{cases} \frac1\theta&\text{for}\ 0\le x\le\theta,\\ 0&\text{for}\ x<0\ \text{or}\ x>\theta. \end{cases} $$ Consider testing $H_0:\theta\le\theta_0$ versus $H_1:\theta>\theta_0$. Denote $x_{(n)}=\max\{X_1,\ldots,X_n\}$. The likelihood function is given by $$ L(\theta\mid\mathbf x)= \begin{cases} \theta^{-n}&\text{if}\ \theta\ge x_{(n)},\\ 0&\text{otherwise}. \end{cases} $$ Since $\sup_{0<\theta\le\theta_0}L(\theta\mid\mathbf x)=0$ if $\theta_0<x_{(n)}$ and $x_{(n)}^{-n}$ otherwise, it seems that the likelihood ratio test (LRT) statistic is given by $$ \lambda(\mathbf x) =\frac{\sup_{0<\theta\le\theta_0}L(\theta\mid\mathbf x)}{\sup_{\theta>0}L(\theta\mid\mathbf x)} = \begin{cases} 0&\text{if}\ x_{(n)}>\theta_0,\\ 1&\text{if}\ x_{(n)}\le\theta_0. \end{cases} $$ The LRT has the rejection region of the form $\{\pmb x:\lambda(\pmb x)\le c\}$ with some $0\le c\le 1$. But then it seems that the LRT only rejects $H_0$ when $x_{(n)}>\theta_0$. Since this would never happen if $H_0$ is true, the size of the LRT is $0$.

Is the size of the LRT $0$? Is this true? Am I making a mistake somewhere?

Any help is much appreciated!