[Math] Log-likelihood of multinomial(?) distribution

log likelihoodmaximum likelihoodprobability

If i have 3 probability groups of $p_1(\theta):p_2(\theta):p_3(\theta)=(1-\theta):(1+2\theta):(1-\theta)$ with $n_1=31,n_2=47,n_3=22$ how would I find the log-likelihood of above and MLE of $\theta$?

I think this is a multinomial question with probability function of
$f(x|p)=\frac{n!}{\prod x_i}\prod p_i^x$ so I went ahead and calculated log likelihood to be $l(p)=ln(n!)+\sum ln(x_i) +\sum x_i ln(p_i)$ but now i'm stuck with finding MLE. I get $0=\sum \frac{x_i}{p_i}$ so did I derive the likelihood or differentiate wrong? Or am I using the wrong distribution?

Best Answer

There are a variety of errors and omissions in your statements:

  • Your log-likelihood would have been better as $$\ln(n!)-\sum \ln(n_i!) +\sum_i n_i \ln(p_i)$$
  • You need to take into account that $\sum\limits_i p_i =1$ and $\sum\limits_i n_i =n$, particularly the former
  • Your derivative appears to be with respect to all of the $p_i$ simultaneously in some sense that does not work

If instead you had the log-likelihood written as $$\ln(n!)-\sum \ln(n_i!) + n_1 \ln(p_1)+ n_2 \ln(p_2) + n_3 \ln(1-p_1-p_2)$$ then taking the derivative with respect to $p_1$ and setting it to $0$ would suggest $\frac{n_1}{\hat p_1}-\frac{n_3}{1-\hat p_1-\hat p_2}=0$ and similarly taking the derivative with respect to $p_2$ and setting it to $0$ would suggest $\frac{n_2}{\hat p_2}-\frac{n_3}{1-\hat p_1-\hat p_2}=0$. Rearranging these and combining with the second point above would lead to $$\hat p_1 = \frac{n_1}{n}, \;\hat p_2 = \frac{n_2}{n},\; \hat p_3 = \frac{n_3}{n}$$


Added

I had missed the $\theta$ and that this means $\hat p_1=\hat p_3$. Note that $(1-\theta)+(1+2\theta)+(1-\theta)=3$

So your log-likelihood would have been better as $$\ln(100!)- \ln(31!)- \ln(47!)- \ln(22!) \\+ 31 \ln(1-\theta)+47\ln(1+2 \theta) +22\ln(1-\theta) -100 \ln(3)$$

Take the derivative with respect to $\theta$ and get $$-\frac{53}{1-\theta}+\frac{94}{1+2\theta}$$ which is zero when $\hat \theta = \dfrac{41}{200}$

This gives $\hat p_1=\hat p_3 = 0.265$ and $\hat p_2=0.47$, which is intuitively attractive with the former as the average of the sample proportions $\frac{31}{100}$ and $\frac{22}{100}$, and the latter as the sample proportion $\frac{47}{100}$

Related Question