Suppose that $[X∣p]∼Bin(15,p)$, and the goal is to test if $H_0:p=0.25$ and $H_a:p=0.75$. Suppose that $H_0$ is rejected if $X≥9$.
What is the chance of Type I error? Type II Error?
I found the p-value (type 1 Error) to be $0.00419$, but am unsure how to find the chance of type II error
Type I error: \begin{align*} \mathbb{P}\{\text{reject $H_0$}\mid\text{$H_0$ is true}\}&=\mathbb{P}\{X\geq 9\mid p=0.25\}\\&=\sum_{i=9}^{15}{\binom{15}{i}\cdot 0.25^i\cdot 0.75^{15-i}}\\&=0.00419. \end{align*} Similarly, Type II error: \begin{align*} \mathbb{P}\{\text{Fail to reject $H_0$}\mid\text{$H_a$ is true}\}&=\mathbb{P}\{X<9\mid p=0.75\}\\&=\sum_{i=0}^{8}{\binom{15}{i}\cdot 0.75^i\cdot 0.25^{15-i}}\\&=0.0566. \end{align*}