M4-001Easy概率与分布 · Probability & distributions
解释中心极限定理,并说明为什么 A/B 测试可以用 t 检验。
Explain the central limit theorem and why A/B tests can use a t-test.
💡 考场高分一句话答案:
i.i.d. 且有限方差条件下,标准化样本均值依分布收敛到标准正态分布;两组均值差满足渐近正态,因此 A/B 测试中即使原始指标偏态,只要样本量充足仍可用 t 检验。
Under i.i.d. finite variance, the standardised sample mean converges to N(0,1), so the difference of two arm means is approximately normal and the t statistic is valid.
📌 核心考察要点 (Key Points)
- 表述:$\frac{\sqrt n(\bar X-\mu)}{\sigma}\xrightarrow{d}N(0,1)$,不要求原始数据正态
- A/B 的应用:每组样本量通常上千,均值差的抽样分布近似正态 → t/z 检验有效
- 失效场景:重尾(无限方差)、强相关(网络效应)、极小样本、极端不平衡
- 兜底:重尾用 bootstrap 或 winsorize;相关用 cluster-level 分析
- Statement: $\frac{\sqrt n(\bar X-\mu)}{\sigma}\xrightarrow{d}N(0,1)$; the raw data need not be normal
- A/B use: with thousands per arm the sampling distribution of the mean difference is near-normal
- Breaks: heavy tails (infinite variance), strong dependence (network effects), tiny samples, extreme imbalance
- Fallbacks: bootstrap or winsorise for heavy tails; cluster-level analysis for dependence
📐 第一性原理与数理推导机理
设独立同分布随机变量序列 $X_1, \dots, X_n$,期望为 $\mu$,方差 $\sigma^2 < \infty$。令标准化样本均值 $Z_n = \frac{\sqrt{n}(\bar{X} - \mu)}{\sigma}$。其特征函数展开为:$$\phi_{Z_n}(t) = \left[\phi_X\left(\frac{t}{\sigma\sqrt{n}}\right)\right]^n = \left[1 - \frac{t^2}{2n} + o\left(\frac{t^2}{n}\right)\right]^n \xrightarrow{n \to \infty} e^{-t^2/2}$$这恰好收敛到标准正态分布 $\mathcal{N}(0, 1)$ 的特征函数。根据 Lévy 连续性定理,$Z_n \xrightarrow{d} \mathcal{N}(0, 1)$。
⚠️ 常见高频面试陷阱与避坑指南
- 误以为原始单体数据必须满足正态分布(其实原始数据无论多偏,均值分布都收敛到正态)。
- 将 CLT 盲目套用在分位数指标(如 p95/p99 延迟)上(极值与分位数服从广义极值分布 GEV,均值 CLT 不适用)。
- 在重尾分布(如用户打赏金额、播放时长呈 Pareto 幂律分布)下方差无穷大,CLT 彻底失效,需取对数转换或用非参数 Bootstrap。
🔍 大厂面试官连环追问 (Follow-ups)
- 如果指标是 p99 延迟,CLT 还成立吗?该用什么统计推断方法?
- 样本偏态系数(Skewness)如何量化影响 CLT 达到渐近正态所需的最小样本量?
嫌字多看太累?进入苏格拉底式对话推演实验室
零打字负担,以大厂考官真实困境切入,通过点选直觉选项暴露思维盲区,手把手推导 Why。
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.