1.
Suppose we have a coin that weβre told is not fair and has a probability of \(\theta = 0.6\) of coming up heads. We suspect the probability is even higher than this.
Throughout the following parts, do not use a normal approximation.
(a)
We flip the coin 10 times and see 9 heads. Should we use a 1-tailed test or a 2-tailed test? Find the \(p\)-value. Do we have strong enough evidence to reject the null hypothesis at a 0.05 significance level?
Solution.
Using a 1-tailed test, the \(p\)-value is \(\Pr( \geq 9 \text{ heads})\text{:}\)
\begin{align*}
\Pr(9 \text{ heads}) \amp = {10 \choose 9} (0.6)^9 (1 - 0.6)^{10 - 9} = 10(0.6)^9(0.4)^1 \approx 0.04 \\
\Pr(10 \text{ heads}) \amp = {10 \choose 10} (0.6)^{10} (1 - 0.6)^{10 - 10} = 1(0.6)^{10}(0.4)^{0} \approx 0.006
\end{align*}
The \(p\)-value is the sum: \(\Pr(\geq 9 \text{ heads}) \approx 0.046 \lt 0.05\text{,}\) so we can reject the null hypothesis.
(b)
What is the minimum number of heads we would need to see in 10 flips to reject the null hypothesis?
Solution.
We saw in part (a) that at least 9 heads is enough to reject. Then:
\begin{gather*}
\Pr(8 \text{ heads}) = {10 \choose 8} (0.6)^8 (1 - 0.6)^{10 - 8} = 45(0.6)^8(0.4)^2 \approx 0.121
\end{gather*}
Adding to the previous probabilities, \(\Pr(\geq 8 \text{ heads}) \approx 0.046 + 0.121 = 0.167 \gt 0.05\text{.}\) So 8 heads would not be enough to reject the null hypothesis, therefore the minimum number of heads to reject would be 9.
(c)
What is the power of the test if the true value of the parameter is \(\theta = 0.8\text{?}\)
Solution.
With \(\theta = 0.8\text{:}\)
\begin{align*}
\Pr(9 \text{ heads}) \amp = {10 \choose 9} (0.8)^9 (1 - 0.8)^{10 - 9} = 10(0.8)^9(0.2)^1 \approx 0.268 \\
\Pr(10 \text{ heads}) \amp = {10 \choose 10} (0.8)^{10} (1 - 0.8)^{10 - 10} = 1(0.8)^{10}(0.2)^{0} \approx 0.107
\end{align*}
So the power of the test is \(0.268 + 0.107 = 0.375\text{.}\)
