(a) According to Neyman-Pearson's lemma, the rejection region of the type I error rate (α) for testing H0: θ = θ0 against HA: θ = θA, where θ0 < θA, is given by:
{X: f(x; θA) / f(x; θ0) > k}
where f(x; θ) is the probability mass function (PMF) of the distribution of the data, given the parameter θ, and k is chosen such that the type I error rate is α.
For this problem, we have H0: p = 0 and HA: p > 0.4, with α = 0.05. Therefore, we need to find the value of k such that P(X ∈ R | H0) = α, where R is the rejection region.
Using the fact that X follows a binomial distribution with n trials and success probability p, we have:
f(x; p) = (n choose x) * p^x * (1-p)^(n-x)
Then, the likelihood ratio is:
L(x) = f(x; pA) / f(x; p0) = (pA / p0)^x * (1-pA / 1-p0)^(n-x)
We want to find k such that:
P(X ∈ R | p = p0) = P(L(X) > k | p = p0) = α
Using the distribution of L(X) under H0, we have:
P(L(X) > k | p = p0) = P(X > k') = 1 - Φ(k')
where Φ is the cumulative distribution function (CDF) of a standard normal distribution, and k' is the value of k that satisfies:
(1 - pA / 1 - p0)^(n-x) = k'
k' can be found using the fact that X ~ Bin(n, p0) and P(X > k') = α, which yields:
k' = qbinom(α, n, 1-pA/1-p0)
Therefore, the rejection region R is given by:
R = {X: X > qbinom(α, n, 1-pA/1-p0)}
(b) We have n = 20, p0 = 0.45, pA = 0.65, and X = 11. Using the rejection region R defined in part (a), we have:
R = {X: X > qbinom(0.05, 20, 1-0.65/1-0.45)} = {X: X > 12}
Since X = 11 is not in R, we fail to reject H0 at the 5% level of significance.
(c) The p-value is the probability of observing a test statistic as extreme as the one computed from the data, assuming H0 is true. For this problem, the test statistic is X = 11, and we want to find the probability of observing a value as extreme or more extreme than 11, under the null hypothesis H0: p = 0. Using the binomial distribution with p = 0.45, we have:
p-value = P(X >= 11 | p = 0) = 1 - P(X <= 10 | p = 0)
= 1 - pbinom(10, 20, 0.45)
= 0.151
Therefore, the p-value is 0.151, which is greater than the level of significance α = 0.05, so we fail to reject H0.