Why do we maximize log-likelihood instead of likelihood directly?
- The maximum likelihood criterion is not practical in terms of computation because we take the product of each term. These terms can be small, so the product of many of these terms can be tiny. It may be difficult to represent this quantity with finite precision arithmetic.
- Log-likelihood lets us convert it to a sum instead of a product, avoiding this problem.
Maximum log-likelihood
We maximize the logarithm of likelihood:
Why is maximizing the log-likelihood equivalent to maximizing the likelihood?
This log-likelihood criterion is equivalent because the logarithm is a monotonically increasing function.
- If , then we also have .
Thus, we change the model parameters to improve the log-likelihood criterion, we also improve the original maximum likelihood criterion. The overall maximum of the criteria are in the same place, so the best model parameters are the same in both cases.
Minimizing negative log-likelihood
By convention, model fitting problems are framed in terms of minimizing a loss. To convert the maximum log-likelihood criterion to a minimization problem, we use the negative log-likelihood criterion instead:
Instead of maximizing the log-likelihood, we typically minimize the negative log-likelihood.
Negative log-likelihood criterion
Log-likelihood criterion but negative and we optimize for the minimum.