Let $X_1, X_2, . . . , X_n$ be a random sample from a Bernoulli distribution with parameter $θ$. Compute the maximum likelihood estimator for $θ$.
In my opinion this is the correct way to solve it:
$L(\Theta)=\theta_1*(1-\theta_1)*...\theta_n*(1-\theta_n)=\theta^n*(1-\theta)^n$
$l(\Theta)=n*ln(\theta)+n*ln(1-\theta)$
$l'(\theta)=\frac{n}{\theta}-\frac{n}{1-\theta}=0$, $\theta=\frac{1}{2}$
For the official solution it should be $\frac{\sum_{i=1}^nX_i}{n}$, why MLE is incorrect, where should I put the $x$ that in my solution is not present?