How to derive the MLE of Bernoulli?

50 Views Asked by At

Likelihood is given by

$$L(\theta | x_1, x_2, \dots, x_n = \bar{x}) = (\theta)^{n \bar{x}} (1-\theta)^{n(1-\bar{x})}$$

log likelihood is

$ln (L) = n \bar{x} \ln(\theta) + n(1-\bar{x})\ln(1-\theta)$

derivative is

$\frac{d ln(L)}{d \theta} = \frac{n \bar{x}}{\theta} - \frac{n(1-\bar{x})}{1-\theta}$

now what? Answer is $\hat{\theta}$= $\bar{x}$?

1

There are 1 best solutions below

2
On BEST ANSWER

Equate the derivative to $0$.

$$\frac{\bar{x}}{\hat{\theta}}=\frac{1-\bar{x}}{1-\hat{\theta}}$$

Cross multiplying, $$\bar{x}-\hat{\theta} \bar{x}=\hat{\theta} - \hat{\theta}{\bar{x}}$$

Hence $$\hat{\theta} = \bar{x}.$$