I am working on this problem and got about halfway through it, before getting stuck. Could anyone take a look at it?
Here's my problem...
$x_1,...,x_4$ are distributed $U(0,\theta), \theta>0$
We want to test $H_0: \theta = 1$ vs $H_1:\theta \neq 1$ with the rejection region $R=[X \in R^{+4}:X_{4:4}<1/2$ or $X_{4:4} > 1]$ evaluate the level $\alpha$ and the power function
I figured out the level. $$\alpha = P_{\theta=1}(X_{4:4}>1)+P_{\theta=1}(X_{4:4}<1/2)=0 + \int_0^{1/2}nx^{n-1}dx=1/{2^n} $$
but am having trouble calculating power as it is a two-sided test. First, I tried to calculate the power for all theta, then subtract when theta = 1
$$power = \int_0^{\infty}\int_1^{\infty}nx^{n-1}dxd\theta - \int_1^\infty nx^{n-1} $$ but that did not work. Could anyone offer an idea as for how to proceed?
Edit: someone said I didn't need the double integral, so I set $\theta=\theta$ and added two integrals.
$$(n/\theta^n)\int_1^{\theta}x^{n-1}=1-1/\theta^n$$ $$(n/\theta^n)\int_0^{1/2}x^{n-1}=1/(2\theta)^n$$
then setting n = 4 $$1-1/\theta^4+1/16\theta^4 =1-(15/16)(1/\theta^4)$$
Is this correct?