Critical region for one-sided test of binomial proportion at 5% level 


For this question's part C), the answer key says you must test the upper tail, but it isn't the alternative $p < 0.3$? So shouldn't you be testing the lower tail and get $x\le2$ for the critical region? Instead the answer key says it's $x\ge 10$.
 A: I will show some computations from R.
You do not say whether you are expected to use the binomial PDF formula to compute probabilities. If so, I'll leave that part to you.
You are correct that you need to reject in the lower tail.
$H_0: p = .3$ vs. $H_a: p < .3,$ where $p$ is the probability of a defect. Using $n = 20,$ the null distribution is that the number $X$ of observed defects has $X \sim \mathsf{Binom}(n=20, p=.3).$
You need a critical value for a test at the 5% level (or perhaps a little lower). $P(X \le 2 \,|\, p=0.3) = 0.03548.$ So the critical value is $c = 2.$
[In R pbinom is a binomial CDF.]
pbinom(3, 20, .3)
[1] 0.1070868
pbinom(2, 20, .3)
[1] 0.03548313

If you reject for $X \le c = 2,$ you will have a test at level
$\alpha = 0.355.$

Extra: Power computation.
If the new version has $p = 0.1,$ then what is the power (probability of rejection)? Answer: About 68%.
 pbinom(2, 20, .1)
 [1] 0.6769268

Here is output for Minitab's power and sample size procedure.
Power and Sample Size 

Test for One Proportion

Testing p = 0.3 (versus < 0.3)
α = 0.05


              Sample
Comparison p    Size     Power
        0.20      20  0.221724
        0.20      30  0.303238

        0.10      20  0.680418  <- Compare R above
        0.10      30  0.872633

        0.05      20  0.952676
        0.05      30  0.997631


