A die-like variable takes values in with probabilities . Given observations of category (total ), derive the MLE of with a Lagrange multiplier. For counts , what is it?
Probability and statistics, Maximum likelihood
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Constrained maximum likelihood on the probability simplex.
Key idea
Maximise subject to . The Lagrangian gives , and the constraint gives .
Steps
- Write the log-likelihood: , since each observation of category contributes a factor .
- Form the Lagrangian , where enforces the sum-to-one constraint.
- Differentiate with respect to : , so .
- Sum over and use : , so and .
- Numbers: , so .
- Remark that the MLE is just the relative frequency. A category with gets , which motivates smoothing with a Dirichlet prior.
Common mistakes
- Ignoring the constraint. Without it increases without bound as the grow.
- Forgetting that the multiplier is determined by the constraint, not chosen.
- Not mentioning the zero-count problem.
How long your answer should be
Half a page; 4 minutes.
Last checked on 4 December 2026.
Read this
Previous in Probability and statistics: is bivariate Gaussian with means and covariance . Why is Gaussian, and what are its mean and variance at ?
Next in Probability and statistics: Why is the Bernoulli distribution with parameter in the exponential family? What are its natural parameter, sufficient statistic and log-partition function, and why does the derivative of the log-partition function give the mean?