The pharmacy company Life Co. has developed a new drug against insomnia. To check the effectiveness, this drug was tested with n = 10 patients. At present, the standard medication can cure 30% of the treated patients.
- The treatment with the new drug was successful with exactly four patients. Perform a one-sided hypothesis test to decide if the new drug is better than the standard one (with a level of significance of 1%). Write down explicitly all six steps.:
Model: $X$ is the number of patients which were succesffully treated, $X\sim \text{Bin}(10, \pi)$
Null hypothesis: $H_0 : \pi = 0.3$. Alternative hypothesis: $H_A: \pi > 0.3$
- Test statistic: $X$ - number of cured patients Distribution under $H_0 : X\sim \text{Bin}(10, 0.3)$
- Choose significance level: $\alpha = 1\% = 0.01$
- Range of rejection (note: one-sided test): We look for set $K = \{...\}$ such that $P_{H_0}(X\in K)\leq \alpha$
$$ \begin{array}{l|llllll} &x = 5&x = 6&x = 7&x = 8&x = 9&x = 10\\ \hline P(X \geq x)&0.1503&0.0473&0.0106&0.0016&0.0001&5.9\cdot 10^{-6}\\ \end{array} $$ Therefore the rejection range is $K = {8,9,10}$. The probabilities listed in the table can be calculated in R in the following way
# R Code
> n=10
> pi=0.3
> 1-pbinom(4:9,n,pi)
[1] 0.1502683326 0.0473489874 0.0105920784 0.0015903864
[5] 0.0001436859 0.0000059049
- Test decision: Since $4 \not \in K$, $H_0$ cannot be rejected. Therefore, we cannot proof that the success rate of the new drug is better
HERE ARE MY QUESTIONS:
- How do we find the number of the rejection range $K = 8,9,10$
- Where does the number 4:9 come from in the code
1-pbinom(4:9,n,pi)
?