4
$\begingroup$

I have a sample $X_1, \dots, X_n \sim Bern(p)$ and need to test $$H_0: p = p_0\\H_1: p < p_0$$ using the likelihood ratio test. I know how to do it for the two-sided alternative: we should calculate $$LR = 2 (\ln L(x, \hat{p}^{ML}) - \ln L(x, p_0))$$ where $L(x, \cdot)$ is a likelihood function and $\hat{p}^{ML} = \bar{x}$. And then use the fact that $$LR \underset{H_0}{\sim} \chi^2(1)$$ to test the hypothesis. But how should I incorporate the fact that the alternative now is $p < p_0$? Should the distribution of $LR$ change in this case?

Would be very grateful for any help!

$\endgroup$
  • 3
    $\begingroup$ What you mention about the chi-square distribution is only an asymptotic distribution of the log-likelihood ratio. The LRT statistic is $\Lambda=\frac{\sup\limits_{p=p_0}L(p)}{\sup\limits_{p\le p_0}L(p)}$ where $L(p)$ is the likelihood function. You reject $H_0$ for small values of $\Lambda$. This leads to an exact test of the form $\sum X_i<c$ where $c$ can be found subject to a size restriction. $\endgroup$ – StubbornAtom Nov 22 '19 at 19:28
  • $\begingroup$ @StubbornAtom Thank you a lot for your answer! I get it. $\endgroup$ – D F Nov 23 '19 at 6:40
  • 3
    $\begingroup$ If you do get it, you might want to answer it yourself, so interested users of the site can find the answer. Then you can accept it (fair, since it is a correct answer) and so forth. $\endgroup$ – jbowman Nov 24 '19 at 20:39
1
$\begingroup$

Let us consider the example, suppose we are testing $$H_0: p = 0.5\\H_1: p<0.5$$ and suppose that $\bar{x} = 0.4$. $$L(X, p) = p^{\sum X_i}(1-p)^{n - \sum X_i}$$ maximizing it wrt $p$ subject to $p \le 0.5$ yileds $\hat{p} = \bar{x} < 0.5$ and hence $$\Lambda = \frac{0.4^{\sum X_i}0.6^{n - \sum X_i}}{0.5^n} \ge k \iff \sum X_i \ln 0.4 + (n - \sum X_i)\ln 0.6 \ge k_1 \iff \sum X_i \le C$$ And it remains to find such a $C$ that $\mathbb{P}\left(\sum X_i \le C\right|p=0.5) = \alpha$, which we can do using, for example the CLT $$\frac{\sum X_i - np}{\sqrt{p(1-p)}} \approx \mathcal{N}(0, 1) \to 2\sum X_i - n \underset{H_0}{\approx} \mathcal{N}(0, 1) \to \mathbb{P}\left(\sum X_i \le C\right) = \mathbb{P}\left(2 \sum X_i - n \le 2C - n\right) = 0.05 \to 2C - n = 1.64 \to C = \frac{n+1.64}{2}$$.

Thus, we reject the null if $\sum X_i \le \frac{n+1.64}{2}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.