# Calculating power of a Hypothesis Testing Problem based on Uniform distribution

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.

## 1 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$

• Thanks for your time and effort .. I wish I could vote this up as well but I don't have enough reputation.. – Stuck in a JAM Mar 24 '15 at 8:59
• @StuckinaJAM Welcome to Math SE :) – user198044 Mar 24 '15 at 9:02
• I got 15 rep ! so I can upvote now .... :) – Stuck in a JAM Mar 24 '15 at 11:54
• Good job and thanks too. I actually do need the rep for possible bounties. – user198044 Mar 24 '15 at 18:24