# Likelihood Method¶

By Michael Dallas Griffith

Assume $X_1,...,X_N\sim\text{Binomial}(K,p)$.

$$L(p|\underline{x},K) = \prod_{n=1}^N {K \choose x_n} p^{x_n} (1-p)^{K-x_n}$$

To find the maximum likelihood estimator, we:

1. Take natural log
2. Take the derivative with respect to unknown population parameter (simplify)
3. Set derivative equal to 0
4. Solve for unknown population parameter

Take natural log

$$\sum_{n=1}^{N}\left\{ log \left( {K \choose x_n}p^{x_n}(1-p)^{K-x_n} \right) \right\}$$

and simplify.

$$\sum \left\{ log{k \choose x_n} + x_n log(p) + (K - x_n) log(1 - p) \right\}$$

Take the derivative with respect to $p$, set derivative equal to 0,

$$\sum \left\{ 0 + \frac{x_n}{p} - \frac{K - x_n}{1 - p} \right\} = 0$$

and simplify.

$$\frac{\sum x_n}{p} = \frac{\sum(K - x_n)}{1 - p}$$

Solve for $p$.

$$\hat{p} = \frac{\sum x_n}{K*N}$$