1
$\begingroup$

In a crossover trial comparing a new drug to a standard, $\pi$ denotes the probability that the new one is judged better. it is desired to estimate $\pi$ and test $H_0:\pi=0.50$ against $H_a: \pi \neq 0.50$. In $20$ independent observations, the new drug is better each time.

I know that MLE of $\pi$ is $\hat{\pi} =\frac{y}{n}$. I know the answer is $\hat{\pi}=1$, but I'm stuck on how they got the answer.

I know that $n=20$, the only way I can think of they got a $1$ is if $y= 20$ too but how.

  • 2
    Because it says, "the new drug is better each time". That means that $y = 20$.2017-02-10
  • 4
    Side comment: I came here because of the very provocative (and ultimately misleading—to me, anyway) subject line.2017-02-10

1 Answers 1

1

First realize that $Y \sim \operatorname{Binomial}(20,\pi)$. In otherwords the Likelihood function is given by...

\begin{equation} L(\pi\mid y) = f(y\mid\pi) = P(Y=y\mid\pi) = \binom{20}{y}\pi^y(1-\pi)^{n-y}, \ y = 0,1,2,\ldots,n \end{equation}

It is often helpful to look at the log-likelihood.

\begin{equation} \ell(\pi\mid y) = \ln\binom{20}{y} + y \ln\pi + (n-y)\ln(1-\pi) \end{equation}

We must maximize, this equation over pi. So take the derivative and set it equal to $0$.

\begin{align*} \frac{dl}{d\pi} &= \frac{y}{\pi} - \frac{n-y}{1-\pi} = 0 \\ y &= n\pi \\ \pi &= \frac y n \end{align*}

Which is how you get $\hat{\pi}_\text{mle} = \frac y n$.

(To be complete, you should also do a second derivative test to make sure this indeed a maximum... but spoiler alert, it is.)

  • 1
    Your explanation is clear and straightforward, this should help me a lot! Thank you2017-02-10