Foundations of Data Science 📂 Inferential Statistics · 4 of 8 143 min read

The p-value Explained

A deep-dive into the p-value — from the 1919 Lady Tasting Tea experiment that invented it, to a visual binomial diagram, the three-panel normal curve illustration, a complete myth-busting section covering six dangerous misconceptions, the evidence strength scale, a worked hospital wait-time example, and Python code that shows how sample size, effect size, and variability all drive the p-value. Includes the p-value vs confidence interval duality.

🌐
SectionSection第 01 节

The Lady Tasting Teaचाय चखने वाली महिला品茶的女士

Rothamsted research station, England, in the early 1920s. A group of scientists are having afternoon tea. A colleague — the algae expert Dr Muriel Bristol — says she can tell, just by tasting, whether the milk was poured before or after the tea. The statistician Ronald Fisher doubts it. So he designs a fair test.

Rothamsted research station, England, 1920 के दशक की शुरुआत। कुछ वैज्ञानिक दोपहर की चाय पी रहे हैं। एक सहकर्मी — शैवाल (algae) विशेषज्ञ Dr Muriel Bristol — कहती हैं कि वे सिर्फ़ चखकर बता सकती हैं कि दूध चाय से पहले डाला गया या बाद में। Statistician Ronald Fisher को शक है। इसलिए वे एक निष्पक्ष test बनाते हैं।

20 世纪 20 年代初,英国洛桑(Rothamsted)研究站。一群科学家在喝下午茶。一位同事 —— 藻类专家 Muriel Bristol 博士 —— 说她仅凭品尝就能分辨牛奶是在茶之前还是之后倒入的。统计学家罗纳德·费希尔对此表示怀疑,于是他设计了一个公平的检验。

The test uses eight cups: four milk-first and four tea-first, served in random order. She is told there are four of each and must pick the four milk-first cups. If she is only guessing, there are 70 equally likely ways to pick 4 cups out of 8 — and only one of them is fully correct. The story goes that she got all 8 right. The chance of that by pure guessing is 1 in 70 — about 1.4%.

Test में आठ कप हैं: चार milk-first और चार tea-first, random क्रम में। उन्हें बताया जाता है कि हर तरह के चार हैं, और उन्हें चार milk-first कप चुनने हैं। अगर वे सिर्फ़ अंदाज़ा लगा रही हैं, तो 8 में से 4 कप चुनने के 70 बराबर संभावित तरीके हैं — और सिर्फ़ एक पूरी तरह सही है। कहानी के अनुसार उन्होंने सभी 8 सही बताए। सिर्फ़ अंदाज़े से ऐसा होने का chance 70 में 1 — लगभग 1.4% है।

检验用了八杯茶:四杯先加奶、四杯先加茶,随机顺序端上。她被告知每种各四杯,要挑出四杯先加奶的。如果她只是瞎猜,从 8 杯中挑 4 杯共有 70 种等可能的方式 —— 只有一种完全正确。据说她8 杯全对。纯靠猜做到这一点的概率是 七十分之一 —— 约 1.4%。

💡
That 1.4% Is a p-valueवह 1.4% एक p-value है这个 1.4% 就是 p 值

Fisher's reasoning: "If she had no ability at all, the chance of getting all 8 cups right by luck is only 1.4%." That small number was the evidence. Fisher wrote this experiment up in his 1935 book The Design of Experiments. p-values existed before him, but the Lady Tasting Tea is still the clearest picture of what a p-value measures: how surprising the result would be if there were nothing going on.

Fisher का तर्क: "अगर उनमें कोई क्षमता नहीं है, तो किस्मत से सभी 8 कप सही होने का chance सिर्फ़ 1.4% है।" वही छोटी संख्या सबूत थी। Fisher ने यह प्रयोग अपनी 1935 की किताब The Design of Experiments में लिखा। p-values उनसे पहले भी थे, पर Lady Tasting Tea आज भी सबसे साफ़ तस्वीर है कि p-value क्या मापता है: अगर कुछ भी न हो रहा हो, तो नतीजा कितना चौंकाने वाला होता।

费希尔的推理是:“如果她根本没有这种能力,仅凭运气 8 杯全对的概率只有 1.4%。”这个小数字就是证据。费希尔在 1935 年的著作《实验设计》中记述了这个实验。p 值在他之前就已存在,但“女士品茶”至今仍是理解 p 值最清晰的画面:如果什么都没发生,这个结果会有多令人意外。

LIVELIVE互动Lady Tasting Tea — Play the GuesserLady Tasting Tea — Guesser बनकर खेलें女士品茶 — 扮演猜测者

A pure guesser picks 4 of the 8 cups at random. Watch one guesser, then run 1,000. How often does a guesser get all 8 right? That share is the p-value.

एक शुद्ध अंदाज़ा लगाने वाला 8 में से 4 कप random चुनता है। एक guesser देखें, फिर 1,000 चलाएँ। कितनी बार guesser सभी 8 सही बताता है? वही हिस्सा p-value है।

一位纯猜测者从 8 杯中随机挑 4 杯。先看一位猜测者,再模拟 1,000 位。猜测者 8 杯全对的比例有多大?这个比例就是 p 值。

The p-value is probably the most used — and most misunderstood — number in science. It appears in medical journals, psychology studies, A/B test reports and quality dashboards. Knowing what it means, and what it does not mean, is one of the most useful skills a data scientist can have.

p-value शायद विज्ञान की सबसे ज़्यादा इस्तेमाल होने वाली — और सबसे ज़्यादा ग़लत समझी जाने वाली — संख्या है। यह medical journals, psychology studies, A/B test reports और quality dashboards में दिखता है। इसका मतलब, और यह क्या नहीं बताता, जानना एक data scientist का सबसे उपयोगी हुनर है।

p 值可能是科学界用得最多、也最常被误解的数字。它出现在医学期刊、心理学研究、A/B 测试报告和质量看板中。理解它的含义,以及它不代表什么,是数据科学家最有用的技能之一。


SectionSection第 02 节

What Exactly Is a p-value?p-value असल में क्या है?p 值到底是什么?

Try a thought experiment first. You suspect a coin favours heads. You flip it 10 times and get 9 heads. Ask: "If this coin were perfectly fair, how often would I see a result this extreme just by chance?" The answer is the p-value.

पहले एक सोच-प्रयोग करें। आपको शक है कि coin heads की ओर झुका है। आप उसे 10 बार उछालते हैं और 9 heads आते हैं। पूछें: "अगर यह coin पूरी तरह fair होता, तो सिर्फ़ संयोग से इतना extreme नतीजा कितनी बार दिखता?" इसका जवाब p-value है।

先做个思想实验。你怀疑一枚硬币偏向正面。你抛了 10 次,得到 9 次正面。问自己:“如果这枚硬币完全公平,仅凭偶然看到这么极端的结果的频率有多高?”答案就是 p 值。

💡
The Formal Definitionऔपचारिक परिभाषा正式定义

The p-value is the probability of getting a test statistic at least as extreme as the one observed, assuming the null hypothesis H₀ is true.

p = P( data this extreme or more extreme | H₀ is true )

It answers one question only: "How surprising is this data, if nothing is going on?"

p-value कम से कम देखे गए जितना extreme test statistic मिलने की probability है, यह मानकर कि null hypothesis H₀ सच है।

p = P( इतना या इससे ज़्यादा extreme data | H₀ सच है )

यह सिर्फ़ एक सवाल का जवाब देता है: "अगर कुछ भी नहीं हो रहा, तो यह data कितना चौंकाने वाला है?"

p 值是:假设原假设 H₀ 为真时,得到至少与观测值一样极端的检验统计量的概率。

p = P(数据至少这么极端 | H₀ 为真)

它只回答一个问题:“如果什么都没发生,这些数据有多令人意外?”

Small p-valueछोटा p-value较小的 p 值
p < 0.05
  • Data are surprising under H₀H₀ के तहत data चौंकाने वाला在 H₀ 下数据令人意外
  • Evidence against H₀H₀ के ख़िलाफ़ सबूत反驳 H₀ 的证据
  • Reject H₀ if p < αp < α हो तो H₀ rejectp < α 则拒绝 H₀
  • "Statistically significant""Statistically significant"“统计显著”
Large p-valueबड़ा p-value较大的 p 值
p ≥ 0.05
  • Data are not surprising under H₀H₀ के तहत data चौंकाने वाला नहीं在 H₀ 下数据不意外
  • Weak evidence against H₀H₀ के ख़िलाफ़ कमज़ोर सबूत反驳 H₀ 的证据较弱
  • Fail to reject H₀H₀ reject नहीं不拒绝 H₀
  • Not proof that H₀ is trueH₀ के सच होने का सबूत नहीं不能证明 H₀ 为真
The threshold αThreshold α阈值 α
usually 0.05आम तौर पर 0.05通常 0.05
  • Set before the experimentप्रयोग से पहले तय实验前设定
  • A convention, not magicपरंपरा है, जादू नहीं是惯例,不是魔法
  • Stricter (e.g. 0.01) when false alarms are costlyझूठा alarm महँगा हो तो सख़्त (जैसे 0.01)误报代价高时更严(如 0.01)
  • p < α → reject H₀p < α → H₀ rejectp < α → 拒绝 H₀

SectionSection第 03 节

The p-value in Pictures — Understand Before the Mathsतस्वीरों में p-value — गणित से पहले समझें图解 p 值 — 先理解,再算数

Every p-value is built the same way. Imagine the world where H₀ is true. List everything that could happen there and how likely it is. Then add up the chances of everything at least as extreme as what you actually saw.

हर p-value एक ही तरह बनता है। उस दुनिया की कल्पना करें जहाँ H₀ सच है। वहाँ जो कुछ हो सकता है और उसकी संभावना, सब लिखें। फिर जो आपने असल में देखा, उससे कम से कम उतना extreme हर चीज़ के chances जोड़ें।

每个 p 值的构造方式都一样:想象 H₀ 为真的世界,列出那里可能发生的一切及其概率,然后把至少与你实际看到的一样极端的所有情况的概率加起来。

☕ PICTURE 1 — THE TEA TEST: COUNT THE WAYSतस्वीर 1 — चाय TEST: तरीके गिनें图 1 — 品茶检验:数一数方式
Lady tasting tea If she is only guessing: how many cups right? (70 equally likely ways to pick 4 cups)अगर वह सिर्फ़ अंदाज़ा लगा रही है: कितने कप सही? (4 कप चुनने के 70 बराबर संभावित तरीके)如果她只是瞎猜:能猜对几杯?(挑 4 杯共有 70 种等可能的方式) 1/70 = 1.4% 0 right0 सही对 0 杯 16/70 = 22.9% 2 right2 सही对 2 杯 36/70 = 51.4% 4 right4 सही对 4 杯 16/70 = 22.9% 6 right6 सही对 6 杯 1/70 = 1.4% 8 right8 सही对 8 杯 She got all 8 → p = 1/70 = 1.4%उसने सभी 8 सही बताए → p = 1/70 = 1.4%她 8 杯全对 → p = 1/70 = 1.4% Odd numbers are impossible: each wrong "milk-first" pick also makes one wrong "tea-first" cup.विषम संख्याएँ असंभव हैं: हर ग़लत "milk-first" चुनाव एक "tea-first" कप को भी ग़लत कर देता है।奇数不可能出现:每错选一杯“先加奶”,就必然有一杯“先加茶”也错了。
📊 PICTURE 2 — FOR A CONTINUOUS TEST, THE p-VALUE IS A TAIL AREAतस्वीर 2 — CONTINUOUS TEST में p-VALUE एक TAIL AREA है图 2 — 连续型检验中,p 值是尾部面积
p-value as area Large p: z = 0.8बड़ा p: z = 0.8较大的 p:z = 0.8 +0.80 -0.80 21% + 21% p = 0.4237 fail to reject H₀H₀ reject नहीं不拒绝 H₀ Borderline p: z = 1.96सीमा पर p: z = 1.96临界的 p:z = 1.96 +1.96 -1.96 2.5% + 2.5% p = 0.0500 right at α = 0.05ठीक α = 0.05 पर恰好在 α = 0.05 Very small p: z = 3.0बहुत छोटा p: z = 3.0很小的 p:z = 3.0 +3.00 -3.00 0.13% + 0.13% p = 0.0027 strong evidence — reject H₀मज़बूत सबूत — H₀ reject强证据 —— 拒绝 H₀

The further the test statistic is from 0, the smaller the shaded tails, the smaller p, and the stronger the evidence against H₀.

Test statistic, 0 से जितना दूर, छायांकित tails उतनी छोटी, p उतना छोटा, और H₀ के ख़िलाफ़ सबूत उतना मज़बूत।

检验统计量离 0 越远,阴影尾部越小,p 越小,反驳 H₀ 的证据越强。


SectionSection第 04 节

The Coin Flip — A Visual WalkthroughCoin Flip — एक visual walkthrough抛硬币 — 图解演示

We flip a coin 10 times and see 9 heads. H₀: the coin is fair, P(heads) = 0.5. We use a two-tailed test, because a coin biased towards tails would be just as interesting. So "at least as extreme" means 9 or 10 heads or 0 or 1 heads.

हम coin 10 बार उछालते हैं और 9 heads देखते हैं। H₀: coin fair है, P(heads) = 0.5. हम two-tailed test लेते हैं, क्योंकि tails की ओर झुका coin भी उतना ही दिलचस्प होता। इसलिए "कम से कम इतना extreme" का मतलब है 9 या 10 heads या 0 या 1 heads.

我们抛 10 次硬币,看到 9 次正面。H₀:硬币公平,P(正面) = 0.5。我们用双侧检验,因为偏向反面的硬币同样值得关注。所以“至少一样极端”指 9 或 10 次正面,或 0 或 1 次正面。

🪙 THE BINOMIAL DISTRIBUTION UNDER H₀ (n = 10, P = 0.5)H₀ के तहत BINOMIAL DISTRIBUTION (n = 10, P = 0.5)H₀ 下的二项分布(n = 10,P = 0.5)
Binomial distribution under H0 If the coin is fair (H₀): chance of each number of heads in 10 flipsअगर coin fair है (H₀): 10 flips में हर संख्या के heads का chance若硬币公平(H₀):10 次抛掷中各正面数的概率 0.05 0.10 0.15 0.20 0.25 0 0.10% 1 1.0% 2 4.4% 3 11.7% 4 20.5% 5 24.6% 6 20.5% 7 11.7% 8 4.4% 9 1.0% 10 0.10% observed: 9 headsदेखा: 9 heads观测:9 次正面 p = P(≤1 or ≥9 heads | fair)p = P(≤1 या ≥9 heads | fair)p = P(≤1 或 ≥9 次正面 | 公平) = 22/1,024 = 0.0215 (2.1%) Number of heads in 10 flips — red bars are at least as extreme as 9 heads (in either direction)10 flips में heads की संख्या — लाल bars कम से कम 9 heads जितने extreme हैं (किसी भी दिशा में)10 次抛掷的正面数 —— 红色柱与 9 次正面至少一样极端(任一方向)
✅
Reading the Pictureतस्वीर पढ़ना读懂这张图

The bars show every possible result of 10 fair flips. The red bars are the results at least as extreme as 9 heads. There are 1 + 10 + 10 + 1 = 22 such sequences out of 2¹⁰ = 1,024, so p = 22/1,024 ≈ 0.021.

Since 0.021 < α = 0.05, we reject H₀. But 2.1% is not zero: a fair coin gives a result this extreme about 1 time in 47. If the coin really is fair, our rejection is a Type I error. Note that this is not "a 2.1% chance the coin is fair" — the p-value cannot tell you that.

Bars, 10 fair flips के हर संभव नतीजे दिखाते हैं। लाल bars वे नतीजे हैं जो कम से कम 9 heads जितने extreme हैं। 2¹⁰ = 1,024 में से ऐसे 1 + 10 + 10 + 1 = 22 sequences हैं, इसलिए p = 22/1,024 ≈ 0.021.

क्योंकि 0.021 < α = 0.05, हम H₀ reject करते हैं। पर 2.1% शून्य नहीं है: fair coin भी लगभग 47 में 1 बार इतना extreme नतीजा देता है। अगर coin सच में fair है, तो हमारा reject करना Type I error है। ध्यान दें, इसका मतलब "coin के fair होने का 2.1% chance" नहीं है — p-value यह नहीं बता सकता।

柱子显示公平硬币抛 10 次的所有可能结果。红色柱是与 9 次正面至少一样极端的结果。在 2¹⁰ = 1,024 种序列中有 1 + 10 + 10 + 1 = 22 种,所以 p = 22/1,024 ≈ 0.021。

由于 0.021 < α = 0.05,我们拒绝 H₀。但 2.1% 不是零:公平硬币大约每 47 次就会出现一次这么极端的结果。如果硬币真的公平,我们的拒绝就是第一类错误。注意,这不是“硬币公平的概率为 2.1%” —— p 值无法告诉你这一点。

LIVELIVE互动Coin Flip Lab — Build the p-value YourselfCoin Flip Lab — ख़ुद p-value बनाएँ抛硬币实验室 — 亲手构造 p 值

Choose the number of flips and the number of heads you observed. The red bars add up to the exact p-value. Then flip a fair coin (animated) many times and count how often it is at least as extreme — the share matches p.

Flips की संख्या और देखे गए heads चुनें। लाल bars का जोड़ सटीक p-value है। फिर fair coin को (animated) कई बार उछालें और गिनें कि कितनी बार नतीजा कम से कम इतना extreme है — वह हिस्सा p से मेल खाता है।

选择抛掷次数和观测到的正面数。红色柱之和就是精确的 p 值。然后(动画)多次抛一枚公平硬币,数一数有多少次至少同样极端 —— 这个比例与 p 吻合。

n


SectionSection第 05 节

The p-value on a Normal CurveNormal Curve पर p-value正态曲线上的 p 值

For continuous data — means, differences — the p-value is an area under the normal (or t) curve. The test statistic (a z-score or t-value) says how many standard errors your result sits from the H₀ value. The p-value is the area in the tail(s) beyond that point.

Continuous data — means, अंतर — के लिए p-value, normal (या t) curve के नीचे का area है। Test statistic (z-score या t-value) बताता है कि आपका नतीजा H₀ value से कितने standard errors दूर है। p-value उस बिंदु के आगे की tail(s) का area है।

对于连续数据(均值、差异),p 值是正态(或 t)曲线下的一块面积。检验统计量(z 分数或 t 值)表示你的结果离 H₀ 值有几个标准误。p 值就是该点之外尾部的面积。

LIVELIVE互动Tail-Area AnimatorTail-Area Animator尾部面积动画

Drag z, or press play to watch z slide from 0 to 3.5. The red tail area — the p-value — shrinks fast, and the marker moves along the evidence scale.

z को खिसकाएँ, या play दबाकर z को 0 से 3.5 तक जाते देखें। लाल tail area — p-value — तेज़ी से घटता है, और marker सबूत के पैमाने पर चलता है।

拖动 z,或点播放看 z 从 0 滑到 3.5。红色尾部面积(p 值)迅速缩小,标记沿证据刻度移动。

🎯
The Idea in One Sentenceएक वाक्य में विचार一句话概括

The p-value is the area of the tail(s) beyond your test statistic, under the curve that shows what would happen if H₀ were true. The further your result is from the centre, the smaller that area, the smaller p, and the stronger the case against H₀.

p-value आपके test statistic के आगे की tail(s) का area है, उस curve के नीचे जो दिखाता है कि H₀ सच होने पर क्या होता। नतीजा केंद्र से जितना दूर, area उतना छोटा, p उतना छोटा, और H₀ के ख़िलाफ़ केस उतना मज़बूत।

p 值就是在“若 H₀ 为真会发生什么”的曲线下,检验统计量之外尾部的面积。结果离中心越远,面积越小,p 越小,反驳 H₀ 的理由越充分。


SectionSection第 06 节

What the p-value Is NOT — Six Mythsp-value क्या नहीं है — छह भ्रमp 值不是什么 — 六大误区

In 2016 the American Statistical Association published its first-ever formal statement on a specific matter of statistical practice: the p-value. It gave six principles to stop common misuse. The myths below are closely linked to those principles.

2016 में American Statistical Association ने statistical practice के किसी ख़ास विषय पर अपना पहला औपचारिक बयान जारी किया: p-value. इसमें आम ग़लत इस्तेमाल रोकने के लिए छह सिद्धांत थे। नीचे के भ्रम उन्हीं सिद्धांतों से जुड़े हैं।

2016 年,美国统计协会首次就某一具体统计实践问题发表正式声明:p 值。声明提出六条原则,以纠正常见的误用。下面的误区与这些原则密切相关。

Mythभ्रम误区The truthसच्चाई真相
❌ "p = 0.03 means a 3% chance that H₀ is true.""p = 0.03 मतलब H₀ के सच होने का 3% chance."“p = 0.03 表示 H₀ 为真的概率是 3%。”✅ p is computed assuming H₀ is true, so it cannot give the chance that H₀ is true. That needs prior information and Bayesian methods.p, H₀ को सच मानकर निकाला जाता है, इसलिए यह H₀ के सच होने का chance नहीं दे सकता। उसके लिए पहले की जानकारी और Bayesian methods चाहिए।p 是在假设 H₀ 为真的前提下算出的,所以无法给出 H₀ 为真的概率。那需要先验信息和贝叶斯方法。
❌ "p < 0.05 means the result is important.""p < 0.05 मतलब नतीजा ज़रूरी है।"“p < 0.05 说明结果很重要。”✅ With a big enough sample, a tiny, useless difference gives a tiny p. Significance ≠ importance. Report an effect size.काफ़ी बड़े sample में छोटा, बेकार अंतर भी बहुत छोटा p देता है। Significance ≠ महत्व। Effect size बताएँ।样本足够大时,微小而无用的差异也能得到很小的 p。显著 ≠ 重要。要报告效应量。
❌ "p ≥ 0.05 means there is no effect.""p ≥ 0.05 मतलब कोई effect नहीं।"“p ≥ 0.05 说明没有效应。”✅ The study may have been too small to see a real effect. Absence of evidence is not evidence of absence.Study असली effect देखने के लिए बहुत छोटी हो सकती है। सबूत का न होना, न होने का सबूत नहीं।研究可能太小,看不到真实效应。没有证据不等于没有效应的证据。
❌ "p = 0.049 is a real finding, but p = 0.051 is not.""p = 0.049 असली खोज है, पर p = 0.051 नहीं।"“p = 0.049 是真发现,p = 0.051 就不是。”✅ They are almost identical evidence. 0.05 is a convention, not a line between truth and falsehood.ये लगभग एक जैसे सबूत हैं। 0.05 एक परंपरा है, सच और झूठ के बीच की रेखा नहीं।两者的证据几乎相同。0.05 是惯例,不是真与假的分界线。
❌ "If I repeat the study, I will get p < 0.05 again.""Study दोहराऊँ तो फिर p < 0.05 मिलेगा।"“重复研究,还会得到 p < 0.05。”✅ p-values jump around a lot between studies, even when the effect is real. With 50% power, a true finding is "replicated" only half the time. See the dance below.असली effect होने पर भी p-values studies के बीच बहुत उछलते हैं। 50% power पर सच्ची खोज भी आधी बार ही "दोहराई" जाती है। नीचे का नाच देखें।即使效应真实存在,p 值在不同研究间也会大幅跳动。检验力 50% 时,真实发现也只有一半的概率被“重复”出来。看下面的“p 值之舞”。
❌ "A smaller p means a bigger effect.""छोटा p मतलब बड़ा effect."“p 越小,效应越大。”✅ p depends on effect size and sample size together. For a one-sample t-test, t = d × √n: a small d with a huge n can beat a large d with a small n.p, effect size और sample size दोनों पर निर्भर है। One-sample t-test में t = d × √n: बहुत बड़े n के साथ छोटा d, छोटे n के साथ बड़े d को हरा सकता है।p 同时取决于效应量和样本量。单样本 t 检验中 t = d × √n:小 d 配上巨大的 n,可以胜过大 d 配上小 n。
⚠️
Sample Size Drives SignificanceSample Size, Significance को चलाता है样本量驱动显著性

A tiny p can come from a huge sample detecting a trivial effect. A large p can come from a small study that missed a real, large effect. Because t = d × √n, the p-value alone cannot tell you which is happening. That is why reporting an effect size and a confidence interval is essential, not optional.

छोटा p बहुत बड़े sample से आ सकता है जिसने मामूली effect पकड़ा। बड़ा p छोटी study से आ सकता है जो असली, बड़ा effect चूक गई। क्योंकि t = d × √n, अकेला p-value नहीं बता सकता कि इनमें से क्या हो रहा है। इसीलिए effect size और confidence interval बताना ज़रूरी है, वैकल्पिक नहीं।

极小的 p 可能来自巨大样本检测到的微不足道的效应;较大的 p 可能来自小研究错过了真实而大的效应。因为 t = d × √n,仅凭 p 值无法判断是哪种情况。所以报告效应量和置信区间是必需的,而不是可选的。

LIVELIVE互动The Dance of the p-valuesp-values का नाचp 值之舞

Press play. Each dot is a new study with the same true effect and the same n. Watch how wildly p jumps between studies — and how the share below 0.05 matches the power.

Play दबाएँ। हर dot एक नई study है, वही असली effect और वही n. देखें कि studies के बीच p कितना उछलता है — और 0.05 से नीचे का हिस्सा power से कैसे मेल खाता है।

点击播放。每个点是一项真实效应和 n 都相同的新研究。看看 p 在研究之间跳得多厉害 —— 以及低于 0.05 的比例如何与检验力吻合。

d


SectionSection第 07 节

The p-value Scale — How to Read the Evidencep-value का पैमाना — सबूत कैसे पढ़ेंp 值刻度 — 如何解读证据

Not all significant results are equally convincing, and not all non-significant results are equally weak. Many statisticians use rough labels to describe the strength of evidence. Fisher himself treated p as a smooth measure of evidence and suggested 0.05 only as a convenient guide — the labels below are a common modern convention, not a law.

हर significant नतीजा बराबर भरोसेमंद नहीं, और हर non-significant नतीजा बराबर कमज़ोर नहीं। कई statisticians सबूत की ताक़त बताने के लिए मोटे labels इस्तेमाल करते हैं। Fisher ख़ुद p को सबूत का लगातार माप मानते थे और 0.05 को सिर्फ़ सुविधाजनक मार्गदर्शक बताते थे — नीचे के labels एक आम आधुनिक परंपरा हैं, क़ानून नहीं।

并非所有显著结果都同样有说服力,也并非所有不显著结果都同样无力。许多统计学家用粗略的标签描述证据强度。费希尔本人把 p 视为连续的证据量度,只把 0.05 当作方便的参考 —— 下面的标签是现代常用惯例,而非定律。

📏 THE EVIDENCE SCALE (LOG SCALE)सबूत का पैमाना (LOG SCALE)证据刻度(对数刻度)
Evidence scale very strongबहुत मज़बूत非常强 strongमज़बूत强 moderateमध्यम中等 weakकमज़ोर弱 little / noneबहुत कम / नहीं很少 / 没有 0.0001 0.001 0.01 0.05 0.1 1 α = 0.05 (a convention)α = 0.05 (एक परंपरा)α = 0.05(惯例) ◄ stronger evidence against H₀◄ H₀ के ख़िलाफ़ ज़्यादा मज़बूत सबूत◄ 反驳 H₀ 的证据更强 weaker evidence ►कमज़ोर सबूत ►证据更弱 ► The scale is smooth: 0.049 and 0.051 are almost the same evidence. The labels are only a way to talk about it.पैमाना लगातार है: 0.049 और 0.051 लगभग एक जैसा सबूत हैं। Labels सिर्फ़ बात करने का तरीका हैं।刻度是连续的:0.049 和 0.051 几乎是同样的证据。这些标签只是便于交流。
p-value rangep-value rangep 值范围Strength of evidenceसबूत की ताक़त证据强度Decision at α = 0.05α = 0.05 पर फ़ैसलाα = 0.05 时的决定Exampleउदाहरण例子
p < 0.001Very strong against H₀H₀ के ख़िलाफ़ बहुत मज़बूत强烈反驳 H₀Reject H₀H₀ reject拒绝 H₀Large vaccine trialबड़ा vaccine trial大型疫苗试验
0.001 ≤ p < 0.01Strong against H₀H₀ के ख़िलाफ़ मज़बूत有力反驳 H₀Reject H₀H₀ reject拒绝 H₀Drug lowers cholesterolदवा cholesterol घटाती है药物降低胆固醇
0.01 ≤ p < 0.05Moderate against H₀H₀ के ख़िलाफ़ मध्यम中等程度反驳 H₀Reject H₀H₀ reject拒绝 H₀Coin: 9 heads in 10 (p = 0.021)Coin: 10 में 9 heads (p = 0.021)硬币:10 次中 9 次正面(p = 0.021)
0.05 ≤ p < 0.10Weakकमज़ोर较弱Fail to reject H₀H₀ reject नहीं不拒绝 H₀A hint worth a bigger studyबड़ी study लायक़ संकेत值得更大研究的迹象
p ≥ 0.10Little or noneबहुत कम या नहीं很少或没有Fail to reject H₀H₀ reject नहीं不拒绝 H₀No difference detected (which is not "no difference")कोई अंतर नहीं मिला (जो "कोई अंतर नहीं" के बराबर नहीं)未检测到差异(不等于“没有差异”)

SectionSection第 08 节

Step by Step: Computing a p-value by HandStep by Step: हाथ से p-value निकालना一步一步手算 p 值

A hospital claims its average patient wait is 30 minutes. An auditor thinks it is longer. She samples 40 patients at random and finds x̄ = 34.2 minutes and s = 10.5 minutes. Is that enough evidence against the claim?

एक अस्पताल का दावा है कि मरीज़ों का औसत इंतज़ार 30 मिनट है। एक auditor को लगता है कि यह ज़्यादा है। वह random 40 मरीज़ लेती है और x̄ = 34.2 मिनट, s = 10.5 मिनट पाती है। क्या यह दावे के ख़िलाफ़ काफ़ी सबूत है?

一家医院声称患者平均等待 30 分钟。审计员认为更长。她随机抽取 40 名患者,得到 x̄ = 34.2 分钟、s = 10.5 分钟。这足以反驳医院的说法吗?

🧮 Computing the p-value — One-sample t-test (right-tailed)p-value निकालना — One-sample t-test (right-tailed)计算 p 值 —— 单样本 t 检验(右侧)
Step 1Step 1第 1 步
State the hypotheses.
H₀: μ ≤ 30 minutes | H₁: μ > 30 minutes (right-tailed)
Hypotheses लिखें।
H₀: μ ≤ 30 मिनट | H₁: μ > 30 मिनट (right-tailed)
写出假设。
H₀:μ ≤ 30 分钟 | H₁:μ > 30 分钟(右侧)
Step 2Step 2第 2 步
Set α.
α = 0.05. σ unknown → t-test, df = n − 1 = 39.
α तय करें।
α = 0.05. σ अज्ञात → t-test, df = n − 1 = 39.
设定 α。
α = 0.05。σ 未知 → t 检验,df = n − 1 = 39。
Step 3Step 3第 3 步
Standard error.
SE = s / √n = 10.5 / √40 = 10.5 / 6.325 = 1.660 min
Standard error.
SE = s / √n = 10.5 / √40 = 10.5 / 6.325 = 1.660 min
标准误。
SE = s / √n = 10.5 / √40 = 10.5 / 6.325 = 1.660 分钟
Step 4Step 4第 4 步
t-statistic.
t = (x̄ − μ₀) / SE = (34.2 − 30) / 1.660 = t = 2.530
t-statistic.
t = (x̄ − μ₀) / SE = (34.2 − 30) / 1.660 = t = 2.530
t 统计量。
t = (x̄ − μ₀) / SE = (34.2 − 30) / 1.660 = t = 2.530
Step 5Step 5第 5 步
p-value.
Right-tailed: p = P(T > 2.530 | df = 39) = 0.0078 (stats.t.sf(2.530, 39))
p-value.
Right-tailed: p = P(T > 2.530 | df = 39) = 0.0078 (stats.t.sf(2.530, 39))
p 值。
右侧:p = P(T > 2.530 | df = 39) = 0.0078(stats.t.sf(2.530, 39))
Decisionफ़ैसला决定
p = 0.0078 < α = 0.05 → reject H₀.
There is strong evidence (p = 0.008) that the true mean wait is over 30 minutes. Effect size: about 4.2 minutes longer (d = 0.40, small-to-medium); 95% CI for the mean wait 30.8 to 37.6 minutes.
p = 0.0078 < α = 0.05 → H₀ reject.
मज़बूत सबूत है (p = 0.008) कि असली औसत इंतज़ार 30 मिनट से ज़्यादा है। Effect size: लगभग 4.2 मिनट ज़्यादा (d = 0.40, small-to-medium); औसत इंतज़ार का 95% CI 30.8 से 37.6 मिनट।
p = 0.0078 < α = 0.05 → 拒绝 H₀。
有强证据(p = 0.008)表明真实平均等待超过 30 分钟。效应量:约长 4.2 分钟(d = 0.40,小到中等);平均等待时间的 95% 置信区间为 30.8 到 37.6 分钟。
✅
What Set This p-value?यह p-value किसने तय किया?是什么决定了这个 p 值?

Three things together: the size of the difference (4.2 minutes), the spread of the data (s = 10.5) and the sample size (n = 40). With only 10 patients, SE would be 3.32, t = 1.27 and p ≈ 0.12 — not significant. Same difference, different conclusion, only because of n.

तीन चीज़ें मिलकर: अंतर का आकार (4.2 मिनट), data का फैलाव (s = 10.5) और sample size (n = 40)। सिर्फ़ 10 मरीज़ों पर SE = 3.32, t = 1.27 और p ≈ 0.12 होता — significant नहीं। वही अंतर, अलग निष्कर्ष, सिर्फ़ n की वजह से।

三者共同决定:差异大小(4.2 分钟)、数据的离散程度(s = 10.5)和样本量(n = 40)。如果只有 10 名患者,SE = 3.32,t = 1.27,p ≈ 0.12 —— 不显著。同样的差异,结论不同,只因为 n 不同。


SectionSection第 09 节

Python ImplementationPython ImplementationPython 实现

Exact p-values for the tea and coin examplesचाय और coin उदाहरणों के सटीक p-values品茶与抛硬币的精确 p 值

from math import comb
from scipy import stats

# Lady Tasting Tea: 8 cups, 4 milk-first. She must pick the 4 milk-first cups.
ways = comb(8, 4)                       # 70 ways to choose 4 cups
print(f"Ways to choose 4 cups of 8: {ways}")
print(f"P(all 8 right by guessing) = 1/{ways} = {1/ways:.4f}")

# Coin: 9 heads in 10 flips, H₀: P(heads) = 0.5
res = stats.binomtest(9, n=10, p=0.5, alternative='two-sided')
print(f"Coin, two-tailed p-value  = {res.pvalue:.4f}  (11 + 11 outcomes of 1,024)")
OUTPUT
Ways to choose 4 cups of 8: 70 P(all 8 right by guessing) = 1/70 = 0.0143 Coin, two-tailed p-value = 0.0215 (11 + 11 outcomes of 1,024)

p-value from first principles — hospital wait timesशुरुआत से p-value — अस्पताल का इंतज़ार从原理出发求 p 值 —— 医院等待时间

import numpy as np
from scipy import stats

# Hospital wait time example
# H0: mu <= 30  |  H1: mu > 30  (right-tailed)
np.random.seed(42)
sample = np.random.normal(loc=34.2, scale=10.5, size=40)

mu_0  = 30
x_bar = np.mean(sample)
s     = np.std(sample, ddof=1)
n     = len(sample)
se    = s / np.sqrt(n)
df    = n - 1

# t-statistic
t_stat = (x_bar - mu_0) / se

# p-value: right-tailed = area to the RIGHT of t_stat
p_right = stats.t.sf(t_stat, df=df)          # sf = 1 - cdf

# For two-tailed: double the smaller tail
p_two   = 2 * stats.t.sf(abs(t_stat), df=df)

# Critical t-value at alpha=0.05, right-tailed
t_crit = stats.t.ppf(0.95, df=df)

print(f"Sample mean x̄:       {x_bar:.4f} min")
print(f"Standard Error SE:    {se:.4f} min")
print(f"t-statistic:          {t_stat:.4f}")
print(f"Degrees of freedom:   {df}")
print(f"t-critical (right):   {t_crit:.4f}")
print(f"p-value (right-tail): {p_right:.4f}")
print(f"p-value (two-tail):   {p_two:.4f}")
print()
print(f"Conclusion: {'REJECT H0' if p_right < 0.05 else 'FAIL TO REJECT H0'}")
OUTPUT
Sample mean x̄: 31.9043 min Standard Error SE: 1.5818 min t-statistic: 1.2039 Degrees of freedom: 39 t-critical (right): 1.6849 p-value (right-tail): 0.1180 p-value (two-tail): 0.2359 Conclusion: FAIL TO REJECT H0
💡
A Real Effect, Yet "Fail to Reject"असली Effect, फिर भी "Reject नहीं"效应真实存在,却“不拒绝”

This sample was drawn from a population whose true mean is 34.2 minutes — H₀ is false. Yet this particular sample came out with x̄ = 31.9, and p = 0.118. With d = 0.4 and n = 40, the test has only about 80% power, so about 1 study in 5 misses the real effect. This is a Type II error, seen live. One sample is never the whole story.

यह sample उस population से लिया गया जिसका असली mean सच में 34.2 मिनट है — H₀ ग़लत है। फिर भी इस sample में x̄ = 31.9 आया, और p = 0.118. d = 0.4 और n = 40 पर test की power सिर्फ़ लगभग 80% है, यानी लगभग 5 में से 1 study असली effect चूक जाती है। यह सीधा दिखता Type II error है। एक sample कभी पूरी कहानी नहीं होता।

这个样本来自真实均值确实是 34.2 分钟的总体 —— H₀ 是错的。但这个样本恰好得到 x̄ = 31.9,p = 0.118。d = 0.4、n = 40 时,检验力只有约 80%,大约每 5 项研究就有 1 项错过真实效应。这就是活生生的第二类错误。一个样本永远不是全部真相。

What changes the p-value?p-value को क्या बदलता है?什么会改变 p 值?

import numpy as np
from scipy import stats

# How sample size and effect size each change the p-value
mu_0  = 30      # null hypothesis value
x_bar = 34.2    # sample mean (fixed)
s     = 10.5    # std dev (fixed)

print("Same effect (4.2 min), same s — only n changes:")
for n in [10, 20, 40, 100, 500]:
    se     = s / np.sqrt(n)
    t_stat = (x_bar - mu_0) / se
    p      = stats.t.sf(t_stat, df=n-1)
    sig    = "REJECT H0" if p < 0.05 else "fail to reject"
    print(f"  n={n:4d}  SE={se:.3f}  t={t_stat:6.3f}  p={p:.2g}  {sig}")

print()
print("Same n (40), same s — only the sample mean changes:")
for mean in [30.5, 31.0, 32.0, 34.2, 38.0]:
    se     = s / np.sqrt(40)
    t_stat = (mean - mu_0) / se
    p      = stats.t.sf(t_stat, df=39)
    sig    = "REJECT H0" if p < 0.05 else "fail to reject"
    print(f"  x̄={mean:.1f}  t={t_stat:6.3f}  p={p:.2g}  {sig}")
OUTPUT
Same effect (4.2 min), same s — only n changes: n= 10 SE=3.320 t= 1.265 p=0.12 fail to reject n= 20 SE=2.348 t= 1.789 p=0.045 REJECT H0 n= 40 SE=1.660 t= 2.530 p=0.0078 REJECT H0 n= 100 SE=1.050 t= 4.000 p=6.1e-05 REJECT H0 n= 500 SE=0.470 t= 8.944 p=3.7e-18 REJECT H0 Same n (40), same s — only the sample mean changes: x̄=30.5 t= 0.301 p=0.38 fail to reject x̄=31.0 t= 0.602 p=0.28 fail to reject x̄=32.0 t= 1.205 p=0.12 fail to reject x̄=34.2 t= 2.530 p=0.0078 REJECT H0 x̄=38.0 t= 4.819 p=1.1e-05 REJECT H0

With the same 4.2-minute difference, p falls from 0.12 to 3.7 × 10⁻¹⁸ as n grows from 10 to 500. The effect did not change at all — only the precision did.

उसी 4.2 मिनट के अंतर पर, n के 10 से 500 होने पर p, 0.12 से 3.7 × 10⁻¹⁸ हो जाता है। Effect बिल्कुल नहीं बदला — सिर्फ़ precision बदली।

差异同样是 4.2 分钟,n 从 10 增至 500 时,p 从 0.12 降到 3.7 × 10⁻¹⁸。效应完全没变 —— 变的只是精度。

A complete report: p-value, CI and effect sizeपूरी report: p-value, CI और effect size完整报告:p 值、置信区间与效应量

import numpy as np
from scipy import stats

def full_test_report(sample, mu_0, alpha=0.05, tail="two"):
    """One-sample t-test with p-value, CI and effect size."""
    n      = len(sample)
    x_bar  = np.mean(sample)
    s      = np.std(sample, ddof=1)
    se     = s / np.sqrt(n)
    df     = n - 1
    t_stat = (x_bar - mu_0) / se

    if tail == "two":
        p = 2 * stats.t.sf(abs(t_stat), df=df)
    elif tail == "right":
        p = stats.t.sf(t_stat, df=df)
    else:
        p = stats.t.cdf(t_stat, df=df)

    lo, hi = stats.t.interval(0.95, df=df, loc=x_bar, scale=se)
    d = (x_bar - mu_0) / s                  # Cohen's d (one sample)
    d_label = ("negligible" if abs(d) < 0.2 else "small" if abs(d) < 0.5
               else "medium" if abs(d) < 0.8 else "large")
    evidence = ("very strong" if p < 0.001 else "strong" if p < 0.01
                else "moderate" if p < 0.05 else "weak" if p < 0.10 else "little or none")

    print("=" * 52)
    print(f"  One-sample t-test ({tail}-tailed)   H₀: μ = {mu_0}, α = {alpha}")
    print("=" * 52)
    print(f"  n = {n}   x̄ = {x_bar:.3f}   s = {s:.3f}   SE = {se:.3f}")
    print(f"  t({df}) = {t_stat:.4f}   p = {p:.4f}")
    print(f"  95% CI for μ: ({lo:.2f}, {hi:.2f})")
    print(f"  Cohen's d = {d:.3f} ({d_label})   evidence: {evidence}")
    verdict = "REJECT H₀" if p < alpha else "FAIL TO REJECT H₀"
    print(f"  DECISION: {verdict}")
    print("=" * 52)

np.random.seed(42)
wait_times = np.random.normal(34.2, 10.5, 40)
full_test_report(wait_times, mu_0=30, alpha=0.05, tail="right")
OUTPUT
==================================================== One-sample t-test (right-tailed) H₀: μ = 30, α = 0.05 ==================================================== n = 40 x̄ = 31.904 s = 10.004 SE = 1.582 t(39) = 1.2039 p = 0.1180 95% CI for μ: (28.70, 35.10) Cohen's d = 0.190 (negligible) evidence: little or none DECISION: FAIL TO REJECT H₀ ====================================================

Why one study is never enoughएक study कभी काफ़ी क्यों नहीं为什么一项研究永远不够

import numpy as np
from scipy import stats

# 1,000 studies where H₁ is TRUE: μ_true = 32, μ₀ = 30, σ = 10.5, n = 40
rng = np.random.default_rng(0)
n_studies, n, mu_true, mu_0, sigma = 1000, 40, 32, 30, 10.5

samples  = rng.normal(mu_true, sigma, (n_studies, n))
p_values = stats.ttest_1samp(samples, popmean=mu_0, axis=1).pvalue

print(f"Studies with p < 0.05:  {(p_values < 0.05).mean()*100:.1f}%")
print(f"Studies with p ≥ 0.05:  {(p_values >= 0.05).mean()*100:.1f}%")
print(f"Median p-value:         {np.median(p_values):.3f}")
print(f"Smallest / largest p:   {p_values.min():.5f} / {p_values.max():.3f}")
OUTPUT
Studies with p < 0.05: 22.6% Studies with p ≥ 0.05: 77.4% Median p-value: 0.224 Smallest / largest p: 0.00002 / 0.999

Here H₁ is true (μ = 32, not 30), but the effect is small (d ≈ 0.19). With n = 40 only about 23% of studies reach p < 0.05 — more than three out of four studies miss a real effect. The median p is 0.22. This is the power problem.

यहाँ H₁ सच है (μ = 32, 30 नहीं), पर effect छोटा है (d ≈ 0.19)। n = 40 पर सिर्फ़ लगभग 23% studies में p < 0.05 आता है — चार में से तीन से ज़्यादा studies असली effect चूक जाती हैं। Median p = 0.22. यही power की समस्या है।

这里 H₁ 为真(μ = 32,而不是 30),但效应很小(d ≈ 0.19)。n = 40 时只有约 23% 的研究达到 p < 0.05 —— 四项研究中有三项以上错过了真实效应。p 的中位数是 0.22。这就是检验力问题。

⚠️
p-hacking and the Replication Crisisp-hacking और Replication Crisisp-hacking 与可重复性危机

Run 20 independent tests on pure noise at α = 0.05 and you expect about 1 false positive — and the chance of at least one is 64%. Trying many analyses, subgroups or outcomes and reporting only the "significant" one pushes the real error rate far above 5%. This is p-hacking (or data dredging), and it is a major cause of the replication crisis in psychology, medicine and nutrition science. When you run several tests, correct for it (Bonferroni, Holm, or Benjamini–Hochberg).

शुद्ध शोर पर α = 0.05 से 20 स्वतंत्र tests चलाएँ, तो लगभग 1 false positive की उम्मीद है — और कम से कम एक का chance 64% है। कई analyses, subgroups या outcomes आज़माकर सिर्फ़ "significant" वाला बताना असली error rate को 5% से बहुत ऊपर ले जाता है। यह p-hacking (या data dredging) है, और psychology, medicine और nutrition science में replication crisis की बड़ी वजह है। कई tests चलाएँ तो correction करें (Bonferroni, Holm, या Benjamini–Hochberg)।

在纯噪声上以 α = 0.05 做 20 个独立检验,预计约有 1 个假阳性 —— 至少一个的概率为 64%。尝试多种分析、子组或指标,却只报告“显著”的那个,会让真实错误率远超 5%。这就是 p-hacking(数据挖掘),也是心理学、医学和营养学可重复性危机的主要原因。做多个检验时要进行校正(Bonferroni、Holm 或 Benjamini–Hochberg)。

import numpy as np
from scipy import stats

# 20 tests on pure noise, repeated 10,000 times
rng = np.random.default_rng(3)
k, reps, n, alpha = 20, 10_000, 30, 0.05
a = rng.normal(0, 1, (reps, k, n)); b = rng.normal(0, 1, (reps, k, n))
p = stats.ttest_ind(a, b, axis=2).pvalue           # shape (reps, k)

print(f"Average false positives per 20 tests:      {(p < alpha).sum(axis=1).mean():.2f}")
print(f"P(at least one p < 0.05)  — no correction: {(p < alpha).any(axis=1).mean()*100:.1f}%")
print(f"P(at least one p < 0.05/20) — Bonferroni:  {(p < alpha / k).any(axis=1).mean()*100:.1f}%")
OUTPUT
Average false positives per 20 tests: 1.00 P(at least one p < 0.05) — no correction: 64.4% P(at least one p < 0.05/20) — Bonferroni: 4.3%
LIVELIVE互动Multiple-Testing TrapMultiple-Testing का जाल多重检验陷阱

Every test here is on pure noise — H₀ is true each time. Run k tests and watch red "discoveries" appear by luck. Then switch on Bonferroni.

यहाँ हर test शुद्ध शोर पर है — हर बार H₀ सच है। k tests चलाएँ और देखें कि किस्मत से लाल "खोजें" कैसे आती हैं। फिर Bonferroni चालू करें।

这里每个检验都基于纯噪声 —— 每次 H₀ 都为真。做 k 个检验,看红色“发现”如何凭运气出现。然后打开 Bonferroni 校正。


SectionSection第 10 节

p-value vs Confidence Interval — Two Sides of One Coinp-value vs Confidence Interval — एक सिक्के के दो पहलूp 值 vs 置信区间 — 一枚硬币的两面

For the usual t-test, a p-value and a confidence interval are built from the same numbers, so they always agree. But the interval also shows how big the effect is and how precisely it is known — so it usually tells you more.

आम t-test में p-value और confidence interval एक ही संख्याओं से बनते हैं, इसलिए हमेशा सहमत होते हैं। पर interval यह भी दिखाता है कि effect कितना बड़ा है और कितनी सटीकता से पता है — इसलिए यह आम तौर पर ज़्यादा बताता है।

对常见的 t 检验,p 值和置信区间由同样的数字构造,所以总是一致。但区间还能显示效应有多大、估计有多精确 —— 因此通常信息更多。

🎯 HOSPITAL EXAMPLE: 95% CIs FOR THREE SAMPLE SIZESअस्पताल उदाहरण: तीन SAMPLE SIZES के 95% CIs医院例子:三种样本量下的 95% 置信区间
p-value and confidence interval μ₀ = 30 min (hospital claim)μ₀ = 30 min (अस्पताल का दावा)μ₀ = 30 分钟(医院的说法) 26.741.7 n = 10p = 0.2377 29.339.1 n = 20p = 0.0896 30.837.6 n = 40p = 0.0156 Same x̄ = 34.2 and s = 10.5. Two-tailed: p < 0.05 exactly when the 95% CI leaves out 30.वही x̄ = 34.2 और s = 10.5. Two-tailed: p < 0.05 ठीक तब, जब 95% CI में 30 न हो।同样 x̄ = 34.2、s = 10.5。双侧:恰好当 95% 置信区间不含 30 时,p < 0.05。
Propertyगुण性质p-valueConfidence intervalConfidence interval置信区间
What it givesक्या देता है给出什么One number: how surprising the data are under H₀एक संख्या: H₀ के तहत data कितना चौंकाने वाला है一个数:在 H₀ 下数据有多意外A range of believable values for the parameterParameter के भरोसेमंद values की range参数的可信取值范围
Shows effect size?Effect size दिखाता है?显示效应量?Noनहीं否Yes — by where the interval sitsहाँ — interval कहाँ है, उससे是 —— 由区间的位置体现
Shows precision?Precision दिखाता है?显示精度?Noनहीं否Yes — narrower = more preciseहाँ — पतला = ज़्यादा सटीक是 —— 越窄越精确
Significance linkSignificance संबंध与显著性的关系p < 0.0595% CI does not contain μ₀95% CI में μ₀ नहीं95% 置信区间不含 μ₀
Effect of a bigger nबड़े n का असरn 增大的影响p gets smaller for any real differenceकिसी भी असली अंतर पर p छोटा होता है只要有真实差异,p 就变小The interval gets narrowerInterval पतला होता है区间变窄
Best practiceसबसे अच्छा तरीका最佳实践Report itबताएँ报告它Report it too — always bothइसे भी बताएँ — हमेशा दोनों也要报告 —— 两者都要
📐
The Duality RuleDuality Rule对偶规则

For a two-tailed t-test at α = 0.05 and the matching t-interval:
p < 0.05 exactly when the 95% CI does not contain μ₀.
p ≥ 0.05 exactly when the 95% CI contains μ₀.
(For some other tests, such as proportions, the usual test and interval use slightly different formulas, so they can disagree near the boundary.)

Good practice: always report both. The CI shows how large the effect is and how well you know it; the p-value alone cannot.

α = 0.05 पर two-tailed t-test और उससे मेल खाते t-interval के लिए:
p < 0.05 ठीक तब, जब 95% CI में μ₀ न हो।
p ≥ 0.05 ठीक तब, जब 95% CI में μ₀ हो।
(कुछ दूसरे tests, जैसे proportions, में आम test और interval थोड़े अलग formulas लेते हैं, इसलिए सीमा के पास असहमत हो सकते हैं।)

अच्छा तरीका: हमेशा दोनों बताएँ। CI दिखाता है कि effect कितना बड़ा है और आप उसे कितना अच्छी तरह जानते हैं; अकेला p-value यह नहीं कर सकता।

对 α = 0.05 的双侧 t 检验及对应的 t 区间:
恰好当 95% 置信区间不含 μ₀ 时,p < 0.05。
恰好当 95% 置信区间包含 μ₀ 时,p ≥ 0.05。
(对另一些检验,如比例检验,常用的检验和区间公式略有不同,在边界附近可能不一致。)

好的做法:始终两者都报告。置信区间显示效应多大、估计多精确;仅凭 p 值做不到。


SectionSection第 11 节

Golden RulesGolden Rules黄金法则

🎯 p-value — Key Rulesp-value — मुख्य नियमp 值 — 关键规则
1
p-value = P(data this extreme or more | H₀ true). Nothing else. It is not the probability that H₀ is true, not "the probability the result is due to chance", and not the chance of replicating the finding.
p-value = P(इतना या ज़्यादा extreme data | H₀ सच)। और कुछ नहीं। यह H₀ के सच होने की संभावना नहीं, "नतीजा संयोग से होने की संभावना" नहीं, और खोज दोहराने का chance भी नहीं।
p 值 = P(数据至少这么极端 | H₀ 为真)。仅此而已。它不是 H₀ 为真的概率,不是“结果由偶然造成的概率”,也不是重复出该发现的概率。
2
Fix α, the hypotheses and the test before seeing the data. Choosing α = 0.05 because p came out at 0.04 is p-hacking. Clinical trials write their analysis plan down before the first patient is enrolled.
Data देखने से पहले α, hypotheses और test तय करें। p = 0.04 आने के बाद α = 0.05 चुनना p-hacking है। Clinical trials पहले मरीज़ के जुड़ने से पहले ही अपनी analysis योजना लिख लेते हैं।
看数据之前就确定 α、假设和检验。因为 p 出来是 0.04 才选 α = 0.05,就是 p-hacking。临床试验在第一位患者入组前就写好分析计划。
3
Statistical significance ≠ practical importance. Always report an effect size. With n = 500 per study, a 4.2-minute wait difference gave p ≈ 10⁻¹⁸ — the tiny p says nothing about whether 4.2 minutes matters. Report Cohen's d, a difference in means, an odds ratio or a relative risk.
Statistical significance ≠ व्यावहारिक महत्व। हमेशा effect size बताएँ। n = 500 पर 4.2 मिनट के अंतर ने p ≈ 10⁻¹⁸ दिया — छोटा p यह नहीं बताता कि 4.2 मिनट मायने रखते हैं या नहीं। Cohen's d, means का अंतर, odds ratio या relative risk बताएँ।
统计显著 ≠ 实际重要。一定要报告效应量。n = 500 时,4.2 分钟的等待差异得到 p ≈ 10⁻¹⁸ —— 极小的 p 并不说明 4.2 分钟是否重要。报告 Cohen 的 d、均值差、优势比或相对风险。
4
p ≥ 0.05 is not evidence of no effect — only a lack of strong evidence. Our own simulated hospital sample missed a real 4.2-minute effect. Plan power before the study; if power is low, a non-significant result tells you very little.
p ≥ 0.05 कोई effect न होने का सबूत नहीं — सिर्फ़ मज़बूत सबूत की कमी। हमारे अपने simulated अस्पताल sample ने असली 4.2 मिनट का effect चूक दिया। Study से पहले power की योजना बनाएँ; power कम हो तो non-significant नतीजा बहुत कम बताता है।
p ≥ 0.05 不是“没有效应”的证据 —— 只是缺乏有力证据。我们自己模拟的医院样本就错过了真实的 4.2 分钟效应。研究前规划检验力;检验力低时,不显著的结果几乎说明不了什么。
5
Correct for multiple comparisons. 20 tests on pure noise give at least one false positive 64% of the time. Use Bonferroni (α/k), Holm, or Benjamini–Hochberg (FDR) whenever you test many hypotheses.
Multiple comparisons के लिए correction करें। शुद्ध शोर पर 20 tests, 64% बार कम से कम एक false positive देते हैं। जब भी कई hypotheses जाँचें, Bonferroni (α/k), Holm, या Benjamini–Hochberg (FDR) इस्तेमाल करें।
对多重比较进行校正。在纯噪声上做 20 个检验,64% 的情况下至少出现一个假阳性。检验多个假设时,使用 Bonferroni(α/k)、Holm 或 Benjamini–Hochberg(FDR)。
6
Report the 95% CI with every p-value. The interval gives the size, direction and precision of the effect; the p-value gives the strength of evidence against H₀. Together they make a complete report.
हर p-value के साथ 95% CI बताएँ। Interval, effect का आकार, दिशा और precision देता है; p-value, H₀ के ख़िलाफ़ सबूत की ताक़त देता है। दोनों मिलकर पूरी report बनाते हैं।
每个 p 值都附上 95% 置信区间。区间给出效应的大小、方向和精度;p 值给出反驳 H₀ 的证据强度。两者合起来才是完整的报告。