MLCrack

    PROBABILITY & STATISTICS · INTERVIEW QUESTION

    Explain the difference between MAP and MLE estimation. When would you prefer one over the other?

    🔴 advanced · Bayesian Methods

    Hint: MAP adds a prior term. Think about regularization.

    Answer

    MLE and MAP are both point estimates of model parameters, but differ in whether they incorporate prior knowledge.

    Maximum Likelihood Estimation (MLE)

    θMLE=arg⁡max⁡θP(D∣θ)\theta_{MLE} = \arg\max_\theta P(D|\theta)

    Finds parameters that make observed data most likely. No prior assumptions.

    Maximum A Posteriori (MAP)

    θMAP=arg⁡max⁡θP(D∣θ)⋅P(θ)\theta_{MAP} = \arg\max_\theta P(D|\theta) \cdot P(\theta)

    Includes a prior P(θ)P(\theta) over parameters — equivalent to regularization:

    PriorRegularizationEffect
    GaussianL2 (Ridge)Shrinks weights
    LaplaceL1 (Lasso)Sparse weights

    When to Use Each

    • MLE: lots of data (prior gets overwhelmed), no strong prior beliefs
    • MAP: limited data, informative priors available
    • Full Bayesian: need uncertainty estimates (computes entire posterior, not just mode)