【AI 核心深度 M1-004】解释期望的线性性与方差的可加性,并说明各自需要什么条件。(Explain Linearity of Expectation and Additivity of Variance, Highlighting Necessary Preconditions)深度数理推导与工程落地解析

所属模块:M1 · 数学与统计基础 (Mathematics & Statistics Fundamentals) | 专题分类:概率论基础 (Probability Foundations) | 难度等级:Medium

一、核心一句话结论 (One-Sentence Summary)

期望线性无条件成立;方差可加需要不相关(独立是充分条件)。

ADVERTISEMENT · 赞助推荐

Expectation is universally linear without any independence assumptions; variance additivity strictly requires zero pairwise covariance (uncorrelatedness).

二、核心考点要义 (Key Insights)

  • 📌 期望线性是 A/B 测试能用样本均值估计总体均值的根基
  • 📌 方差可加在 A/B 分组独立时成立(CUPED 正是利用相关性降方差)

English Insights:
– Linearity of expectation holds universally across any arbitrary joint distribution, even under complete mutual dependence.
– Variance additivity $text{Var}(X+Y)=text{Var}(X)+text{Var}(Y)$ requires $text{Cov}(X, Y)=0$.
– CUPED variance reduction in online experimentation fundamentally exploits non-zero covariance to cancel noise.

三、核心数学原理与机理推导 (Mathematical Principles & Derivation)

$$mathbb{E}[aX+bY]=amathbb{E}[X]+bmathbb{E}[Y],qquad mathrm{Var}(X+Y)=mathrm{Var}(X)+mathrm{Var}(Y)+2mathrm{Cov}(X,Y)$$

期望的线性性 E[aX+bY]=aE[X]+bE[Y] 对任意随机变量成立(不要求独立、不要求同分布),因为期望是积分算子,积分天然线性。这是统计推断最重要的工具——它保证了’样本均值是总体均值的无偏估计’这一结论无需任何分布假设。方差的可加性则不然:Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y),只有当 Cov=0(不相关)时才能简化为相加;独立是 Cov=0 的充分条件但非必要(存在不相关但依赖的例子,如 X~U(-1,1) 与 Y=X²)。

📖 查看英文严格数学推导 (English Mathematical Derivation)

By definition of discrete or continuous integration, $E[aX + bY] = intint (ax + by)p(x, y)dxdy = aint x(int p(x,y)dy)dx + bint y(int p(x,y)dx)dy = aE[X] + bE[Y]$. No independence or distributional constraints are needed. For variance, $text{Var}(X+Y) = E[((X+Y) – (E[X]+E[Y]))^2] = text{Var}(X) + text{Var}(Y) + 2text{Cov}(X, Y)$. Hence, additivity holds if and only if $text{Cov}(X, Y) = 0$. If $X$ and $Y$ are negatively correlated, the variance of their sum is strictly smaller than the sum of variances.

四、工业级落地权衡与工程考量 (Industrial Trade-offs)

这两个性质直接支撑 A/B 测试的理论基础:① 由期望线性,处理组与对照组的样本均值差是 ATE 的无偏估计;② 由方差可加,两组独立时差值方差 = 两组方差之和,故标准误可解析计算。更重要的是方差可加的反面——若引入与指标相关的协变量,可以通过扣除其解释的方差来降低估计方差:这就是 CUPED(Y^cv=Y−θ(X−X̄),θ=Cov(Y,X)/Var(X)),方差降低比例恰为相关系数平方 ρ²。工业界实践中,用实验前的同指标作为协变量常能降低 30–50% 方差,等效于免费获得数倍样本量。

⚙️ 查看英文落地权衡分析 (English Systems & Trade-offs)

In A/B testing and metric evaluation: (1) Sample means reliably estimate population means regardless of internal user interactions because expectation is unconditionally linear. (2) For ratio metrics like Click-Through Rate $frac{sum text{Clicks}}{sum text{Impressions}}$, numerator and denominator are strongly correlated across user clusters, so standard variance formulas fail and delta method or bootstrap must be used. (3) CUPED constructs $Y^* = Y – theta (X – E[X])$ with optimal $theta = frac{text{Cov}(Y, X)}{text{Var}(X)}$, reducing variance to $text{Var}(Y)(1 – rho^2)$.

五、常见面试避坑陷阱 (Common Pitfalls & Traps)

  • ⚠️ 以为方差可加也无需条件
  • ⚠️ 误认为不相关等价于独立

English Pitfalls:
– Assuming variance is linear or additive when variables are correlated.
– Confusing ‘uncorrelated’ ($text{Cov}=0$) with ‘statistically independent’ (only equivalent for joint Gaussian distributions).

六、高频深度面试追问与预测 (Follow-Up Questions)

  1. 若 X、Y 相关,如何降方差?(CUPED / 协变量调整)
  2. How does the Delta Method approximate the expectation and variance of non-linear transformations $g(X)$?

七、知识图谱对齐 (Knowledge Graph Anchor)

  • 🔗 关联底层卡片:AI 数理基础:贝叶斯推断、全概率与先验后验 (Bayesian Inference, Total Probability & Priors)
  • 🗺️ 知识图谱模块:数理基础思维导图

🔬 算法科学家与机器学习深度考察全量题库 (Science Depth)

本题收录于 TalentMe 算法科学家深度考察真题库 (Science Depth)。全库共 856 道硬核考点,深度覆盖数学统计、经典ML、深度学习、Transformer、大语言模型、多模态、推荐系统与 MLOps。支持 Jev 面经智能匹配、一键离线单文件 HTML 手册导出并直连 Obsidian 本地记忆。

👉 前往 TalentMe 交互式研读本题 (M1-004) →


Discover more from AirSOTA – Air School Of Thoughts AtoZ

Subscribe to get the latest posts sent to your email.