MLCrack

    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(θ) = P(data∣θ)P(data|θ). Equivalently, maximize log-likelihood (numerically easier): θ_MLE = argmax Σ log P(xi∣θ)P(x_i|θ).

    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:

    1. Consistent (converges to true value)
    2. Asymptotically efficient (achieves Cramér-Rao lower bound)
    3. Asymptotically normal
    4. 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.