PROBABILITY & STATISTICS · INTERVIEW QUESTION
Explain maximum likelihood estimation (MLE). Give an example.
🟡 intermediate · Bayesian Methods
Hint: Find parameters that make the observed data most probable.
Answer
MLE finds parameters θ that maximize the likelihood function L(θ) = . Equivalently, maximize log-likelihood (numerically easier): θ_MLE = argmax Σ log .
Example: estimating Gaussian parameters from data. Log-likelihood: ℓ = -n/2·log(2πσ²) - Σ(x_i-μ)²/(2σ²). Taking derivatives and setting to zero: μ_MLE = x̄ (sample mean), σ²_MLE = Σ(x_i-x̄)²/n (sample variance, biased).
Properties:
- Consistent (converges to true value)
- Asymptotically efficient (achieves Cramér-Rao lower bound)
- Asymptotically normal
- Invariant under reparameterization.
In ML: cross-entropy loss = negative log-likelihood for classification. MSE loss = MLE for Gaussian noise assumption. MLE can overfit with limited data — use MAP (adds prior) or full Bayesian inference.
Related questions
- Explain the difference between MAP and MLE estimation. When would you prefer one over the other?
- Explain Bayes' theorem and give an ML application.
- What is the difference between Type I and Type II errors? How do they relate to precision and recall?
- How do you determine sample size for an A/B test?
- What is the Law of Large Numbers? How does it relate to ML?