Let $X_1,...,X_n$ be a random sample from the uniform $(\theta, \theta +1)$ distribution. To test $H_0: \theta =0$ versus $H_1: \theta >0$, use the test reject $H_0$ if $Y_n \geq 1$ or $Y_1 \geq k$, where k is a constant, $Y_1 = \min(X_1,...,X_n), Y_n = \max(X_1,...,X_n)$
Find an expression for the power function of the test.
Source of the question: Casella & Beger statistical inference exercise 8.33(b)
I know when $k < \theta$, then $Y_1 \geq k$ is always true. Thue $\beta (\theta)=1$. I don't know other three cases:
$\theta \leq k-1$
$k-1 < \theta \leq 0$
$0<\theta \leq k$