Consider the problem of testing $H_0:a=0$ against $H_1:a=1/2$ based on a single observation X from U(a,a+1). The power of the test "Reject $H_0$ if $X>2/3$" is
(A)1/6 (B)5/6 (C)1/3 (D)2/3
My Steps:
Power of Test=P(reject $H_0$|$H_1$ is true)
c.d.f. of continuous Uniform distribution is given be $\frac{x-a}{b-a}$, where a and b are parameters of the given Uniform distribution, $U(a,b)$.
$$\begin{align}
\text{Power of Test} & = P(\text{reject } H_0|H_1 \text{is true)} \\
& = P(X>2/3|a=1/2) \\
& = \frac{(2/3-1/2)}{1} \\
& = 1/6
\end{align}$$
Did I solve this correctly ? Please help me confirm my solution.
Best Answer
No. It should be 5/6. Remember cdf of X is $P(X \leq x)$.
So your solution should be
$P(X > 2/3|a = 1/2)$
$= 1 - P(X \leq 2/3|a = 1/2)$
$= 1 - (2/3 - 1/2)/1$
$= 5/6$