M1-042M1: Mathematics & Statistics FundamentalsHypothesis TestingEasy
⚡Flashcard Drill➔Mastery:
Define Type I Error, Type II Error, Significance Level (Alpha), and Statistical Power (Beta)
📐 Mathematical Definition
⚡ One-Sentence Core Answer
Type I error is false positive (rejecting true ); Type II error is false negative (failing to reject false ); Power is the probability of correctly detecting a real effect.
📌 Key Takeaways
- •Type I Error (): ; standard industrial threshold is .
- •Type II Error (): ; standard industrial threshold is .
- •Statistical Power (): Probability of detecting a true effect; standard target is or .
- •Fundamental tradeoff: Lowering shifts critical threshold outward, automatically increasing unless sample size is increased.
📐 Mathematical Derivations
For testing vs with test statistic : Rejection region is . Under , , giving Type I error . Under , . The Type II error is . Setting this to yields the fundamental relationship: , linking significance level, power, effect size, and sample size.
🏭 Production Trade-offs
In online experimentation: (1) If launching a risky feature (e.g. Redesigning core checkout UI), Type I error is dangerous, so one might tighten . (2) If screening hundreds of candidate algorithms in early funnel stages, Type II error is costlier (missing a breakthrough), so one might tolerate to boost power. The only way to decrease both and simultaneously is to increase sample size or reduce metric variance via CUPED.
⚠️ Common Interview Pitfalls
- ✕Concluding an experiment was successful simply because it had a high statistical power target (power is a pre-experiment planning metric, not a post-hoc evaluation).
- ✕Calculating 'post-hoc observed power' using the observed sample effect size (which is mathematically redundant with the p-value and provides zero new information).
🎯 Interviewer Follow-up Inquiries
- ?Why is post-hoc power considered mathematically invalid and misleading in experimental analysis?
- ?How does the Neyman-Pearson Lemma prove that likelihood ratio tests maximize power for simple hypotheses?
⚡
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.
中文速览与面试要点
定义第一类错误、第二类错误、显著性水平与功效。
α = 弃真概率;β = 取伪概率;功效 = 1-β = 正确检出真实效应的概率。
核心要点
- 两类错误的完整对照: 第一类错误(弃真) ——H₀ 为真却拒绝了它,概率为 α(显著性水平),这是'误报'; 第二类错误(取伪) ——H₁ 为真却未拒绝 H₀,概率为 β,这是'漏报'。功效 power=1−β 是正确检出真实效应的概率。四者的关系可写成 2×2 表:判决/真相的组合中,正确拒绝的概率是 power,正确不拒绝的概率是 1−α。关键性质: 固定 n 时 α 与 β 反向变动 (降低 α 会抬高 β);要同时降低两者只能增大样本量或效应量。
- 实践要点:① 功效分析的四个输入 ——显著性水平 α、期望功效(通常 0.8)、效应量(MDE,最小可检测效应)、方差 σ²;给定其中三个可解出第四个(通常是样本量 n)。A/B 测试上线前必须做功效分析,否则可能跑了一个注定检不出效果的实验。② 功效不足的严重后果 ——低功效实验不仅容易漏掉真实效应,还会使 已检出的显著结果被高估 ('winner's curse'):在低功效下,只有效应量被随机高估的样本才能越过显著性阈值,故观测到的效应系统性偏大,这解释了为什么很多小样本研究的效应无法被大样本复现。③ 多重比较的放大 ——同时检验 m 个假设时,至少一次假阳性的概率为 1−(1−α)^m,m=20 时达 64%,故需 Bonferroni(控制 FWER)或 BH(控制 FDR)校正。
- 功效随效应量、样本量、α 上升
- 常规要求 power ≥ 0.8
常见陷阱
- 认为 α 与 β 可以同时任意降低(需增大样本量)
- 忽略低功效导致的效应量高估(winner's curse)