Maximum Likelihood Estimates for a Discrete Distribution

Given a set of observed values of a discrete random variable with , the maximum likelihood estimate for the parameters of the probability distribution is

In other words: the MLE for the probability of an outcome is just the fraction of times it was observed in the data.
Relative frequences are optimal probability estimators, in the sense that they have maximum likelihood.

Issue with naively maximizing the likelihood: overfitting. Assigning probability 1 to the observed data, 0 to the unobserved data gives the maximum likelihood, at the cost of generalization.