Differentiation of logLikelihood MLE

29 Views Asked by At

Given a log likelihood function,

$$l=\sum_{i=1}^m\log[\frac{n!}{X_{i,1}!X_{i,2}!(n-X_{i,1}-X_{i,2})!}p_1^{X_{i,1}}p_2^{X_{i,2}}(1-p_1-p_2)^{n-X_{i,1}-X_{i,2}}]$$

To derive: with respect to $p_1$, $\frac{dl}{p_1}$ and to $p_2$, $\frac{dl}{p_2}$ separately.

I want the final equation to contain only $p_1$ and $x_{i,1}$ no $p_2$ and $p_3$. I am stuck on this step:

My approach:

$$p_1 = 1 - p_2 - p_3$$

$$p_2 = 1 - p_1 - p_3$$

$$p_3 = 1 - p_1 - p_2$$

$$x_{i,1} = n - x_{i,2} - x_{i,3}$$

$$x_{i,2} = n - x_{i,1} - x_{i,3}$$

$$x_{i,3} = n - x_{i,1} - x_{i,2}$$

After differentiation and setting it equal to $0$ (for $p_1$) we get $̂_1 = 1/mn∑x_{i,1}$.

Any help is appreciated!