Two Ways to Be Wrong ⚖️ग़लत होने के दो तरीके ⚖️犯错的两种方式 ⚖️
Every decision made under uncertainty can be wrong. A doctor reading a scan, a judge weighing evidence, an engineer approving a bridge — each acts on incomplete information. In statistics there are exactly two ways a hypothesis test can fail you, and knowing both is the difference between careful science and dangerous science.
अनिश्चितता में लिया गया हर फ़ैसला ग़लत हो सकता है। Scan पढ़ता doctor, सबूत तौलता judge, पुल मंज़ूर करता engineer — सब अधूरी जानकारी पर काम करते हैं। Statistics में hypothesis test के ग़लत होने के ठीक दो तरीके हैं, और दोनों को जानना सावधान विज्ञान और ख़तरनाक विज्ञान के बीच का अंतर है।
在不确定中做出的每个决定都可能出错。读片的医生、权衡证据的法官、批准桥梁的工程师 —— 都基于不完整的信息行事。在统计学中,假设检验恰好有两种出错方式,了解这两种方式,就是严谨科学与危险科学的区别。
Think of a smoke detector. It can beep when there is no fire (a false alarm at 3 a.m. for burnt toast), or stay silent during a real fire (a disaster). With a given detector, making it less touchy means more silent fires; making it more touchy means more false alarms. Only a better detector — in statistics, more or better data — reduces both. Statisticians call these the Type I error and the Type II error.
Smoke detector सोचें। यह आग न होने पर भी बज सकता है (जली toast पर रात 3 बजे झूठा alarm), या असली आग में चुप रह सकता है (आपदा)। किसी दिए गए detector को कम संवेदनशील बनाने से ज़्यादा चुप आग; ज़्यादा संवेदनशील बनाने से ज़्यादा झूठे alarms. सिर्फ़ बेहतर detector — statistics में ज़्यादा या बेहतर data — दोनों घटाता है। Statisticians इन्हें Type I error और Type II error कहते हैं।
想想烟雾报警器。它可能没有火也响(凌晨 3 点因为烤焦的面包误报),也可能真着火时不响(酿成灾难)。对同一个报警器,调得不那么敏感,漏报的火灾就多;调得更敏感,误报就多。只有更好的报警器 —— 在统计中就是更多或更好的数据 —— 才能同时减少两者。统计学家称之为第一类错误和第二类错误。
For a given test and sample size, Type I and Type II errors pull against each other: lowering one raises the other. The way out is better evidence — a larger sample or more precise measurements — which can lower both. Every study design is a negotiation between these two risks.
किसी दिए गए test और sample size में Type I और Type II errors एक-दूसरे के ख़िलाफ़ खिंचते हैं: एक घटाने से दूसरा बढ़ता है। रास्ता है बेहतर सबूत — बड़ा sample या ज़्यादा सटीक माप — जो दोनों घटा सकता है। हर study design इन दो जोखिमों के बीच एक मोलभाव है।
对于给定的检验和样本量,第一类和第二类错误相互牵制:降低一个,另一个就升高。出路是更好的证据 —— 更大的样本或更精确的测量 —— 才能同时降低两者。每个研究设计都是这两种风险之间的权衡。
Definitions — Crystal Clearपरिभाषाएँ — एकदम साफ़定义 — 一清二楚
- Also called a false positiveदूसरा नाम: false positive又称假阳性
- Rejecting H₀ when H₀ is TRUEH₀ सच होने पर उसे reject करनाH₀ 为真时拒绝了它
- "Seeing" an effect that is not thereजो effect नहीं, उसे "देखना"“看见”了不存在的效应
- P(reject H₀ | H₀ true) = αP(H₀ reject | H₀ सच) = αP(拒绝 H₀ | H₀ 为真) = α
- You set it directlyआप सीधे तय करते हैं由你直接设定
- Courtroom: convicting the innocentअदालत: बेगुनाह को सज़ा法庭:给无辜者定罪
- Also called a false negativeदूसरा नाम: false negative又称假阴性
- Keeping H₀ when H₀ is FALSEH₀ ग़लत होने पर उसे रखनाH₀ 为假时保留了它
- Missing an effect that is realअसली effect को चूकना漏掉了真实存在的效应
- P(keep H₀ | effect of a given size) = βP(H₀ रखें | दिए गए आकार का effect) = βP(保留 H₀ | 某个大小的效应) = β
- Controlled through n, α and effect sizen, α और effect size से नियंत्रित通过 n、α 和效应量控制
- Courtroom: freeing the guiltyअदालत: दोषी को छोड़ना法庭:放走罪犯
- The chance of detecting a real effectअसली effect पकड़ने का chance发现真实效应的概率
- Common target: 80% (β = 0.20)आम लक्ष्य: 80% (β = 0.20)常见目标:80%(β = 0.20)
- Rises with sample sizeSample size के साथ बढ़ता है随样本量增大
- Rises with effect sizeEffect size के साथ बढ़ता है随效应量增大
- Rises with α (at a cost)α के साथ बढ़ता है (क़ीमत पर)随 α 增大(有代价)
α is conditional: it is the error rate when H₀ is true, not the chance that a significant result is wrong. β is not a single number: it depends on how big the real effect is. A study can have 90% power for a big effect and 20% power for a small one. That is why power is always stated for a specific effect size.
α शर्तिया है: यह H₀ सच होने पर error दर है, यह नहीं कि significant नतीजे के ग़लत होने का chance क्या है। β एक अकेली संख्या नहीं: यह असली effect के आकार पर निर्भर है। एक study की बड़े effect के लिए 90% power और छोटे के लिए 20% power हो सकती है। इसीलिए power हमेशा किसी ख़ास effect size के लिए बताई जाती है।
α 是条件概率:它是 H₀ 为真时的错误率,而不是“显著结果出错”的概率。β 不是单一数字:它取决于真实效应有多大。同一项研究对大效应可能有 90% 的检验力,对小效应只有 20%。所以检验力总要针对特定的效应量来说明。
The Four-Outcome Matrixचार नतीजों का Matrix四种结果矩阵
Reality is one way or the other, and your decision is one way or the other. That gives four boxes — two correct, two errors. This 2×2 table is worth memorising.
सच्चाई एक या दूसरी तरह है, और आपका फ़ैसला एक या दूसरी तरह। इससे चार खाने बनते हैं — दो सही, दो ग़लतियाँ। यह 2×2 table याद रखने लायक़ है।
现实是这样或那样,你的决定也是这样或那样。于是有四个格子 —— 两个正确,两个错误。这张 2×2 表值得记住。
| Your decisionआपका फ़ैसला你的决定 | H₀ actually TRUE (no real effect)H₀ असल में सच (कोई असली effect नहीं)H₀ 实际为真(没有真实效应) | H₀ actually FALSE (real effect)H₀ असल में ग़लत (असली effect)H₀ 实际为假(存在真实效应) |
|---|---|---|
| Reject H₀ — "effect found"H₀ reject — "effect मिला"拒绝 H₀ ——“发现效应” | ❌ Type I error — false positive, probability αType I error — false positive, probability α第一类错误 —— 假阳性,概率 α | ✅ Correct — true positive, probability 1 − β (power)सही — true positive, probability 1 − β (power)正确 —— 真阳性,概率 1 − β(检验力) |
| Keep H₀ — "no effect found"H₀ रखें — "कोई effect नहीं मिला"保留 H₀ ——“未发现效应” | ✅ Correct — true negative, probability 1 − αसही — true negative, probability 1 − α正确 —— 真阴性,概率 1 − α | ❌ Type II error — false negative, probability βType II error — false negative, probability β第二类错误 —— 假阴性,概率 β |
Type I: the boy cries "wolf!" when there is no wolf — a false alarm. The villagers reject "no wolf" (H₀) although it is true. Type II: later a wolf really comes, but the villagers ignore him — a missed detection. They keep "no wolf" although it is false. Fun twist: the first errors made the second one more likely.
Type I: लड़का भेड़िया न होने पर भी "भेड़िया!" चिल्लाता है — झूठा alarm. गाँव वाले "कोई भेड़िया नहीं" (H₀) को reject करते हैं, जबकि वह सच है। Type II: बाद में सच में भेड़िया आता है, पर गाँव वाले उसे अनसुना कर देते हैं — छूटी पहचान। वे "कोई भेड़िया नहीं" रखते हैं, जबकि वह ग़लत है। मज़ेदार मोड़: पहली ग़लतियों ने दूसरी ग़लती को ज़्यादा संभव बना दिया।
第一类:没有狼时男孩喊“狼来了!”—— 误报。村民们拒绝了“没有狼”(H₀),尽管它是真的。第二类:后来狼真的来了,村民们却不理他 —— 漏报。他们保留了“没有狼”,尽管它是假的。有趣的是:前面的误报让后来的漏报更容易发生。
Both Errors in Pictures — Understand Before the Maths 📊तस्वीरों में दोनों Errors — गणित से पहले समझें 📊图解两类错误 — 先理解,再算数 📊
Both errors come from the overlap of two curves: where the test statistic lands if H₀ is true (blue), and where it lands if the effect is real (purple). The decision line splits the axis into "keep H₀" and "reject H₀". Because the curves overlap, some blue area lies past the line (α) and some purple area lies before it (β).
दोनों errors दो curves के overlap से आती हैं: H₀ सच होने पर test statistic कहाँ गिरता है (नीला), और effect असली होने पर कहाँ (बैंगनी)। फ़ैसले की रेखा axis को "H₀ रखें" और "H₀ reject" में बाँटती है। Curves overlap करते हैं, इसलिए कुछ नीला area रेखा के पार है (α) और कुछ बैंगनी area रेखा से पहले (β)।
两类错误都来自两条曲线的重叠:H₀ 为真时检验统计量落在哪里(蓝),以及效应真实时落在哪里(紫)。判决线把坐标轴分成“保留 H₀”和“拒绝 H₀”两部分。由于曲线重叠,部分蓝色面积在线外(α),部分紫色面积在线内(β)。
Example: right-tailed test, α = 0.05, and a real effect 2.5 standard errors away from H₀.
उदाहरण: right-tailed test, α = 0.05, और H₀ से 2.5 standard errors दूर असली effect.
示例:右侧检验,α = 0.05,真实效应距 H₀ 2.5 个标准误。
Drag the decision line, or press play. Watch α (red), β (orange) and power (green) trade places in the curves and in the matrix. Then raise n or the effect: the purple curve moves away and β falls without changing α.
फ़ैसले की रेखा खिसकाएँ, या play दबाएँ। Curves और matrix में α (लाल), β (नारंगी) और power (हरा) की अदला-बदली देखें। फिर n या effect बढ़ाएँ: बैंगनी curve दूर जाता है और α बदले बिना β घटता है।
拖动判决线或点播放。看曲线和矩阵中 α(红)、β(橙)和检验力(绿)此消彼长。再增大 n 或效应:紫色曲线远离,β 下降而 α 不变。
The further apart the curves (a bigger effect), the less they overlap and the easier they are to tell apart. Moving the line left lowers β but raises α; moving it right does the opposite. To lower both, you must make both curves narrower — which means a bigger sample or less noisy measurements.
Curves जितने दूर (बड़ा effect), उतना कम overlap और उन्हें अलग करना उतना आसान। रेखा बाईं ओर ले जाने से β घटता है पर α बढ़ता है; दाईं ओर उल्टा। दोनों घटाने के लिए दोनों curves को पतला करना होगा — यानी बड़ा sample या कम शोर वाला माप।
两条曲线离得越远(效应越大),重叠越少,越容易区分。判决线左移,β 降低但 α 升高;右移则相反。要同时降低两者,必须让两条曲线都变窄 —— 也就是更大的样本或更少噪声的测量。
Story 1 — The Courtroom 🏛️कहानी 1 — अदालत 🏛️故事 1 — 法庭 🏛️
Criminal justice starts from "innocent until proven guilty". The null hypothesis is innocence, and the prosecution must bring strong evidence to overturn it.
आपराधिक न्याय "दोष साबित होने तक बेगुनाह" से शुरू होता है। Null hypothesis बेगुनाही है, और prosecution को उसे पलटने के लिए मज़बूत सबूत लाना होता है।
刑事司法从“未经证明有罪即推定无罪”出发。原假设是无罪,控方必须拿出有力证据才能推翻。
Story 2 — The Cancer Screening Test 🏥कहानी 2 — Cancer Screening Test 🏥故事 2 — 癌症筛查 🏥
A hospital tries a new blood test for an early cancer. H₀: the patient does not have cancer. If a biomarker is above a threshold, the patient is sent for further tests such as a biopsy.
एक अस्पताल शुरुआती cancer के लिए नया blood test आज़माता है। H₀: मरीज़ को cancer नहीं है। अगर biomarker एक threshold से ऊपर हो, तो मरीज़ को biopsy जैसी आगे की जाँच के लिए भेजा जाता है।
一家医院试用一种早期癌症的新血液检测。H₀:患者没有癌症。若生物标志物高于阈值,患者会被安排做活检等进一步检查。
Sensitivity = P(positive | disease) — the test's "power". Specificity = P(negative | no disease) — like 1 − α. For a given test, moving the threshold raises one and lowers the other. A better test (a more informative biomarker) can raise both.
Sensitivity = P(positive | बीमारी) — test की "power"। Specificity = P(negative | बीमारी नहीं) — 1 − α जैसा। किसी दिए गए test में threshold खिसकाने से एक बढ़ता है और दूसरा घटता है। एक बेहतर test (ज़्यादा जानकारी देने वाला biomarker) दोनों बढ़ा सकता है।
灵敏度 = P(阳性 | 患病) —— 检测的“检验力”。特异度 = P(阴性 | 未患病) —— 类似 1 − α。对同一检测,移动阈值会使一个升高、另一个降低。更好的检测(信息量更大的生物标志物)能同时提高两者。
Suppose 1% of people screened have the cancer, the test catches 90% of cancers (sensitivity) and gives a false alarm to 5% of healthy people (specificity 95%). Out of 100,000 people: 900 true positives, but 4,950 false positives. So only about 15% of positive results are real cancers. When the condition is rare, even a good test produces mostly false alarms — which is why positives are always confirmed.
मान लें जाँचे गए लोगों में 1% को cancer है, test 90% cancers पकड़ता है (sensitivity) और 5% स्वस्थ लोगों को झूठा alarm देता है (specificity 95%)। 1,00,000 लोगों में: 900 true positives, पर 4,950 false positives। यानी positive नतीजों में सिर्फ़ लगभग 15% असली cancer हैं। जब बीमारी दुर्लभ हो, तो अच्छा test भी ज़्यादातर झूठे alarms देता है — इसीलिए positives की हमेशा पुष्टि की जाती है।
假设受检人群中 1% 患癌,检测能查出 90% 的癌症(灵敏度),对 5% 的健康人误报(特异度 95%)。在 100,000 人中:900 个真阳性,但有 4,950 个假阳性。所以阳性结果中只有约 15% 是真正的癌症。疾病罕见时,即使好的检测也会产生大量误报 —— 这就是阳性结果总要复查的原因。
Set how common the disease is and where the biomarker threshold sits. Each square is one person. Watch how few of the positives are true cancers when the disease is rare — and how moving the threshold trades misses for false alarms.
बीमारी कितनी आम है और biomarker threshold कहाँ है, यह चुनें। हर खाना एक व्यक्ति है। देखें कि बीमारी दुर्लभ होने पर positives में कितने कम असली cancers हैं — और threshold खिसकाने से चूक और झूठे alarms की अदला-बदली कैसे होती है।
设置疾病的常见程度和生物标志物阈值。每个方块代表一个人。看看疾病罕见时,阳性中真正患癌的人有多少 —— 以及移动阈值如何在漏诊与误报之间取舍。
Story 3 — The Email Spam Filter 📧कहानी 3 — Email Spam Filter 📧故事 3 — 垃圾邮件过滤器 📧
A spam filter makes a decision for every incoming email. H₀: this email is legitimate. H₁: it is spam. Deliver it or move it to the spam folder?
Spam filter हर आने वाले email पर फ़ैसला लेता है। H₀: यह email असली है। H₁: यह spam है। Inbox में भेजें या spam folder में?
垃圾邮件过滤器要为每封来信做决定。H₀:这封邮件是正常的。H₁:它是垃圾邮件。送进收件箱还是移到垃圾箱?
Story 4 — The Insulin Factory 🏭कहानी 4 — Insulin Factory 🏭故事 4 — 胰岛素工厂 🏭
A pharmaceutical factory makes insulin vials. Each batch is tested to check that its strength is on specification. H₀: the batch is in spec (μ = 100 IU/mL). A Type I error destroys a good batch. A Type II error ships an off-spec batch to patients with diabetes.
एक pharmaceutical factory insulin vials बनाती है। हर batch की जाँच होती है कि उसकी ताक़त specification पर है। H₀: batch spec में है (μ = 100 IU/mL)। Type I error अच्छे batch को नष्ट करता है। Type II error ग़लत batch को diabetes के मरीज़ों तक भेजता है।
一家制药厂生产胰岛素小瓶。每批都要检测浓度是否符合规格。H₀:该批符合规格(μ = 100 IU/mL)。第一类错误会销毁合格批次;第二类错误则把不合格批次发给糖尿病患者。
In quality control, "we found no significant difference" is weak proof that a batch is good — a small or noisy sample also finds nothing. Equivalence testing (for example the TOST procedure) sets H₀: "the batch is outside the tolerance" and must reject it to release the batch. Now the error that harms patients is controlled at α.
Quality control में "कोई significant अंतर नहीं मिला" इस बात का कमज़ोर सबूत है कि batch अच्छा है — छोटा या शोर भरा sample भी कुछ नहीं पाता। Equivalence testing (जैसे TOST तरीका) H₀ रखता है: "batch tolerance से बाहर है", और batch छोड़ने के लिए उसे reject करना ज़रूरी है। अब मरीज़ों को नुक़सान करने वाली error α पर नियंत्रित होती है।
在质量控制中,“没有发现显著差异”并不能有力证明批次合格 —— 样本小或噪声大时同样什么也发现不了。等效性检验(例如 TOST 方法)设 H₀:“该批超出公差”,必须拒绝它才能放行。这样伤害患者的那种错误就被控制在 α。
What Controls Each Errorहर Error को क्या नियंत्रित करता है什么控制着每种错误
| Changeबदलाव变化 | Type I (α)Type I (α)第一类(α) | Type II (β)Type II (β)第二类(β) | PowerPower检验力 |
|---|---|---|---|
| Raise α (0.01 → 0.05)α बढ़ाएँ (0.01 → 0.05)提高 α(0.01 → 0.05) | Up ↑बढ़ता ↑升 ↑ | Down ↓घटता ↓降 ↓ | Up ↑बढ़ती ↑升 ↑ |
| Lower α (0.05 → 0.01)α घटाएँ (0.05 → 0.01)降低 α(0.05 → 0.01) | Down ↓घटता ↓降 ↓ | Up ↑बढ़ता ↑升 ↑ | Down ↓घटती ↓降 ↓ |
| Bigger sample nबड़ा sample n更大样本 n | No changeकोई बदलाव नहीं不变 | Down ↓घटता ↓降 ↓ | Up ↑बढ़ती ↑升 ↑ |
| Bigger true effect δबड़ा असली effect δ更大真实效应 δ | No changeकोई बदलाव नहीं不变 | Down ↓घटता ↓降 ↓ | Up ↑बढ़ती ↑升 ↑ |
| Less noise (smaller σ)कम शोर (छोटा σ)更少噪声(更小 σ) | No changeकोई बदलाव नहीं不变 | Down ↓घटता ↓降 ↓ | Up ↑बढ़ती ↑升 ↑ |
| One-tailed instead of two-tailedTwo-tailed की जगह one-tailed单侧代替双侧 | Same total αवही कुल α总 α 不变 | Down in the predicted directionअनुमानित दिशा में घटता预测方向上降低 | Up in the predicted directionअनुमानित दिशा में बढ़ती预测方向上升高 |
Every other knob trades one error for the other. A bigger sample (or more precise measurement) lowers β without raising α. That is why power analysis — working out the n needed for, say, 80% power at your α — is the first step of a well-designed study.
बाक़ी हर knob एक error के बदले दूसरी देता है। बड़ा sample (या ज़्यादा सटीक माप) α बढ़ाए बिना β घटाता है। इसीलिए power analysis — अपने α पर, जैसे 80% power के लिए ज़रूरी n निकालना — अच्छी तरह design की गई study का पहला step है।
其他每个旋钮都是用一种错误换另一种。更大的样本(或更精确的测量)能在不提高 α 的情况下降低 β。这就是为什么功效分析 —— 计算在你的 α 下达到如 80% 检验力所需的 n —— 是设计良好研究的第一步。
Which Error Matters More? — By Fieldकौन-सी Error ज़्यादा मायने रखती है? — क्षेत्र के अनुसार哪种错误更要紧?— 按领域
| Fieldक्षेत्र领域 | Decisionफ़ैसला决定 | Usually worseआम तौर पर बदतर通常更糟 | How it is handledकैसे संभाला जाता है应对方式 |
|---|---|---|---|
| ⚖️ Criminal lawआपराधिक क़ानून刑法 | Convict / acquitसज़ा / बरी定罪 / 无罪 | Type I (convict the innocent)Type I (बेगुनाह को सज़ा)第一类(错判无辜) | Very high evidence barबहुत ऊँची सबूत सीमा极高的证据门槛 |
| 🏥 Cancer screeningCancer screening癌症筛查 | Refer / clearआगे भेजें / साफ़转诊 / 排除 | Type II (miss a cancer)Type II (cancer छूटना)第二类(漏诊) | Low threshold, then a confirmatory testनीचा threshold, फिर पुष्टि वाला test低阈值,再做确认检查 |
| 💊 Drug approvalदवा की मंज़ूरी药物审批 | Approve / rejectमंज़ूर / नामंज़ूर批准 / 拒绝 | Type I (approve a useless drug)Type I (बेअसर दवा मंज़ूर)第一类(批准无效药) | Two-sided α = 0.05, often two trialsTwo-sided α = 0.05, अक्सर दो trials双侧 α = 0.05,常需两项试验 |
| ☢️ Safety monitoringSafety monitoring安全监测 | Alarm / stay quietAlarm / चुप报警 / 不报 | Type II (miss a hazard)Type II (ख़तरा छूटना)第二类(漏掉危险) | Lenient α (e.g. 0.10), extra checksनरम α (जैसे 0.10), अतिरिक्त जाँच宽松 α(如 0.10),额外检查 |
| 📧 Spam filteringSpam filtering垃圾邮件过滤 | Block / deliverरोकें / भेजें拦截 / 投递 | Type I (block real mail)Type I (असली mail रोकना)第一类(拦截正常邮件) | Very low false-positive rateबहुत कम false-positive दर极低的误报率 |
| 📈 A/B testingA/B testingA/B 测试 | Launch / keep oldLaunch / पुराना रखें上线 / 保留旧版 | Both matterदोनों मायने रखते हैं两者都要紧 | α = 0.05 with 80% power80% power के साथ α = 0.05α = 0.05,检验力 80% |
| 🔬 Particle physicsParticle physics粒子物理 | Claim a new particleनए कण का दावा宣布新粒子 | Type I (false discovery)Type I (झूठी खोज)第一类(虚假发现) | 5σ (α ≈ 2.9 × 10⁻⁷)5σ (α ≈ 2.9 × 10⁻⁷)5σ(α ≈ 2.9 × 10⁻⁷) |
| 🧬 Genomics (GWAS)Genomics (GWAS)基因组学(GWAS) | Gene linked to disease?क्या gene बीमारी से जुड़ा है?基因与疾病相关吗? | Type I (false link)Type I (झूठा संबंध)第一类(虚假关联) | α = 5 × 10⁻⁸ |
Worked Example — Power and Sample Size 🔢हल किया उदाहरण — Power और Sample Size 🔢例题 — 检验力与样本量 🔢
A researcher wants to know if a new teaching method raises exam scores by at least 5 points (the smallest gain that matters). Under the old method scores have μ = 70 and σ = 15. One class of students is taught the new way and compared with the known mean of 70. How many students are needed for 80% power at two-tailed α = 0.05?
एक researcher जानना चाहता है कि क्या नई teaching method exam scores कम से कम 5 points बढ़ाती है (सबसे छोटी बढ़त जो मायने रखती है)। पुरानी method में scores का μ = 70 और σ = 15 है। छात्रों की एक class को नए तरीके से पढ़ाया जाता है और ज्ञात mean 70 से तुलना की जाती है। Two-tailed α = 0.05 पर 80% power के लिए कितने छात्र चाहिए?
一位研究者想知道新教学法能否把考试成绩提高至少 5 分(有意义的最小提升)。旧方法下成绩 μ = 70,σ = 15。用新方法教一个班,再与已知均值 70 比较。在双侧 α = 0.05 下要达到 80% 检验力,需要多少学生?
The Replication Crisis — Type I Errors at Scale 📉Replication Crisis — बड़े पैमाने पर Type I Errors 📉可重复性危机 — 大规模的第一类错误 📉
Between 2011 and 2015 a large team (the Open Science Collaboration) repeated 100 published psychology studies. About 97% of the originals had reported significant results; only about 36% of the repeats did. Not every failed repeat means the original was a Type I error — repeats can miss real effects too — but the results showed that the false-positive rate in the published record was far above 5%.
2011 से 2015 के बीच एक बड़ी team (Open Science Collaboration) ने 100 प्रकाशित psychology studies दोहराईं। मूल studies में लगभग 97% ने significant नतीजे बताए थे; दोहराने पर सिर्फ़ लगभग 36% में मिले। हर असफल दोहराव का मतलब यह नहीं कि मूल study Type I error थी — दोहराव भी असली effects चूक सकते हैं — पर नतीजों ने दिखाया कि प्रकाशित साहित्य में false-positive दर 5% से बहुत ऊपर थी।
2011 至 2015 年间,一个大型团队(开放科学合作组织)重复了 100 项已发表的心理学研究。原始研究中约 97% 报告了显著结果;重复研究中只有约 36% 显著。并非每次重复失败都说明原研究是第一类错误 —— 重复研究也可能漏掉真实效应 —— 但结果表明,已发表文献中的假阳性率远高于 5%。
How can the real false-positive rate climb so far above α? The two simulations below show the two biggest reasons.
असली false-positive दर α से इतना ऊपर कैसे चढ़ सकती है? नीचे के दो simulations दो सबसे बड़े कारण दिखाते हैं।
真实的假阳性率怎么会远远超过 α?下面两个模拟展示了两大原因。
Each square is one study. Set how often the tested effect is real, and how much power each study has. Stars are "significant" results — the ones that get published. Red stars are Type I errors.
हर खाना एक study है। तय करें कि जाँचा गया effect कितनी बार असली है, और हर study की power कितनी है। सितारे "significant" नतीजे हैं — जो प्रकाशित होते हैं। लाल सितारे Type I errors हैं।
每个方块是一项研究。设置被检验的效应真实存在的比例,以及每项研究的检验力。星号是“显著”结果 —— 也就是会被发表的那些。红色星号是第一类错误。
H₀ is TRUE: there is no effect at all. The researcher checks the p-value after every 10 people and stops as soon as p < 0.05. Run one study to watch the path, then 1,000 to see the real false-positive rate. Change the number of peeks.
H₀ सच है: कोई effect नहीं। Researcher हर 10 लोगों के बाद p-value देखता है और p < 0.05 होते ही रुक जाता है। रास्ता देखने के लिए एक study चलाएँ, फिर असली false-positive दर देखने के लिए 1,000. झाँकने की संख्या बदलें।
H₀ 为真:完全没有效应。研究者每 10 人查看一次 p 值,一旦 p < 0.05 就停止。先运行一项研究看路径,再运行 1,000 项看真实的假阳性率。改变偷看次数试试。
Researchers now pre-register their hypotheses, sample size, α and analysis plan in a public registry (such as OSF or ClinicalTrials.gov) before collecting data. In a Registered Report, the journal even accepts the paper before the results are known. The effect is striking: a 2021 study found that about 96% of ordinary psychology papers supported their hypothesis, against about 44% of Registered Reports — a sign of how much flexibility and publication bias had inflated "success".
Researchers अब data जुटाने से पहले अपनी hypotheses, sample size, α और analysis योजना किसी सार्वजनिक registry (जैसे OSF या ClinicalTrials.gov) पर pre-register करते हैं। Registered Report में journal नतीजे आने से पहले ही paper स्वीकार कर लेता है। असर साफ़ है: 2021 की एक study में पाया गया कि लगभग 96% सामान्य psychology papers ने अपनी hypothesis का समर्थन किया, जबकि Registered Reports में लगभग 44% ने — यह दिखाता है कि लचीलेपन और publication bias ने "सफलता" को कितना बढ़ा दिया था।
研究者现在会在收集数据前,把假设、样本量、α 和分析计划预注册到公开平台(如 OSF 或 ClinicalTrials.gov)。在注册报告中,期刊甚至在结果出来之前就接收论文。效果很明显:2021 年的一项研究发现,约 96% 的普通心理学论文支持其假设,而注册报告中只有约 44% —— 可见分析的灵活性和发表偏倚把“成功率”抬高了多少。
Python ImplementationPython ImplementationPython 实现
Power and sample size for the teaching exampleTeaching उदाहरण के लिए power और sample size教学例子的检验力与样本量
import numpy as np
from scipy import stats
# Teaching method: detect +5 points, σ = 15, two-tailed α = 0.05, one group vs known μ = 70
delta, sigma, alpha = 5, 15, 0.05
za, zb = stats.norm.ppf(1 - alpha/2), stats.norm.ppf(0.80)
n80 = (za + zb)**2 * sigma**2 / delta**2
print(f"n for 80% power: {n80:.1f} → {np.ceil(n80):.0f} students")
n95 = (za + stats.norm.ppf(0.95))**2 * sigma**2 / delta**2
print(f"n for 95% power: {n95:.1f} → {np.ceil(n95):.0f} students")
def power(n):
shift = delta / (sigma / np.sqrt(n))
return stats.norm.sf(za - shift) + stats.norm.cdf(-za - shift)
for n in [20, 45, 71, 117]:
print(f"n = {n:3d}: power = {power(n)*100:4.1f}% β = {(1-power(n))*100:4.1f}%")
# Comparing TWO groups (new method vs old) needs about twice as many per group
print(f"\nTwo-group design: about {np.ceil(2*n80):.0f} students in EACH group")
Insulin batch: same data, two α valuesInsulin batch: वही data, दो α胰岛素批次:同样数据,两个 α
from scipy import stats
# Insulin batch: H₀ μ = 100 IU/mL, two-tailed one-sample t-test
xbar, s, n, mu0 = 97.4, 4.2, 20, 100
t = (xbar - mu0) / (s / n ** 0.5)
p = 2 * stats.t.sf(abs(t), df=n - 1)
print(f"t = {t:.3f}, df = {n-1}, p = {p:.4f}")
for a in [0.01, 0.05]:
crit = stats.t.ppf(1 - a/2, n - 1)
print(f"α = {a}: critical ±{crit:.3f} → {'reject H₀ (destroy batch)' if p < a else 'fail to reject (ship batch)'}")
Simulating both error ratesदोनों error दरों का simulation模拟两种错误率
import numpy as np
from scipy import stats
rng = np.random.default_rng(7)
reps, n, alpha = 20_000, 25, 0.05
# World 1: H₀ true (no effect) → every rejection is a Type I error
x0 = rng.normal(0, 1, (reps, n))
p0 = stats.ttest_1samp(x0, 0, axis=1).pvalue
print(f"H₀ true : Type I error rate = {np.mean(p0 < alpha)*100:5.2f}% (α = 5%)")
# World 2: real effect d = 0.5 → every non-rejection is a Type II error
x1 = rng.normal(0.5, 1, (reps, n))
p1 = stats.ttest_1samp(x1, 0, axis=1).pvalue
beta = np.mean(p1 >= alpha)
print(f"d = 0.5 : Type II error rate = {beta*100:5.2f}% → power = {(1-beta)*100:.1f}%")
The base-rate trap in numbersसंख्याओं में base-rate का जाल用数字看基础比率陷阱
# Screening with a rare disease: what does a positive result mean?
prev, sens, spec = 0.01, 0.90, 0.95 # 1% have it; test catches 90%; 5% false alarms
N = 100_000
sick, healthy = N * prev, N * (1 - prev)
tp, fn = sick * sens, sick * (1 - sens)
fp, tn = healthy * (1 - spec), healthy * spec
print(f"True positives {tp:7.0f} False negatives {fn:7.0f}")
print(f"False positives {fp:7.0f} True negatives {tn:7.0f}")
print(f"P(disease | positive test) = {tp / (tp + fp) * 100:.1f}%")
print(f"P(healthy | negative test) = {tn / (tn + fn) * 100:.2f}%")
Optional stopping inflates Type I errorsOptional stopping, Type I errors बढ़ाता है可选停止会抬高第一类错误
import numpy as np
from scipy import stats
# Optional stopping: peek after every 10 people (up to 100), stop as soon as p < 0.05
rng = np.random.default_rng(11)
reps, hits = 10_000, 0
for _ in range(reps):
x = rng.normal(0, 1, 100) # H₀ is TRUE
for n in range(10, 101, 10):
if stats.ttest_1samp(x[:n], 0).pvalue < 0.05:
hits += 1
break
print(f"Fixed n = 100, one test: 5.0% false positives (by design)")
print(f"Peeking 10 times, stop if p<.05: {hits / reps * 100:.1f}% false positives")
Quick Reference Summaryझटपट सारांश速查总结
| FeatureFeature特征 | Type I errorType I error第一类错误 | Type II errorType II error第二类错误 |
|---|---|---|
| Also calledदूसरा नाम又称 | False positive, α errorFalse positive, α error假阳性,α 错误 | False negative, β errorFalse negative, β error假阴性,β 错误 |
| Definitionपरिभाषा定义 | Reject H₀ when H₀ is trueH₀ सच होने पर reject करनाH₀ 为真时拒绝 | Keep H₀ when H₀ is falseH₀ ग़लत होने पर रखनाH₀ 为假时保留 |
| ProbabilityProbability概率 | α (if H₀ is true)α (अगर H₀ सच)α(若 H₀ 为真) | β (depends on n, effect size, σ, α)β (n, effect size, σ, α पर निर्भर)β(取决于 n、效应量、σ、α) |
| Medical nameMedical नाम医学术语 | 1 − specificity1 − specificity1 − 特异度 | 1 − sensitivity1 − sensitivity1 − 灵敏度 |
| Courtroomअदालत法庭 | Convicting the innocentबेगुनाह को सज़ा给无辜者定罪 | Freeing the guiltyदोषी को छोड़ना放走罪犯 |
| Smoke detectorSmoke detector烟雾报警器 | Beeps, no fireबजता है, आग नहीं响了,却没火 | Silent in a fireआग में चुप着火了,却不响 |
| Reduced byघटता है如何降低 | Lowering αα घटाकर降低 α | Bigger n, less noise, or a higher αबड़ा n, कम शोर, या ऊँचा α更大 n、更少噪声或更高 α |
| Trade-offसौदा权衡 | For a fixed test and n, lowering one raises the otherतय test और n पर, एक घटाने से दूसरा बढ़ता है检验和 n 固定时,降低一个就会升高另一个 | Better evidence (bigger n) lowers bothबेहतर सबूत (बड़ा n) दोनों घटाता है更好的证据(更大的 n)能同时降低两者 |
Good statistical thinking is not about getting p < 0.05. It is about honestly measuring and limiting both kinds of error for the decision at hand. Always ask: "In this situation, which error costs more?" Control that error first, plan enough power to control the other, and report both openly.
अच्छी statistical सोच p < 0.05 पाने के बारे में नहीं है। यह सामने के फ़ैसले के लिए दोनों तरह की ग़लतियों को ईमानदारी से मापने और सीमित करने के बारे में है। हमेशा पूछें: "इस स्थिति में कौन-सी ग़लती ज़्यादा महँगी है?" पहले उस error को नियंत्रित करें, दूसरी को नियंत्रित करने के लिए काफ़ी power की योजना बनाएँ, और दोनों को खुलकर बताएँ।
好的统计思维不是为了得到 p < 0.05,而是针对眼前的决定,诚实地衡量并控制两类错误。始终问自己:“在这种情况下,哪种错误代价更高?”先控制那种错误,再规划足够的检验力来控制另一种,并公开报告两者。