To test the hypothesis that the nonconforming proportion p of a process is .20, a sample of 100 pieces was drawn at random. A) Letting alpha = 0.05, set up a critical region for the number of observed defectives to test this hypothesis against a two-sided alternative B) If the process now shifts to a 0.10 fraction nonconforming, find the probability of a type II error for the alternative in part a. C) Without repeating the work, would you expect the probability of a type II error to be the same if the process shifted to 0.30? Explain
How do I answer b? I'm drawing a complete blank here so please have a descriptive answer, if you don't mind.
I think it is intended that you use a normal approximation to the null binomial distribution $\mathsf{Binom}(n=100,p=.2).$
For a test with significance level $\alpha=0.5,$ you need to reject when the number $X$ of nonconforming pieces in $n = 100$ is $X$ is lower than $E(X) = 20$ and $X$ is higher than 20 in just the right way. Specifically, you want critical values $L$ and $U$ so that $P(X \le L) + P(X \ge U) \le 0.05,$ but coming as close to the target significance level $\alpha = 0.5$ as possible.
Using R [where
qbinomis a binomial quantile function (inverse CDF)], we explore how to cut about probability $0.025$ from each tail of $\mathsf{Binom}(100,0.2):This suggests using $L \approx 12, U\approx 28.$ Let's see if these values work, by summing the tail probabilities. [In R,
dbinomis a binomial PDF.] A little experimentation suggests using critical values $L = 12, U = 29.$So we are actually testing at the level $\alpha = 4.53\%.$ Because of the discreteness of the binomial distribution it is not possible to choose lower and upper critical values for a test at exactly the 5% level. (A) The critical region is $R=\{X \le 12\}\cup\{X \ge 29\}.$
For (B), for the probability of Type II Error, you want $$P(\mathrm{Fail\; to\; rej\;} H_0| p = 0.1) = P(R^c | p = 0.1)\\ = P(13 \le X \le 28\,|\, p = 0.1) = 9.1982.$$
For (C): The probability of Type II error for $p = 0.3$ is $0.3768.$
If you use normal approximations, then it may seem as if you can bet a test at exactly the 5% level, but that is because the normal distribution is continuous. Even so answers from normal approximation should not be much different.
The figure below show the null (blue), part B alternative (maroon) and part C alternative (dark green) binomial distributions. The critical region consists of integers outside the vertical dotted lines.)