Binomial Distribution Example_Hypothesis Testing 2

Example) I have no idea where I found this example, Sorry! 

An experimenter has prepared a drug dosage level that she claims will induce sleep for 80% of people suffering from insomnia. After examining the dosage, we feel that her claims regading the effectiveness of the dosage are inflated. In an attempt to disprove her claim, we administer her prescribed dosage to 20 insominiacs and we observe Y, the number for whom the drug tdse induces sleep. The rejection region was found to be {Y $\leq$ 12}. 

(a)  $H_{0}$? $H_{1}$?
(b) In terms of this problem, what's a Type I error? 
(C) find $\alpha$ 
(d) In terms of this problem, what's a Type II error? 
(e) Find  $\beta$ when p=0.6
(f) Find $\beta$ when p=0.4 


\triangleright Solution (a) 
$H_{0}$ : p=0.8
$H_{1}$: p<0 .8="" span="">

\triangleright Solution (b) 
Rejecting $H_{0}$ when $H_{0}$ is true $\rightarrow$ Conclude that drug is worse than claimed when in fact 80% of insomnia are able to sleep after taking the drug. 

\triangleright Solution (c) 
$\alpha$ = P(reject $H_{0}$ when $H_{0}$ is true) 
  = P(Y $\leq$ 12) where Y is binomial (20, 0.8) 
  = P(Y=0)+P(Y=1)+...+P(Y=12) =  $\binom{20}{0}(0.8)^0(0.2)^{20}+ \cdots +\binom{20}{12}(0.8)^{12}(0.2)^8= 0.032$
  
\triangleright Solution (d) 
Do not reject $H_{0}$ when $H_{1}$ is true. $\rightarrow$ Conclude that drug is effective as claimed when in fact it is worse than claimed. 

\triangleright Solution (e) 
 $\beta$= P(do not reject $H_{0}$ when $H_{1}$ is true)=P(Y$\geq$ 13) where Y~Binomial(20, 0.6)
  = 1-P(Y $\leq$ 12) =0.416 (power = 0.584)

\triangleright Solution (e) 
$\beta$P(Y$\geq$ 13) = 1-P(Y $\leq$ 12) =0.021, (Y~Binomial (20, 0.4)) 

2 comments: