M1-036M1: Mathematics & Statistics Fundamentals估计理论 (MLE/MAP)Easy
⚡Flashcard Drill➔Mastery:
Define Maximum Likelihood Estimation (MLE) with a Complete End-to-End Derivation
📐 Mathematical Definition
⚡ One-Sentence Core Answer
MLE finds parameter values that maximize the probability of generating the observed sample dataset: .
📌 Key Takeaways
- •Principle: Treats data as fixed and parameter as the variable to optimize.
- •Log-likelihood: Logarithm transforms product of probabilities into a sum of log-densities, simplifying derivatives and avoiding underflow.
- •Score function: First derivative ; information matrix evaluated via negative Hessian.
📐 Mathematical Derivations
Complete example: Estimating Gaussian parameters from i.i.d. Sample . The likelihood is . The log-likelihood is . Setting . Setting . Note that is biased ().
🏭 Production Trade-offs
MLE has optimal asymptotic properties under regularity conditions: it is asymptotically unbiased, asymptotically normal, and achieves the Cramér-Rao Lower Bound (asymptotically efficient). However, in finite small-sample regimes, MLE suffers from severe overfitting (e.g. Estimating CTR from 2 clicks out of 2 impressions yields ), necessitating Bayesian priors or smoothing.
⚠️ Common Interview Pitfalls
- ✕Assuming MLE is always unbiased (as demonstrated by Gaussian variance vs ).
- ✕Applying MLE when regularity conditions fail (e.g. Estimating support boundary in where likelihood derivative is non-zero everywhere).
🎯 Interviewer Follow-up Inquiries
- ?What is the MLE estimator for the upper bound of a Uniform distribution ?
- ?How does the Fisher Information matrix dictate the asymptotic covariance of MLE estimators?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚
Associated Knowledge Base Guides & Mindmaps
Explore the comprehensive technical article, exam cards, and global architecture tree.
中文速览与面试要点
定义最大似然估计(MLE),并给出一个完整例子。
MLE 选择让观测数据出现概率最大的参数;对高斯似然求导即得样本均值与方差。
核心要点
- MLE 的构造:写出似然 L(θ)=Πᵢp(xᵢ|θ),取对数把乘积变求和 ℓ(θ)=Σᵢlog p(xᵢ|θ),再对 θ 求导置零。 完整例子(高斯) :ℓ(μ,σ²)=−n/2·log(2πσ²)−(1/2σ²)Σ(xᵢ−μ)²;对 μ 求导得 μ̂=(1/n)Σxᵢ(样本均值);对 σ² 求导得 σ̂²=(1/n)Σ(xᵢ−μ̂)²(注意分母是 n 而非 n−1,故是有偏估计)。 另一例子(Bernoulli) :ℓ(p)=k log p+(n−k)log(1−p),求导得 p̂=k/n,即样本频率。MLE 的关键性质是 参数化不变性 ——若 θ̂ 是 θ 的 MLE,则 g(θ̂) 是 g(θ) 的 MLE(对任意函数 g),这使其应用极广。
- 三个必须掌握的要点:① 似然不是概率 ——L(θ) 对 θ 不归一化(∫L(θ)dθ 通常不为 1),只有作为 θ 的函数才有意义;② MLE 的偏差 ——高斯方差估计 (1/n)Σ(xᵢ−μ̂)² 的期望是 (n−1)/n·σ²,故系统性低估,这就是 Bessel 校正(除以 n−1)的来源;在小样本下偏差显著,n→∞ 时消失(渐近无偏);③ MLE 的渐近性质 ——在正则条件下,√n(θ̂−θ)→N(0, I(θ)⁻¹)(I 为 Fisher 信息矩阵),即渐近正态且达到 Cramér-Rao 下界(渐近有效)。这使我们可以用 Fisher 信息构造置信区间,也是很多统计检验的理论基础。实践中 MLE 的失效情形包括:参数在边界(如方差为 0)、模型不可辨识(GMM 的标签置换)、完全分离(逻辑回归中可分数据导致系数发散)。
- 似然不是概率(对参数不归一化)
- MLE 在小样本下可能过拟合(如方差估计有偏)
常见陷阱
- 把似然当概率使用
- 忽略小样本下 MLE 的偏差(方差估计需 Bessel 校正)