M1-081M1: Mathematics & Statistics FundamentalsConfidence Intervals & BootstrapMedium
⚡Flashcard Drill➔Mastery:
Explain the Delta Method and Its Mathematical Conditions for Ratio Metric Asymptotic Variance
🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
📐 Mathematical Definition
⚡ One-Sentence Core Answer
The Delta Method uses a first-order Taylor expansion to approximate the asymptotic variance of non-linear functions of random variables: , providing closed-form confidence intervals for ratio metrics.
📌 Key Takeaways
- •Univariate Form: If , then .
- •Multivariate Form: , incorporating full covariance between inputs.
- •Primary Application: Computing exact standard errors for online ratio metrics (e.g. , Revenue per User).
📐 Mathematical Derivations
First-order Taylor expansion around mean : . Rearranging and scaling: . By Slutsky's theorem, since , the linear transformation converges to . For ratio metric with function : The gradient is . The asymptotic variance is: .
🏭 Production Trade-offs
Why the Delta Method dominates in large-scale experimentation platforms (LinkedIn, Microsoft, Uber): Ratio metrics have correlated numerators and denominators (users with more impressions naturally have more clicks). Calculating variance via bootstrap requires resampling billions of rows, taking hours. The Delta Method evaluates the analytical formula in a single SQL query in seconds, with accuracy matching bootstrap to 4 decimal places.
⚠️ Common Interview Pitfalls
- ✕Applying the Delta Method when (requires second-order delta method, where limit is chi-square rather than normal).
- ✕Using the Delta Method when the denominator , which causes the expansion to diverge.
🎯 Interviewer Follow-up Inquiries
- ?What is the Second-Order Delta Method and when is it required?
- ?Why does calculating user-level cluster means eliminate the need for complex session-level ratio approximations?
⚡
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
中文速览与面试要点
解释 delta method 与它的适用条件。
用一阶泰勒展开把统计量的方差近似为梯度×原方差;需要统计量可微且样本量足够。
核心要点
- delta method 的推导:对统计量 g(θ̂) 在真值 θ 处做一阶泰勒展开:g(θ̂)≈g(θ)+g'(θ)(θ̂−θ)。若 θ̂ 渐近正态(如 MLE),则 g(θ̂) 也渐近正态,方差为 Var(g(θ̂))≈[g'(θ)]²Var(θ̂)。 多元形式 :若 θ̂∈Rᵖ 渐近正态 N(θ,Σ/n),则 g(θ̂) 的方差为 ∇g(θ)ᵀΣ∇g(θ)/n,其中 ∇g 是梯度(雅可比)。 直观理解 :g 在小邻域内近似线性,故其波动幅度 = 原波动的幅度 × 局部斜率。 适用条件 :① g 在 θ 处 可微且导数非零 (否则一阶项消失,需二阶展开);② 样本量足够大(保证 θ̂ 已接近 θ,泰勒近似有效);③ θ̂ 渐近正态。
- 典型应用与局限:① 比率的方差 ——A/B 测试中 CTR=p̂=k/n 的方差用 delta method 得 Var(p̂)=p(1−p)/n(这是直接的二项方差);对 比值型指标 (如'人均消费 = 总消费/人数'、'CTR/CVR 之比'),delta method 给出 Var(R)≈R²(σ_x²/x̄²+σ_y²/ȳ²−2ρσ_xσ_y/(x̄ȳ)),是工业界计算比值指标方差的标准方法。② 对数变换的方差 ——Var(log θ̂)≈Var(θ̂)/θ̂²,这是对数正态推断的基础。③ 失效情形 ——(a) g'(θ)=0(如 g(θ)=θ² 在 θ=0 附近)时一阶项为 0,需用二阶 delta method(结果非正态,是卡方型);(b) 小样本下泰勒近似不准;(c) g 在边界不可微(如 max、绝对值)。④ 与 bootstrap 的取舍 ——delta method 快、有解析式,但依赖渐近正态与可微性;bootstrap 更通用(对任意统计量、非正态分布、小样本)但计算贵。实践中: 先试 delta method,若指标复杂/重尾/小样本则用 bootstrap ,并对比两者结果(差异大说明渐近近似不可靠)。⑤ 常见陷阱 ——对 重尾指标 (如人均消费)用 delta method 会低估方差(因为方差估计本身不稳定),此时 bootstrap 更可靠。
- Var(g(θ̂))≈g'(θ)²·Var(θ̂)
- 多元形式用雅可比矩阵:∇gᵀΣ∇g
常见陷阱
- 对比值指标直接用二项方差(需 delta method 传播)
- 在 g'(θ)=0 处用一阶 delta method