Maximum Likelihood

Maximum likelihood estimation chooses model parameters that assign high probability or density to the observed data. For independent observations from ,

Here is the th observed data point, is the unknown model parameter, and is the probability mass or density assigned by the model. The product appears because the observations are assumed independent; maximizing it chooses the parameter value that makes the whole observed sample most plausible.

The log-likelihood is usually optimized:

The logarithm turns the product into a sum without changing the maximizer, which is numerically more stable and easier to differentiate.

This connects probability laws to losses: Gaussian regression uses squared error, while logistic regression uses Bernoulli negative log-likelihood. MAP estimation adds a prior term to the same likelihood.

Worked computation

Suppose a coin is flipped 10 times and produces 7 heads. Under a Bernoulli model with head probability , the likelihood is

Differentiating gives

Setting this derivative to zero yields , so . The fair-coin log-likelihood is , while the fitted value gives . The MLE is preferred because it assigns the observed sequence a higher probability, which appears as a less negative log-likelihood.

Caveats

MLE is a point estimate, so it needs confidence intervals or posterior summaries to express uncertainty. It can overfit flexible models, diverge under separation, and be biased when the likelihood is misspecified.

References