Finding an maximum likelihood estimator (Bernouilli problem)

46 Views Asked by At

Could someone point me in the right direction?

Suppose we compare 2 treatments. For each patient we observe $(Y_i,R_i)$ where $Y_i$ denotes if the treatment was succesfull ($Y_i=1$) or not ($Y_i=0$), and $R_i$ denotes the treatment group 1 or 2. In treatmentgroup 1 the chance of a succesfull treatment is $p_1$, in group 2 $p_2$.

Let $\psi = p_1-p_2$. Find an maximum likelihood estimator for $\psi$.

My observations:

I guess I should find the maximum-likelihood estimator for both $p_1$ and $p_2$, combining them into $\hat \psi$.

I think $Y_i\mid R_i=1$ has the following pdf:

$$f_{Y_i\mid R_i = 1} (y_i\mid r_i=1) = \binom{\sum_i I(R_i=1)}{y_i} p_1^{y_i}(1-p_1)^{\sum_i I(R_i=1)-y_i}$$

But this looks very complicated... Is this right? How could I continue?

Solution should be $\hat \psi = \frac{\sum I(R_i=1)Y_i}{\sum I(R_i=1)}-\frac{\sum I(R_i=2)Y_i}{\sum I(R_i=2)}$

1

There are 1 best solutions below

0
On

The problem (and its solution) suggests the following pdf (likelihood) for the data: \begin{align} f(\{(Y_i,R_i)\})&= f_1(\{(Y_i,R_i=1)\}) f_2(\{(Y_i,R_i=2)\}) \nonumber\\ &=p_1^{\sum_{i}I(R_i=1)Y_i}(1-p_1)^{\sum_{i}I(R_i=1)(1-Y_i)}p_2^{\sum_{i}I(R_i=2)Y_i}(1-p_1)^{\sum_{i}I(R_i=2)(1-Y_i)}, \end{align} where the first equality implies that the success of a treatment is independent of the success of the other treatment, and the second equality implies that the success of a certain treatment on a patient is independent of its success on another patient.

By differential calculus, it follows that the ML estimates of $\{p_i\}_{i=1,2}$, i.e., the values of $\{p_i\}_{i=1,2}$ that maximize the likelihood are \begin{equation} \hat{p}_i=\frac{\sum_{i}I(R_i=i)Y_i}{\sum_{i}I(R_i=i)}, i=1,2 \end{equation}