# how do I interpret the following hypothesis test?

Let's say I have two hypotheses for a coin with probability $p$ for heads:

$H_0$ - the null hypothesis - the coin is fair $p = 0.5$.

$H_1$ - coin is unfair $p \neq 0.5$.

Say the test is $|X-n/2| > r$ for some $r$ where $n$ is the number of tosses.

It is possible to choose $r$ for a desired significance level quite easily (theoretically, all the details are there for computation).

But what if I want to design a test with a certain type II error? It seems odd to me that one cannot compute $p(\textit{accept } H_0 | H_1)$ because $H_1$ doesn't specify what is the value of $p$.

When I looked around, I noticed that for this simple example, it is requested to calculate type II error for a certain value of $p \neq 0.5$ (such as $p = 0.7$).

Is there a meaning to type II error when $p$ is unknown?

Also, how is that related to the idea of "frequentist repeated experiments?"

Thanks.

• Is your $H_1$ that p>0.5 or that it is not equal to 0.5 (as implied by your test statistic)? – Peter Ellis Jan 3 '13 at 22:49
• I guess I misunderstand something - aren't the test statistic and the hypothesis decoupled from each other? I can set $H_1$ to whatever I want, $H_0$ to whatever I want, and the test statistics to whatever I want, and calculate the errors of both kinds. Or maybe you are saying out of common sense, I should change $H_1$. – hypothizer Jan 3 '13 at 22:54
• I changed it to be $\neq 0.5$. – hypothizer Jan 3 '13 at 22:54
• You don't need $H_1$ at all in some approaches (where $H_1$ is just NOT $H_0$), but if you have one it needs to be consistent with your statistic you are using to choose between the two. The question is clearer now. – Peter Ellis Jan 3 '13 at 23:09
• Re: "Is there a meaning to type II error when p is unknown?" - well, sure, it has a meaning, but that it carries meaning doesn't imply you can compute its value. – Glen_b -Reinstate Monica Jan 3 '13 at 23:38