How MLE & MAP Work
Likelihood of Data
How probable is the data given a parameter?
Your p = 0.50 is very close to the observed ratio k/N = 0.50. The likelihood is near its maximum — this parameter makes the data highly probable.
Step 1 of 6: Likelihood of Data
How probable is the data given a parameter?
Your p = 0.50 is very close to the observed ratio k/N = 0.50. The likelihood is near its maximum — this parameter makes the data highly probable.
Step 2 of 6: Log-Likelihood
Taking logs for numerical stability
The log-likelihood is at its peak here. Notice it has the same maximum as the raw likelihood — taking the log preserves the location of the peak while avoiding tiny floating-point numbers.
Step 3 of 6: Maximum Likelihood Estimation
Find the parameter that makes data most probable
Your guess matches the MLE! The derivation above shows why: setting the derivative of log L to zero gives p̂ = k/N = 6/12 = 0.50. No other value can produce a higher likelihood.
Step 4 of 6: The Problem with MLE
Small samples lead to extreme estimates
With N = 5, the MLE estimates still vary considerably (spread = 0.80). Some estimates are far from the true p = 0.5. More data helps, but we can also add prior knowledge.
Step 5 of 6: Adding a Prior (MAP)
Beliefs plus evidence yield better estimates
With α = 5, the prior pulls the MAP estimate (0.50) toward 0.5, away from the MLE (0.50). The posterior is a compromise between data and prior belief.
Step 6 of 6: MLE vs MAP
MAP estimation is MLE with a regularization penalty
The prior (α = 5) and data (N = 10) are balanced. MAP = 0.500 sits between MLE = 0.500 and the prior mode 0.5. This is the sweet spot — regularization prevents extreme estimates without ignoring the data.