There is a population of 3 kinds 1 2 3 occurring in hardy Weinberg proportion $\theta^2, 2\theta(1-\theta), 1-\theta$
If we abserve a sample of 3 individuals and obtain $X_1=1, X_2=2, X_3=1$
To find the mle of $\theta$
My solution I am calculating likelihood using the observation of the sample size given but the answer I am getting is $1/2$ while the correct answer is $5/6$
$Farc{2n_1+n_2}/{2n}$
Here $n_i$ is equal the values of $x_i$ given
This is the formula I am getting after solving the likelihood
Where you had $\theta^2, 2\theta(1-\theta), 1-\theta,$ you need $\theta^2, 2\theta(1-\theta), (1-\theta)^2.$
The probability of observing $1,2,1$ is $\Big(\theta^2\Big)\cdot\Big(2\theta(1-\theta)\Big)\cdot\Big(\theta^2\Big).$
So the likelihood function is
\begin{align} L(\theta) & = \Big(\theta^2\Big)\cdot\Big(2\theta(1-\theta)\Big)\cdot\Big(\theta^2\Big) \\[8pt] & = 2\theta^5(1-\theta) = 2\theta^5 - 2\theta^6. \end{align}
So \begin{align} L'(\theta) & = 10\theta^4 - 12\theta^5 \\[8pt] & = 12\theta^4 \left( \frac 5 6 - \theta \right)\quad\begin{cases} >0 & \text{if } 0\le\theta<5/6, \\[4pt] =0 & \text{if } \theta = 5/6, \\[4pt] < 0 & \text{if } 5/6<\theta\le1. \end{cases} \end{align}