# Probability Problem - Likelihood-Ratio Test

1. Sep 27, 2011

### Renyulb28

1. The problem statement, all variables and given/known data
A sample of 100 women suffer from dysmenorrhea. A new analgesic is
claimed to provide greater relief than a standard one. After using each
analgesic in a crossover experiment, 40 reported greater relief with the
standard analgesic and 60 reported greater relief with the new one.
Analyze these data.
pi denotes the probability that the new one is judged better. It is desired to estimate
pi and test H0: pi =0.5 against Ha: pi =/= 0.5.
Conduct a likelihood-ratio test and construct a likelihood-based
95% confidence interval. Interpret
2. Relevant equations

3. The attempt at a solution
I know that in order to solve for the likelihood-ratio statistic and compare it to chi-square (3.84), I must solve for lambda

attempt 1: without log-likelihood

which gives me 0.003, which is much smaller than 3.84, and thus fail to reject, but this doesn't seem right, as the Wald test and Score test both rejected the null hypothesis.
Also, I have no idea where to start on the confidence interval calculation, and the professor just sent me this
Here is the detail. LRS < chisquare_0.05(1) => -1.96 < sqrt(LRS) < 1.96.
In R, generate a sequence of grid point on pi, and evaluate sqrt(LRS)
at each pi, and find the pi values at which sqrt(LRR) = -+1.96.

2. Sep 28, 2011

### Stephen Tashi

I suggest you use the formula given after the statement of the problem.

What you did looks like an attempt to compute the liklihood ratio before taking logs. If that was your aim, you make two errors. One error is that the ratio should be a ratio, not a difference. The second error is that you have one term representing an outcome where only 50 women said the new analgesic is better. The liklihood ratio test doesn't involve hypothesizing different data. It only involves hypothesizing a different explanation for the data that was actually observed.

The ratio of the liklihoods is

$$\frac{ \frac{ 100!}{60! 40!} (0.5)^{60}(0.5)^{40}}{\frac{100!}{60! 40!}(0.6)^{60}(0.4)^{40}}$$

The factorials "cancel out" in the ratio so the expression becomes:

$$= \frac{(0.5)^{60}(0.5)^{40}}{ (0.6)^{60} (0.4)^{40} }$$
$$= (\frac{0.5}{0.6})^{60} (\frac{0.5}{0.4})^{40}$$

The formula you gave after the problem is based on taking logs of this ratio and multiplying by 2.

For example,

$$\log( (\frac{0.5}{0.6})^{60} (\frac{0.5}{0.4})^{40}) = \log((\frac{0.5}{0.6})^{60}) + \log((\frac{0.5}{0.4})^{40})$$
$$= 60 \log(\frac{0.5}{0.6}) + 40 \log(\frac{0.5}{0.4})$$