M1-081M1: Mathematics & Statistics FundamentalsConfidence Intervals & BootstrapMedium
Mastery:
Confidence Intervals & Bootstrap: 解释 delta method 与它的适用条件。
📐 Mathematical Definition
⚡ Executive Summary
Core Concept: 用一阶泰勒展开把统计量的方差近似为梯度×原方差;需要统计量可微且样本量足够。
📌 Key Takeaways
- •Var(g(θ̂))≈g'(θ)²·Var(θ̂)
- •多元形式用雅可比矩阵:∇gᵀΣ∇g
📐 Mathematical Derivations
delta method 的推导:对统计量 g(θ̂) 在真值 θ 处做一阶泰勒展开:g(θ̂)≈g(θ)+g'(θ)(θ̂−θ)。若 θ̂ 渐近正态(如 MLE),则 g(θ̂) 也渐近正态,方差为 Var(g(θ̂))≈[g'(θ)]²Var(θ̂)。<strong>多元形式</strong>:若 θ̂∈Rᵖ 渐近正态 N(θ,Σ/n),则 g(θ̂) 的方差为 ∇g(θ)ᵀΣ∇g(θ)/n,其中 ∇g 是梯度(雅可比)。<strong>直观理解</strong>:g 在小邻域内近似线性,故其波动幅度 = 原波动的幅度 × 局部斜率。<strong>适用条件</strong>:① g 在 θ 处<strong>可微且导数非零</strong>(否则一阶项消失,需二阶展开);② 样本量足够大(保证 θ̂ 已接近 θ,泰勒近似有效);③ θ̂ 渐近正态。
🏭 Production Trade-offs
典型应用与局限:① <strong>比率的方差</strong>——A/B 测试中 CTR=p̂=k/n 的方差用 delta method 得 Var(p̂)=p(1−p)/n(这是直接的二项方差);对<strong>比值型指标</strong>(如'人均消费 = 总消费/人数'、'CTR/CVR 之比'),delta method 给出 Var(R)≈R²(σ_x²/x̄²+σ_y²/ȳ²−2ρσ_xσ_y/(x̄ȳ)),是工业界计算比值指标方差的标准方法。② <strong>对数变换的方差</strong>——Var(log θ̂)≈Var(θ̂)/θ̂²,这是对数正态推断的基础。③ <strong>失效情形</strong>——(a) g'(θ)=0(如 g(θ)=θ² 在 θ=0 附近)时一阶项为 0,需用二阶 delta method(结果非正态,是卡方型);(b) 小样本下泰勒近似不准;(c) g 在边界不可微(如 max、绝对值)。④ <strong>与 bootstrap 的取舍</strong>——delta method 快、有解析式,但依赖渐近正态与可微性;bootstrap 更通用(对任意统计量、非正态分布、小样本)但计算贵。实践中:<strong>先试 delta method,若指标复杂/重尾/小样本则用 bootstrap</strong>,并对比两者结果(差异大说明渐近近似不可靠)。⑤ <strong>常见陷阱</strong>——对<strong>重尾指标</strong>(如人均消费)用 delta method 会低估方差(因为方差估计本身不稳定),此时 bootstrap 更可靠。
⚠️ Common Interview Pitfalls
- ✕对比值指标直接用二项方差(需 delta method 传播)
- ✕在 g'(θ)=0 处用一阶 delta method
🎯 Interviewer Follow-ups
- ?delta method 何时失效?
- ?与 bootstrap 的取舍?
📚
Associated Knowledge Base Guides & Mindmaps
Explore the comprehensive technical article, exam cards, and global architecture tree.