Let $X_{1}, \ldots, X_{n}$ be a sample from the Bernoulli distribution with parameter $p$ Consider testing $H_{0}: p=p_{0}$ versus $H_{1}: p=p_{1}$ where $p_{0}<p_{1}$ are known numbers.
(a) Using the Neyman-Pearson lemma, find the most powerful test (Non-Randomized) among tests with level at most $\alpha$. When can the level of the test be exactly $\alpha ?$
(b) Use the CLT to find a critical value such that the level of the test is approximately (asymptotically for large $n$ ) $\alpha$.
To use Neyman Peason lemma I calculate $r$ as :
$$r= \frac{f_1}{f_0} = \frac{p_1^{\Sigma x_i}(1-p_1)^{n-\Sigma x_i}}{p_0^{\Sigma x_i}(1-p_0)^{n-\Sigma x_i}}$$
For $p_1>p_0$ we have non randomized test is $\phi(x) =$ Reject $H_0$ for $\Sigma x_i \geq k$.
For given at most level $\alpha$ :
$$\alpha \geq E_{p_0} \phi(x) = P_{p_0}\{\Sigma x_i \geq k\} = \Sigma_{r=k+1}^n (n_{C_r}) p_{0}^r (1-p_{0})^{n-r}$$
(a) I don't know how to proceed after this and what to say about When can the level of the test be exactly $\alpha ?$
(b) How to use CLT to find the critical value which satisfies the given condition.
Please help me with this problem. Thankyou.
I will get you started with couple of particular numerical examples that illustrate the main issues involved in a general answer.
Example 1. Let $n = 10, p_0 = .5, p_1 = .7, \alpha = 0.5.$ Then NP says to reject when $T = \sum_{i=1}^{10}X_i \ge k.$
The issue is to find $k$ so that $\alpha \le 0.05.$ Under $H_0,$ $T \sim \mathsf{Binom}(n=10, p=.5).$ Then using $k = 8$ would give $\alpha = 0.0547 > 0.05,$ so use $k = 9$ to get $\alpha=0.0107 < 0.05.$ Computations in R,
Thus, there is no nonrandomized test exactly at level $\alpha = 0.05.$
Under $H_0,$ we have $E(T) = np = 5,$ $SD(T) = \sqrt{np(1-p)} = \sqrt{2.5} = 1.581.$
So $T\stackrel{aprx}{\sim}\mathsf{\mu=5, \sigma=\sqrt{2.5}}.$ So an approximate value of $k = 7.6.$ This is not a good approximation for $n$ as small as $n=10,$ but this kind of approximation is useful for large $n.$
Example 2. Now suppose $n=100,$ keeping the other parameters the same. Then we have $T\sim\mathsf{Binom}(100, .5)$ under $H_0$ and $k = 59$ gives a test at level $\alpha = 0.044$ and the normal approximation says to use $k = 58.22.$