M3-005Medium有效性检验 · Validity checks

什么是 SRM?如何检测?检测到之后怎么办?

What is SRM, how do you detect it, and what do you do about it?
💡 考场高分一句话答案:

样本比例失配:实际分流比例与设计不符;用卡方拟合优度检验,p<0.001 即视为异常,未解释清楚前数据作废。

Sample ratio mismatch: the observed split differs from the design. Use a chi-square goodness-of-fit test with a p<0.001 threshold, and treat the data as void until it is explained.

📌 核心考察要点 (Key Points)

  • 检测:$\chi^2=\sum (O_i-E_i)^2/E_i$,df = 组数−1;阈值用 0.001 而非 0.05(因为每天检查)
  • 分维度查:按平台/国家/版本分别做,定位是哪个人群出的问题
  • 根因:哈希不均、缺 sticky assignment、实验层冲突、日志丢失、组别相关的崩溃/超时、分析口径不对称
  • 处置:先解释再使用;解释不了就作废重跑
  • Detection: $\chi^2=\sum (O_i-E_i)^2/E_i$ with df = arms − 1; threshold 0.001 rather than 0.05 because you check daily
  • Localise: run it per platform, country and version to find which population is affected
  • Root causes: non-uniform hashing, missing sticky assignment, layer collisions, log loss, arm-correlated crashes or timeouts, asymmetric analysis filters
  • Response: explain it before using the data; if you cannot, discard and rerun

⚖️ 业务权衡与取舍 (Trade-offs & Calibration)

SRM 的深层含义是缺失机制与组别相关(MNAR):如果实验组更容易丢失日志,那么剩下的样本就不是随机样本,效应估计必然有偏。这就是为什么 SRM 必须当作“数据无效”而不是“小瑕疵”。

⚠️ 常见高频面试陷阱与避坑指南

  • 看到 SRM 仍继续分析,只在脚注里提一句
  • 只用 p<0.05 作阈值,导致每天检查时频繁误报

🔍 大厂面试官连环追问 (Follow-ups)

  • 如果 SRM 只出现在一个小国家,能不能剔除该国继续分析?
  • 如何预防 SRM?

嫌字多看太累?进入苏格拉底式对话推演实验室

零打字负担,以大厂考官真实困境切入,通过点选直觉选项暴露思维盲区,手把手推导 Why。

💬 开启对话式破冰 ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔