M1-004M1: Mathematics & Statistics FundamentalsProbability FoundationsMedium
⚡Flashcard Drill➔Mastery:
Explain Linearity of Expectation and Additivity of Variance, Highlighting Necessary Preconditions
📐 Mathematical Definition
⚡ One-Sentence Core Answer
Expectation is universally linear without any independence assumptions; variance additivity strictly requires zero pairwise covariance (uncorrelatedness).
📌 Key Takeaways
- •Linearity of expectation holds universally across any arbitrary joint distribution, even under complete mutual dependence.
- •Variance additivity requires .
- •CUPED variance reduction in online experimentation fundamentally exploits non-zero covariance to cancel noise.
📐 Mathematical Derivations
By definition of discrete or continuous integration, . No independence or distributional constraints are needed. For variance, . Hence, additivity holds if and only if . If and are negatively correlated, the variance of their sum is strictly smaller than the sum of variances.
🏭 Production 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 , 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 with optimal , reducing variance to .
⚠️ Common Interview Pitfalls
- ✕Assuming variance is linear or additive when variables are correlated.
- ✕Confusing 'uncorrelated' () with 'statistically independent' (only equivalent for joint Gaussian distributions).
🎯 Interviewer Follow-up Inquiries
- ?How does the Delta Method approximate the expectation and variance of non-linear transformations ?
- ?Why does cluster randomization require hierarchical variance estimation instead of simple i.i.d. variance additivity?
⚡
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.
中文速览与面试要点
解释期望的线性性与方差的可加性,并说明各自需要什么条件。
期望线性无条件成立;方差可加需要不相关(独立是充分条件)。
核心要点
- 期望的线性性 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²)。
- 这两个性质直接支撑 A/B 测试的理论基础:① 由期望线性,处理组与对照组的样本均值差是 ATE 的无偏估计;② 由方差可加,两组独立时差值方差 = 两组方差之和,故标准误可解析计算。更重要的是方差可加的反面—— 若引入与指标相关的协变量,可以通过扣除其解释的方差来降低估计方差 :这就是 CUPED(Y^cv=Y−θ(X−X̄),θ=Cov(Y,X)/Var(X)),方差降低比例恰为相关系数平方 ρ²。工业界实践中,用实验前的同指标作为协变量常能降低 30–50% 方差,等效于免费获得数倍样本量。
- 期望线性是 A/B 测试能用样本均值估计总体均值的根基
- 方差可加在 A/B 分组独立时成立(CUPED 正是利用相关性降方差)
常见陷阱
- 以为方差可加也无需条件
- 误认为不相关等价于独立