Foundations of Data Science 📂 Probability · 1 of 5 201 min read

Basic Probability Foundations

A comprehensive, story-driven tutorial covering the complete foundations of probability — from sample spaces and event types to all three probability interpretations (Classical, Frequentist, Bayesian), the Addition Rule (with Venn diagrams), the Multiplication Rule (with tree diagrams), conditional probability, Kolmogorov's axioms, a Bayesian medical diagnosis worked example, the Law of Large Numbers diagram, independence testing, and 10 golden rules every data scientist must master.

🌐
SectionSection第 01 节

The Language of Uncertainty 🎲अनिश्चितता की भाषा 🎲不确定性的语言 🎲

Every day you decide under uncertainty. Will it rain? Will the bus be on time? Is this email a scam? Your brain guesses the chances — but its guesses are shaped by mood, memory and bias.

हर दिन आप अनिश्चितता में फ़ैसले लेते हैं। बारिश होगी? बस समय पर आएगी? यह email धोखा है? आपका दिमाग़ chances का अंदाज़ा लगाता है — पर ये अंदाज़े मूड, याददाश्त और पूर्वाग्रह से बनते हैं।

每天你都在不确定中做决定。会下雨吗?公交车会准时吗?这封邮件是诈骗吗?大脑会估计可能性 —— 但这些估计受情绪、记忆和偏见影响。

Probability makes this exact. It gives every outcome a number between 0 and 1. A probability of 0 means "impossible". A probability of 1 means "certain". Everything interesting lives in between.

Probability इसे सटीक बनाती है। यह हर नतीजे को 0 और 1 के बीच एक संख्या देती है। Probability 0 का मतलब "असंभव"। Probability 1 का मतलब "निश्चित"। सारी दिलचस्प चीज़ें इनके बीच हैं।

概率让这件事变得精确。它给每个结果一个 0 到 1 之间的数。概率 0 表示“不可能”,概率 1 表示“必然”。所有有趣的事情都在两者之间。

📏 PICTURE 1 — THE PROBABILITY SCALEतस्वीर 1 — PROBABILITY का पैमाना图 1 — 概率刻度
The probability scale from 0 to 1 0 0.25 0.5 0.75 1 A 7 on one dieएक die पर 7一颗骰子掷出 7 0 Two dice sum to 12दो dice का योग 12两颗骰子和为 12 1/36 ≈ 0.03 Roll a 6छक्का आना掷出 6 1/6 ≈ 0.17 Coin lands headsसिक्के पर heads硬币正面朝上 0.5 At least one head in 2 flips2 उछाल में कम से कम एक head抛 2 次至少一次正面 0.75 Not rolling a 6छक्का न आना没掷出 6 5/6 ≈ 0.83 Roll 1–6 with one dieएक die पर 1–6 में कुछ一颗骰子掷出 1–6 1 ← impossible← असंभव← 不可能 certain →निश्चित →必然 →

Every value here is exact, worked out by counting equally likely outcomes.

यहाँ हर मान सटीक है, बराबर संभावना वाले नतीजों को गिनकर निकाला गया।

这里每个值都是精确的,通过数等可能结果得出。

💡
Why These Foundations Matterये बुनियादें क्यों ज़रूरी हैं为什么这些基础很重要

Conditional probability is the core of Naive Bayes classifiers. The multiplication rule powers Bayesian networks. The addition and multiplication rules together give the law of total probability. Sample spaces are the starting point of every Monte Carlo simulation. None of these make sense without the basics below.

Conditional probability, Naive Bayes classifiers का मूल है। Multiplication rule, Bayesian networks चलाता है। Addition और multiplication rules मिलकर law of total probability देते हैं। हर Monte Carlo simulation sample space से शुरू होता है। नीचे की बुनियादी बातों के बिना इनमें से कुछ समझ नहीं आता।

条件概率是朴素贝叶斯分类器的核心。乘法法则驱动贝叶斯网络。加法和乘法法则合起来得到全概率公式。每个蒙特卡洛模拟都从样本空间出发。没有下面这些基础,这些都无从理解。


SectionSection第 02 节

Sample Space & Events 🎯Sample Space और Events 🎯样本空间与事件 🎯

The Story: Rolling a Die at Game Nightकहानी: Game Night पर Die फेंकना故事:游戏之夜掷骰子

It is game night. You roll a normal six-sided die. Before it lands, you can list every possible result: 1, 2, 3, 4, 5 or 6. It cannot land on 7. This full list of outcomes is the sample space.

Game night है। आप एक सामान्य छह-मुखी die फेंकते हैं। गिरने से पहले ही आप हर संभव नतीजा लिख सकते हैं: 1, 2, 3, 4, 5 या 6। यह 7 पर नहीं गिर सकता। नतीजों की यह पूरी सूची sample space है।

游戏之夜,你掷一颗普通的六面骰子。落地前,你就能列出所有可能结果:1、2、3、4、5、6。它不可能出现 7。这份完整的结果清单就是样本空间。

Your friend says: "I win if I roll an even number." The outcomes {2, 4, 6} form an event. An event is any group of outcomes you care about — one outcome ("a 6") or many ("a prime number above 3", which is just {5}).

आपका दोस्त कहता है: "सम संख्या आई तो मैं जीता।" नतीजे {2, 4, 6} एक event बनाते हैं। Event नतीजों का कोई भी समूह है जिसकी आपको परवाह है — एक नतीजा ("छक्का") या कई ("3 से बड़ी prime संख्या", जो सिर्फ़ {5} है)।

朋友说:“掷出偶数我就赢。”结果 {2, 4, 6} 构成一个事件。事件就是你关心的任意一组结果 —— 可以是一个结果(“掷出 6”),也可以是多个(“大于 3 的质数”,其实只有 {5})。

Sample space (Ω or S)Sample space (Ω या S)样本空间(Ω 或 S)
Ω = {all possible outcomes}
Every outcome that could happen in one trial. Nothing outside Ω can happen.
एक trial में हो सकने वाला हर नतीजा। Ω के बाहर कुछ नहीं हो सकता।
一次试验中所有可能出现的结果。Ω 之外的事不会发生。
Event (E)Event (E)事件(E)
E ⊆ Ω
Any subset of the sample space. E "happens" if the actual outcome is inside E.
Sample space का कोई भी हिस्सा। असली नतीजा E में हो तो E "हुआ"।
样本空间的任意子集。实际结果落在 E 中,就说 E “发生”了。
Range of a probabilityProbability की सीमा概率的范围
0 ≤ P(E) ≤ 1
P(Ω) = 1 (something must happen). P(∅) = 0 (the empty event never happens).
P(Ω) = 1 (कुछ तो होगा)। P(∅) = 0 (खाली event कभी नहीं होता)।
P(Ω) = 1(总会有结果)。P(∅) = 0(空事件永不发生)。
Complement (Eᶜ)Complement (Eᶜ)对立事件(Eᶜ)
P(Eᶜ) = 1 − P(E)
Eᶜ is everything in Ω that is NOT in E. E and Eᶜ together cover all of Ω.
Eᶜ, Ω का वह सब है जो E में नहीं। E और Eᶜ मिलकर पूरा Ω ढकते हैं।
Eᶜ 是 Ω 中不属于 E 的全部结果。E 与 Eᶜ 合起来覆盖整个 Ω。

Common Sample Spacesआम Sample Spaces常见样本空间

Experimentप्रयोग试验Sample space (Ω)Sample space (Ω)样本空间(Ω)Example eventउदाहरण event示例事件P(event)P(event)P(事件)
Flip one coinएक सिक्का उछालें抛一枚硬币{H, T}Heads: {H}Heads: {H}正面:{H}1/2 = 0.50
Roll one dieएक die फेंकें掷一颗骰子{1, 2, 3, 4, 5, 6}Even: {2, 4, 6}सम: {2, 4, 6}偶数:{2, 4, 6}3/6 = 0.50
Flip two coinsदो सिक्के उछालें抛两枚硬币{HH, HT, TH, TT}At least one head: {HH, HT, TH}कम से कम एक head: {HH, HT, TH}至少一次正面:{HH, HT, TH}3/4 = 0.75
Roll two diceदो dice फेंकें掷两颗骰子36 ordered pairs (1,1) … (6,6)36 क्रमबद्ध जोड़े (1,1) … (6,6)36 个有序对 (1,1) … (6,6)Sum is 7: 6 pairsयोग 7: 6 जोड़े和为 7:6 对6/36 = 1/6
Draw 1 card (52-card deck)1 पत्ता खींचें (52 पत्ते)抽 1 张牌(52 张){A♠, 2♠, …, K♣}A King: {K♠, K♥, K♦, K♣}बादशाह: {K♠, K♥, K♦, K♣}抽到 K:{K♠, K♥, K♦, K♣}4/52 = 1/13
Baby's sex (simplified)बच्चे का लिंग (सरल)新生儿性别(简化){Boy, Girl}A girl: {Girl}लड़की: {Girl}女孩:{Girl}≈ 0.49 (from birth records, not 0.5)≈ 0.49 (जन्म रिकॉर्ड से, 0.5 नहीं)≈ 0.49(来自出生记录,不是 0.5)
Daily stock moveशेयर की रोज़ की चाल股票每日涨跌{Up, Down, Unchanged}Stock rises: {Up}शेयर बढ़ा: {Up}上涨:{Up}Estimated from historyइतिहास से अनुमान由历史数据估计
⚠️
Two Dice Have 36 Outcomes, Not 11दो Dice के 36 नतीजे हैं, 11 नहीं两颗骰子有 36 种结果,不是 11 种

The sums 2 to 12 are 11 values, but they are not equally likely. A sum of 7 can happen 6 ways; a sum of 2 only 1 way. To use counting, list the 36 equally likely ordered pairs. A wrong sample space gives wrong answers every time.

योग 2 से 12 कुल 11 मान हैं, पर ये बराबर संभावना वाले नहीं हैं। योग 7 छह तरीकों से आ सकता है; योग 2 सिर्फ़ एक तरीके से। गिनती से हल करने के लिए 36 बराबर संभावना वाले क्रमबद्ध जोड़े लिखें। ग़लत sample space हमेशा ग़लत जवाब देता है।

点数和 2 到 12 共 11 个值,但它们并不等可能。和为 7 有 6 种方式,和为 2 只有 1 种。要用计数法,必须列出 36 个等可能的有序对。样本空间错了,答案就一定错。

Special Types of EventsEvents के ख़ास प्रकार特殊类型的事件

Event typeEvent का प्रकार事件类型Meaningमतलब含义Example (one die)उदाहरण (एक die)示例(一颗骰子)
Simple eventSimple event基本事件Exactly one outcomeठीक एक नतीजा恰好一个结果{3} — rolling a 3{3} — 3 आना{3} — 掷出 3
Compound eventCompound event复合事件Two or more outcomesदो या ज़्यादा नतीजे两个或更多结果{2, 4, 6} — rolling even{2, 4, 6} — सम आना{2, 4, 6} — 掷出偶数
Impossible event (∅)असंभव event (∅)不可能事件(∅)No outcomes; P = 0कोई नतीजा नहीं; P = 0不含结果;P = 0Rolling a 77 आना掷出 7
Certain event (Ω)निश्चित event (Ω)必然事件(Ω)All outcomes; P = 1सारे नतीजे; P = 1包含全部结果;P = 1{1, …, 6} — rolling anything{1, …, 6} — कुछ भी आना{1, …, 6} — 掷出任意点
Mutually exclusiveMutually exclusive互斥Cannot happen together (no shared outcome)साथ नहीं हो सकते (कोई साझा नतीजा नहीं)不能同时发生(没有共同结果){1, 3, 5} and {2, 4, 6}{1, 3, 5} और {2, 4, 6}{1, 3, 5} 与 {2, 4, 6}
ExhaustiveExhaustive完备Together they cover all of Ωमिलकर पूरा Ω ढकते हैं合起来覆盖整个 Ω{1, 2, 3} and {4, 5, 6}{1, 2, 3} और {4, 5, 6}{1, 2, 3} 与 {4, 5, 6}
IndependentIndependent独立Knowing one does not change the chance of the otherएक का पता होने से दूसरे का chance नहीं बदलता知道一个不会改变另一个的概率Two separate rolls: 1st roll is 6, 2nd roll is 6दो अलग फेंक: पहली में 6, दूसरी में 6两次独立投掷:第一次 6,第二次 6
📐
Set Notation Cheat SheetSet Notation की झटपट सूची集合符号速查

A ∪ B — union: A OR B (or both) happens. A ∩ B — intersection: A AND B both happen. Aᶜ — complement: A does NOT happen. A ⊆ B — subset: every outcome in A is also in B. B | A — "B given A": the chance of B once we know A happened.

A ∪ B — union: A या B (या दोनों) होता है। A ∩ B — intersection: A और B दोनों होते हैं। Aᶜ — complement: A नहीं होता। A ⊆ B — subset: A का हर नतीजा B में भी है। B | A — "A दिया हो तो B": A हो चुका है यह पता हो तब B का chance।

A ∪ B — 并集:A 或 B(或两者)发生。A ∩ B — 交集:A 与 B 同时发生。Aᶜ — 对立事件:A 不发生。A ⊆ B — 子集:A 中每个结果也在 B 中。B | A —“已知 A 时的 B”:在知道 A 已发生后 B 的概率。


SectionSection第 03 节

Events in Pictures — Understand Before the Maths 📊तस्वीरों में Events — गणित से पहले समझें 📊图解事件 — 先理解,再算数 📊

Take one die. Let A = "even" = {2, 4, 6} and B = "greater than 3" = {4, 5, 6}. Each number below sits in its real region. The rectangle is the whole sample space Ω. Shading shows which outcomes count.

एक die लें। मान लें A = "सम" = {2, 4, 6} और B = "3 से बड़ा" = {4, 5, 6}। नीचे हर संख्या अपने असली हिस्से में है। आयत पूरा sample space Ω है। रंग दिखाता है कौन-से नतीजे गिने जाते हैं।

取一颗骰子。设 A =“偶数”= {2, 4, 6},B =“大于 3”= {4, 5, 6}。下图每个数字都放在它真实所属的区域。矩形是整个样本空间 Ω,阴影表示哪些结果被计入。

📊 PICTURE 2 — UNION, INTERSECTION, COMPLEMENT, CONDITIONALतस्वीर 2 — UNION, INTERSECTION, COMPLEMENT, CONDITIONAL图 2 — 并集、交集、对立、条件
Union, intersection, complement and conditional on one die AB 2 4 6 5 1 3 A ∪ B = {2, 4, 5, 6} P = 4/6 A OR BA या BA 或 B AB 2 4 6 5 1 3 A ∩ B = {4, 6} P = 2/6 A AND BA और BA 且 B AB 2 4 6 5 1 3 Aᶜ = {1, 3, 5} P = 1 − 3/6 = 3/6 NOT AA नहीं非 A AB 2 4 6 5 1 3 B | A P = 2/3 B GIVEN A: A is the new worldA दिया हो तो B: A ही नई दुनिया已知 A 时的 B:A 成了新世界

Count the shaded numbers and divide by the numbers in your "world" (6, or 3 once A is known).

रंगीन संख्याएँ गिनें और अपनी "दुनिया" की संख्याओं से भाग दें (6, या A पता होने पर 3)।

数阴影中的数字,再除以“世界”中的数字个数(6 个;已知 A 时为 3 个)。

LIVELIVE互动Colour Events on Two Diceदो Dice पर Events रंगें在两颗骰子上给事件上色

Each cell is one of the 36 equally likely outcomes (first die, second die). Pick events A and B, then switch between OR, AND and "B given A". The panel checks the addition rule and independence by counting cells.

हर खाना 36 बराबर संभावना वाले नतीजों में से एक है (पहला die, दूसरा die)। Events A और B चुनें, फिर OR, AND और "A दिया हो तो B" के बीच बदलें। Panel खाने गिनकर addition rule और independence जाँचता है।

每个格子是 36 个等可能结果之一(第一颗,第二颗)。选择事件 A 和 B,再在“或”“且”“已知 A 时的 B”之间切换。右侧面板通过数格子验证加法法则和独立性。

A
B

🔎
Try These Pairsये जोड़े आज़माएँ试试这些组合

sum = 7 with first die = 1: independent — a surprise for most people. sum = 7 with sum even: mutually exclusive. first die even with second die ≤ 2: independent, because the two dice do not affect each other. sum ≥ 9 with at least one 6: strongly dependent.

योग = 7 के साथ पहला die = 1: independent — ज़्यादातर लोगों के लिए हैरानी की बात। योग = 7 के साथ योग सम: mutually exclusive। पहला die सम के साथ दूसरा die ≤ 2: independent, क्योंकि दोनों dice एक-दूसरे पर असर नहीं डालते। योग ≥ 9 के साथ कम से कम एक 6: बहुत dependent।

和 = 7 配 第一颗 = 1:独立 —— 多数人会感到意外。和 = 7 配 和为偶数:互斥。第一颗为偶数 配 第二颗 ≤ 2:独立,因为两颗骰子互不影响。和 ≥ 9 配 至少一个 6:强烈相关。


SectionSection第 04 节

Three Meanings of Probability 🔭Probability के तीन अर्थ 🔭概率的三种含义 🔭

Over three centuries, people developed three ways to say what a probability is. Each fits different problems, and a data scientist uses all three.

तीन सदियों में लोगों ने यह बताने के तीन तरीके बनाए कि probability क्या है। हर तरीका अलग समस्याओं में काम आता है, और data scientist तीनों का इस्तेमाल करता है।

三个世纪以来,人们发展出三种方式来解释概率是什么。每种适合不同的问题,数据科学家三种都会用。

ClassicalClassical古典
P = |E| / |Ω|
  • Also: a priori / theoreticalदूसरा नाम: a priori / सैद्धांतिक又称:先验 / 理论概率
  • Needs equally likely outcomesबराबर संभावना वाले नतीजे चाहिए要求结果等可能
  • Worked out before any experimentकिसी प्रयोग से पहले निकाली जाती है实验之前就能算出
  • Works for: dice, cards, coinsकाम आती है: dice, पत्ते, सिक्के适用:骰子、扑克、硬币
  • Fails when outcomes are not equalनतीजे बराबर न हों तो विफल结果不等可能时失效
FrequentistFrequentist频率
P ≈ f / n
  • Also: empirical / long-run frequencyदूसरा नाम: empirical / लंबी अवधि की आवृत्ति又称:经验 / 长期频率
  • Based on repeated trialsदोहराए गए trials पर आधारित基于重复试验
  • Estimated from real dataअसली data से अनुमान由真实数据估计
  • Works for: insurance, medicine, QCकाम आती है: बीमा, चिकित्सा, QC适用:保险、医学、质检
  • Struggles with one-time eventsएक बार की घटनाओं में मुश्किल难以处理一次性事件
BayesianBayesian贝叶斯
P(H | E)
  • Also: subjective / degree of beliefदूसरा नाम: subjective / विश्वास की मात्रा又称:主观 / 信念程度
  • Updated when evidence arrivesसबूत आने पर update有新证据就更新
  • Prior × likelihood → posteriorPrior × likelihood → posterior先验 × 似然 → 后验
  • Works for: one-time events, ML, AIकाम आती है: एक बार की घटनाएँ, ML, AI适用:一次性事件、ML、AI
  • Needs a prior (can be debated)Prior चाहिए (जिस पर बहस हो सकती है)需要先验(可能有争议)

SectionSection第 05 节

Type 1 — Classical Probability 🎴प्रकार 1 — Classical Probability 🎴类型 1 — 古典概率 🎴

The Story: Laplace and the Equally Likely Worldकहानी: Laplace और बराबर संभावना की दुनिया故事:拉普拉斯与等可能的世界

In 1814 the French mathematician Pierre-Simon Laplace published his Philosophical Essay on Probabilities. He wrote down the classical rule clearly: when all outcomes are equally likely — a fair coin, a fair die, a well-shuffled deck — you can find a probability just by counting, before any data is collected. (Cardano, Pascal and Fermat had used the idea earlier.)

1814 में फ़्रांसीसी गणितज्ञ Pierre-Simon Laplace ने Philosophical Essay on Probabilities प्रकाशित किया। उन्होंने classical नियम साफ़ लिखा: जब सारे नतीजे बराबर संभावना वाले हों — सही सिक्का, सही die, अच्छी तरह फेंटी गई गड्डी — तो probability सिर्फ़ गिनकर निकाली जा सकती है, कोई data जुटाने से पहले। (Cardano, Pascal और Fermat यह विचार पहले इस्तेमाल कर चुके थे।)

1814 年,法国数学家拉普拉斯出版了《概率的哲学随笔》。他清楚地写出古典法则:当所有结果等可能时 —— 均匀的硬币、均匀的骰子、洗好的牌 —— 不用收集数据,只靠计数就能算出概率。(卡尔达诺、帕斯卡和费马更早就用过这个想法。)

Classical formulaClassical formula古典公式
P(E) = |E| / |Ω|
|E| = number of outcomes in E. |Ω| = total number of equally likely outcomes.
|E| = E में नतीजों की संख्या। |Ω| = बराबर संभावना वाले कुल नतीजे।
|E| = E 中的结果数。|Ω| = 等可能结果的总数。
Key assumptionमुख्य मान्यता关键假设
All outcomes equally likelyसारे नतीजे बराबर संभावना वाले所有结果等可能
A loaded die or a bent coin breaks this, and the counting answer becomes wrong.
Loaded die या मुड़ा सिक्का इसे तोड़ देता है, और गिनती वाला जवाब ग़लत हो जाता है।
灌铅骰子或弯曲硬币会破坏这一点,计数得出的答案就错了。
🧮 Classical Probability — Five Worked ExamplesClassical Probability — पाँच हल किए उदाहरण古典概率 — 五个例题
Ex 1उदा. 1例 1
Odd number on a fair die. Ω = {1,…,6}, |Ω| = 6. E = {1, 3, 5}, |E| = 3. P(odd) = 3/6 = 0.50
सही die पर विषम संख्या। Ω = {1,…,6}, |Ω| = 6. E = {1, 3, 5}, |E| = 3. P(विषम) = 3/6 = 0.50
均匀骰子掷出奇数。Ω = {1,…,6},|Ω| = 6。E = {1, 3, 5},|E| = 3。P(奇数) = 3/6 = 0.50
Ex 2उदा. 2例 2
A red card from a deck. 26 red cards (13♥ + 13♦) out of 52. P(red) = 26/52 = 0.50
गड्डी से लाल पत्ता। 52 में 26 लाल (13♥ + 13♦)। P(लाल) = 26/52 = 0.50
从一副牌抽到红牌。52 张中有 26 张红牌(13♥ + 13♦)。P(红) = 26/52 = 0.50
Ex 3उदा. 3例 3
A face card (J, Q, K). 4 suits × 3 = 12 face cards. P(face) = 12/52 = 3/13 ≈ 0.231
Face card (J, Q, K)। 4 suits × 3 = 12. P(face) = 12/52 = 3/13 ≈ 0.231
人头牌(J、Q、K)。4 种花色 × 3 = 12 张。P(人头牌) = 12/52 = 3/13 ≈ 0.231
Ex 4उदा. 4例 4
At least one head in two flips. Ω = {HH, HT, TH, TT}. E = {HH, HT, TH}. P = 3/4 = 0.75
दो उछाल में कम से कम एक head। Ω = {HH, HT, TH, TT}. E = {HH, HT, TH}. P = 3/4 = 0.75
抛两次至少一次正面。Ω = {HH, HT, TH, TT}。E = {HH, HT, TH}。P = 3/4 = 0.75
Ex 5उदा. 5例 5
Sum of 7 with two dice. 6 pairs: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) out of 36. P = 6/36 = 1/6 ≈ 0.167 — the most likely sum.
दो dice का योग 7। 36 में 6 जोड़े: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1)। P = 6/36 = 1/6 ≈ 0.167 — सबसे संभावित योग।
两颗骰子和为 7。36 种中有 6 对:(1,6)、(2,5)、(3,4)、(4,3)、(5,2)、(6,1)。P = 6/36 = 1/6 ≈ 0.167 —— 最可能的点数和。
⚠️
When Classical Probability FailsClassical Probability कब विफल होती है古典概率何时失效

It fails when outcomes are NOT equally likely. A thumbtack can land point-up or point-down, but these are not 50/50. A loaded die, a real stock market, a football match — none fit Laplace's assumption. For these you need frequentist or Bayesian probability.

यह तब विफल होती है जब नतीजे बराबर संभावना वाले नहीं होते। Thumbtack नोक ऊपर या नीचे गिर सकती है, पर यह 50/50 नहीं। Loaded die, असली शेयर बाज़ार, फ़ुटबॉल मैच — कोई Laplace की मान्यता पर खरा नहीं उतरता। इनके लिए frequentist या Bayesian probability चाहिए।

当结果不等可能时它就失效。图钉可以针尖朝上或朝下落地,但并非 50/50。灌铅骰子、真实股市、足球比赛 —— 都不符合拉普拉斯的假设。这时需要频率或贝叶斯概率。


SectionSection第 06 节

Type 2 — Frequentist Probability 📊प्रकार 2 — Frequentist Probability 📊类型 2 — 频率概率 📊

The Story: Halley and the First Life Insurance Mathsकहानी: Halley और जीवन बीमा का पहला गणित故事:哈雷与最早的寿险数学

In 1693 Edmond Halley (of Halley's Comet) published one of the first reliable life tables. It used birth and death records from the city of Breslau (today Wrocław, Poland). Halley could not say when any one person would die. But his table showed that of 445 people alive at age 40, about 436 were still alive at 41. So roughly 9 in 445 — about 2 in 100 — died in that year. Fair prices for life insurance could now be calculated.

1693 में Edmond Halley (Halley's Comet वाले) ने पहली भरोसेमंद life tables में से एक प्रकाशित की। इसमें Breslau शहर (आज Wrocław, Poland) के जन्म और मृत्यु रिकॉर्ड इस्तेमाल हुए। Halley यह नहीं बता सकते थे कि कोई एक व्यक्ति कब मरेगा। पर उनकी table ने दिखाया कि 40 की उम्र में जीवित 445 लोगों में से लगभग 436, 41 पर भी जीवित थे। यानी लगभग 445 में 9 — लगभग 100 में 2 — उस साल मरे। अब जीवन बीमा की सही कीमत निकाली जा सकती थी।

1693 年,埃德蒙·哈雷(哈雷彗星的发现者)发表了最早的可靠生命表之一。它使用了布雷斯劳(今波兰弗罗茨瓦夫)的出生与死亡记录。哈雷无法预测某个人何时去世,但他的表显示:40 岁时在世的 445 人中,约 436 人活到 41 岁。也就是 445 人中约 9 人 —— 约每 100 人中 2 人 —— 在那一年去世。从此可以计算出合理的寿险价格。

This is frequentist probability: the long-run share of times an event happens over many repeated trials. It needs no "equally likely" assumption — only plenty of data.

यही frequentist probability है: बहुत सारे दोहराए trials में किसी event के होने का लंबी अवधि का हिस्सा। इसे "बराबर संभावना" की मान्यता नहीं चाहिए — बस काफ़ी data।

这就是频率概率:在大量重复试验中事件发生的长期比例。它不需要“等可能”假设 —— 只需要足够多的数据。

Frequentist ideaFrequentist विचार频率思想
P(E) = lim (n→∞) f / n
f = times E happened, n = trials. As n grows, f/n settles near P(E) with very high probability (the Law of Large Numbers).
f = E कितनी बार हुआ, n = trials. n बढ़ने पर f/n बहुत ऊँची probability से P(E) के पास टिकता है (Law of Large Numbers)।
f = E 发生的次数,n = 试验次数。随着 n 增大,f/n 以极高的概率稳定在 P(E) 附近(大数定律)。
Relative frequency (an estimate)Relative frequency (एक अनुमान)相对频率(估计值)
P̂(E) = f / n
With finite n, f/n is only an estimate. Its typical error shrinks like 1/√n: 100 times more data gives about 10 times less error.
सीमित n पर f/n सिर्फ़ अनुमान है। इसकी आम error 1/√n की तरह घटती है: 100 गुना data से error लगभग 10 गुना कम।
n 有限时 f/n 只是估计。它的典型误差按 1/√n 缩小:数据多 100 倍,误差约小 10 倍。
🧮 Frequentist Probability — Worked ExamplesFrequentist Probability — हल किए उदाहरण频率概率 — 例题
Ex 1उदा. 1例 1
Thumbtack. Dropped 1,000 times, it lands point-up 382 times. P̂ = 382/1000 = 0.382. No counting formula could give this — only trials reveal it.
Thumbtack। 1,000 बार गिराने पर 382 बार नोक ऊपर। P̂ = 382/1000 = 0.382। कोई गिनती formula यह नहीं दे सकता — सिर्फ़ trials बताते हैं।
图钉。扔 1,000 次,针尖朝上 382 次。P̂ = 382/1000 = 0.382。任何计数公式都给不出这个值 —— 只有试验能揭示。
Ex 2उदा. 2例 2
Ad click-through rate. 50,000 users saw an ad; 1,750 clicked. P̂(click) = 0.035 (3.5%)
Ad click-through rate। 50,000 users ने ad देखा; 1,750 ने click किया। P̂(click) = 0.035 (3.5%)
广告点击率。50,000 名用户看到广告,1,750 人点击。P̂(点击) = 0.035(3.5%)
Ex 3उदा. 3例 3
Chip defect rate. 47 defects in 10,000 chips. P̂(defect) = 0.0047 (0.47%)
Chip defect दर। 10,000 chips में 47 ख़राब। P̂(defect) = 0.0047 (0.47%)
芯片次品率。10,000 片中有 47 片次品。P̂(次品) = 0.0047(0.47%)
Ex 4उदा. 4例 4
Hospital readmission. 112 of 800 patients came back within 30 days. P̂ = 0.14 (14%)
अस्पताल में दोबारा भर्ती। 800 में से 112 मरीज़ 30 दिन में लौटे। P̂ = 0.14 (14%)
再入院率。800 名患者中 112 人在 30 天内再次入院。P̂ = 0.14(14%)

The Law of Large Numbers — Real RunsLaw of Large Numbers — असली Runs大数定律 — 真实模拟

Below are three real computer runs of 10,000 fair coin flips (not a hand-drawn sketch). Early on they wander far from 0.5. Later they settle down and stay inside the shrinking band.

नीचे 10,000 सही सिक्का उछालों के तीन असली computer runs हैं (हाथ से बना sketch नहीं)। शुरुआत में ये 0.5 से दूर भटकते हैं। बाद में शांत होकर सिकुड़ते band के अंदर रहते हैं।

下面是 10,000 次公平抛硬币的三次真实电脑模拟(不是手绘示意图)。开始时它们远离 0.5,之后逐渐稳定并保持在不断收窄的带内。

📈 PICTURE 3 — THE SHARE OF HEADS SETTLES DOWNतस्वीर 3 — HEADS का हिस्सा स्थिर होता है图 3 — 正面比例逐渐稳定
Three real runs of 10,000 coin flips 0 0.25 0.5 0.75 1 1 10 100 1,000 10,000 true p = 0.5असली p = 0.5真实 p = 0.5 number of flips n (log scale) — shaded band: where 95% of runs stayउछालों की संख्या n (log scale) — रंगीन band: जहाँ 95% runs रहते हैं抛掷次数 n(对数刻度)— 阴影带:95% 的路径落在其中 run 1: n=10 → 0.50 · n=100 → 0.50 · n=10,000 → 0.500 run 2: n=10 → 0.30 · n=100 → 0.51 · n=10,000 → 0.495 run 3: n=10 → 0.40 · n=100 → 0.50 · n=10,000 → 0.499
LIVELIVE互动Flip, Roll, Drop — Watch the Frequency Settleउछालें, फेंकें, गिराएँ — Frequency को स्थिर होते देखें抛、掷、扔 — 看频率稳定下来

Choose an experiment and add trials. The blue line is the running share f/n. The amber band shows how much wobble is normal for each n. For the thumbtack, no formula gives the answer — the trials find it.

एक प्रयोग चुनें और trials जोड़ें। नीली रेखा चलता हिस्सा f/n है। नारंगी band दिखाता है कि हर n पर कितना उतार-चढ़ाव सामान्य है। Thumbtack के लिए कोई formula जवाब नहीं देता — trials उसे ढूँढते हैं।

选择一个试验并增加次数。蓝线是累计比例 f/n。琥珀色带表示每个 n 下正常的波动范围。图钉没有公式能给出答案 —— 要靠试验找出来。

💡
When Frequentist Probability StrugglesFrequentist Probability कब मुश्किल में पड़ती है频率概率何时力不从心

It needs repeatable trials. What is the chance of rain in Delhi on 15 August 2027? There will be only one such day. Or: "What is the chance that this defendant committed this crime?" One-time events need another way of thinking — Bayesian probability. (Weather forecasters do check their forecasts against long-run records of similar days, which mixes both ideas.)

इसे दोहराए जा सकने वाले trials चाहिए। 15 अगस्त 2027 को दिल्ली में बारिश का chance क्या है? ऐसा दिन सिर्फ़ एक बार आएगा। या: "इस आरोपी ने यह अपराध किया, इसका chance क्या है?" एक बार की घटनाओं को सोचने का दूसरा तरीका चाहिए — Bayesian probability। (मौसम विभाग अपने forecasts को मिलते-जुलते दिनों के लंबे रिकॉर्ड से जाँचते हैं, जो दोनों विचारों को मिलाता है।)

它需要可重复的试验。2027 年 8 月 15 日德里下雨的概率是多少?这样的日子只有一个。又如:“这名被告犯下这桩罪行的概率是多少?”一次性事件需要另一种思路 —— 贝叶斯概率。(天气预报员会用相似日子的长期记录来检验预报,这其实结合了两种思想。)


SectionSection第 07 节

Type 3 — Bayesian Probability 🔄प्रकार 3 — Bayesian Probability 🔄类型 3 — 贝叶斯概率 🔄

The Story: The Lost Submarineकहानी: खोई हुई पनडुब्बी故事:失踪的潜艇

In May 1968 the US nuclear submarine Scorpion vanished in the Atlantic. Searching the whole ocean floor was hopeless. Navy scientist John Craven used Bayesian reasoning. He asked experienced submariners and other experts how likely each loss scenario was. Each scenario pointed to different grid squares of sea floor. Combined, they gave a probability for every square, and the search went to the most likely squares first.

मई 1968 में अमेरिकी परमाणु पनडुब्बी Scorpion Atlantic में ग़ायब हो गई। पूरे समुद्र तल को खोजना नामुमकिन था। Navy वैज्ञानिक John Craven ने Bayesian सोच अपनाई। उन्होंने अनुभवी पनडुब्बी अफ़सरों और दूसरे विशेषज्ञों से पूछा कि हर हादसे की कहानी (scenario) कितनी संभव है। हर scenario समुद्र तल के अलग खानों की ओर इशारा करता था। मिलाकर इन्होंने हर खाने की probability दी, और खोज पहले सबसे संभावित खानों में हुई।

1968 年 5 月,美国核潜艇天蝎号在大西洋失踪。搜索整个海底毫无希望。海军科学家约翰·克雷文采用了贝叶斯推理。他请经验丰富的潜艇军官和其他专家评估每种失事情景的可能性。每种情景指向海底网格中的不同方块。综合起来就得到每个方块的概率,搜索先从最可能的方块开始。

In October 1968 the wreck was found in about 3,000 m of water southwest of the Azores — reported to be within about 220 yards (≈ 200 m) of Craven's best estimate. Bayesian search has since helped find lost aircraft and other submarines.

अक्टूबर 1968 में मलबा Azores के दक्षिण-पश्चिम में लगभग 3,000 m गहराई में मिला — बताया जाता है कि Craven के सबसे अच्छे अनुमान से लगभग 220 yards (≈ 200 m) के अंदर। तब से Bayesian search ने खोए विमान और दूसरी पनडुब्बियाँ ढूँढने में मदद की है।

1968 年 10 月,残骸在亚速尔群岛西南约 3,000 米深的海底被找到 —— 据报道距克雷文的最佳估计点约 220 码(≈ 200 米)以内。此后,贝叶斯搜索还帮助找到了失事飞机和其他潜艇。

Bayes' theoremBayes' theorem贝叶斯定理
P(H | E) = P(E | H) × P(H) / P(E)
H = hypothesis. E = evidence. P(H) = prior (belief before). P(H | E) = posterior (belief after).
H = hypothesis. E = सबूत। P(H) = prior (पहले का विश्वास)। P(H | E) = posterior (बाद का विश्वास)।
H = 假设,E = 证据。P(H) = 先验(之前的信念),P(H | E) = 后验(之后的信念)。
Three partsतीन हिस्से三个组成部分
Prior → Likelihood → Posterior
Prior: what you believed. Likelihood: how expected is this evidence if H is true? Posterior: your updated belief.
Prior: आप क्या मानते थे। Likelihood: H सच हो तो यह सबूत कितना अपेक्षित है? Posterior: आपका नया विश्वास।
先验:你原来相信什么。似然:若 H 为真,这个证据有多常见?后验:更新后的信念。
🧮 Bayesian Probability — A Medical TestBayesian Probability — एक Medical Test贝叶斯概率 — 医学检测
Scenarioस्थिति情景
A disease affects 1% of people. A test has 95% sensitivity and 95% specificity. You test positive. What is the chance you have the disease?
एक बीमारी 1% लोगों को है। Test की sensitivity 95% और specificity 95% है। आपका test positive आया। आपको बीमारी होने का chance क्या है?
某疾病患病率为 1%。检测的灵敏度 95%、特异度 95%。你检测呈阳性。你真正患病的概率是多少?
Prior
P(disease) = 0.01, P(no disease) = 0.99
P(बीमारी) = 0.01, P(बीमारी नहीं) = 0.99
P(患病) = 0.01,P(未患病) = 0.99
Likelihood
P(+ | disease) = 0.95 (sensitivity). P(+ | no disease) = 0.05 (1 − specificity).
P(+ | बीमारी) = 0.95 (sensitivity)। P(+ | बीमारी नहीं) = 0.05 (1 − specificity)।
P(+ | 患病) = 0.95(灵敏度)。P(+ | 未患病) = 0.05(1 − 特异度)。
Step 1Step 1第 1 步
P(+) = 0.95 × 0.01 + 0.05 × 0.99 = 0.0095 + 0.0495 = 0.059
P(+) = 0.95 × 0.01 + 0.05 × 0.99 = 0.0095 + 0.0495 = 0.059
P(+) = 0.95 × 0.01 + 0.05 × 0.99 = 0.0095 + 0.0495 = 0.059
Step 2Step 2第 2 步
P(disease | +) = 0.0095 / 0.059 = 0.161 (16.1%)
P(बीमारी | +) = 0.0095 / 0.059 = 0.161 (16.1%)
P(患病 | +) = 0.0095 / 0.059 = 0.161(16.1%)
Insightसीख启示
Even with a 95% accurate test, a positive result means only about a 16% chance of disease. The low prior (1%) dominates. In 10,000 people: 95 true positives but 495 false positives.
95% सटीक test के बावजूद, positive नतीजे का मतलब बीमारी का सिर्फ़ लगभग 16% chance है। कम prior (1%) हावी रहता है। 10,000 लोगों में: 95 true positives पर 495 false positives।
即使检测准确率达 95%,阳性结果也只意味着约 16% 的患病概率。低先验(1%)占主导。在 10,000 人中:95 个真阳性,却有 495 个假阳性。
LIVELIVE互动Bayes with 10,000 People10,000 लोगों के साथ Bayes用 10,000 人理解贝叶斯

Counting people is easier than multiplying fractions. Set the disease rate and test quality, then test 10,000 people. Then re-test only the positives and watch the posterior jump.

लोगों को गिनना fractions गुणा करने से आसान है। बीमारी की दर और test की गुणवत्ता चुनें, फिर 10,000 लोगों की जाँच करें। फिर सिर्फ़ positives की दोबारा जाँच करें और posterior की छलांग देखें।

数人头比乘分数更容易。设置患病率和检测质量,然后检测 10,000 人。再只对阳性者复检,看后验概率如何跃升。

🧮
Bayesian Updating — Today's Posterior Is Tomorrow's PriorBayesian Updating — आज का Posterior कल का Prior贝叶斯更新 — 今天的后验是明天的先验

After the first positive test, 16.1% becomes the new prior. A second positive test (with independent errors) lifts it to about 78.5%, and a third to about 98.6%. Each piece of evidence sharpens the belief. This is the idea behind spam filters, robot navigation and many recommendation systems.

पहले positive test के बाद 16.1% नया prior बन जाता है। दूसरा positive test (independent ग़लतियों के साथ) इसे लगभग 78.5% और तीसरा लगभग 98.6% तक ले जाता है। हर सबूत विश्वास को और पक्का करता है। Spam filters, robot navigation और कई recommendation systems के पीछे यही विचार है।

第一次阳性后,16.1% 成为新的先验。第二次阳性(假设各次检测的错误相互独立)把它提高到约 78.5%,第三次提高到约 98.6%。每条证据都让信念更清晰。垃圾邮件过滤、机器人导航和许多推荐系统都基于这个思想。

FeatureFeature特征ClassicalClassical古典FrequentistFrequentist频率BayesianBayesian贝叶斯
Based onआधार依据Counting equally likely outcomesबराबर संभावना वाले नतीजे गिनना数等可能结果Long-run observed frequencyलंबी अवधि की देखी गई आवृत्ति长期观测频率Degree of belief + evidenceविश्वास की मात्रा + सबूत信念程度 + 证据
Needs data?Data चाहिए?需要数据吗?No — theoryनहीं — सिद्धांत不需要 — 理论Yes — many trialsहाँ — कई trials需要 — 大量试验Prior + evidencePrior + सबूत先验 + 证据
One-time events?एक बार की घटनाएँ?一次性事件?Only if outcomes are symmetricसिर्फ़ अगर नतीजे सममित हों仅当结果对称时Hardमुश्किल困难Yesहाँ可以
Key assumptionमुख्य मान्यता关键假设Equal likelihoodबराबर संभावना等可能Repeatable experimentsदोहराए जा सकने वाले प्रयोग可重复的实验A sensible priorएक उचित prior合理的先验
Best forसबसे अच्छा最适合Games, combinatoricsखेल, combinatorics游戏、组合数学Insurance, QC, epidemiologyबीमा, QC, epidemiology保险、质检、流行病学ML, medicine, forecastingML, चिकित्सा, forecasting机器学习、医学、预测
Exampleउदाहरण例子Card-game oddsपत्तों के खेल के odds纸牌游戏胜率Defect rates, life tablesDefect दरें, life tables次品率、生命表Spam filters, diagnosisSpam filters, निदान垃圾邮件过滤、诊断

SectionSection第 08 节

The Rules of the Game — Kolmogorov's Axioms 📏खेल के नियम — Kolmogorov के Axioms 📏游戏规则 — 柯尔莫哥洛夫公理 📏

All three meanings of probability follow the same maths. In 1933 Andrey Kolmogorov wrote it down as three simple axioms — starting rules that are accepted, not proved. Every other rule in this tutorial is derived from them.

Probability के तीनों अर्थ एक ही गणित मानते हैं। 1933 में Andrey Kolmogorov ने इसे तीन सरल axioms के रूप में लिखा — शुरुआती नियम जो माने जाते हैं, साबित नहीं किए जाते। इस tutorial का हर दूसरा नियम इन्हीं से निकाला गया है।

三种概率含义遵循同一套数学。1933 年,柯尔莫哥洛夫把它写成三条简单的公理 —— 公理是被接受的出发点,而不是被证明的结论。本教程中其他所有法则都由它们推导出来。

📜 Kolmogorov's Three AxiomsKolmogorov के तीन Axioms柯尔莫哥洛夫三公理
Axiom 1Axiom 1公理 1
P(E) ≥ 0 for every event E. Probabilities are never negative.
हर event E के लिए P(E) ≥ 0। Probability कभी negative नहीं।
对任意事件 E,P(E) ≥ 0。概率永不为负。
Axiom 2Axiom 2公理 2
P(Ω) = 1. Some outcome in the sample space always happens.
P(Ω) = 1। Sample space का कोई नतीजा हमेशा होता है।
P(Ω) = 1。样本空间中总有某个结果发生。
Axiom 3Axiom 3公理 3
If events A₁, A₂, … are mutually exclusive, P(A₁ ∪ A₂ ∪ …) = P(A₁) + P(A₂) + … Non-overlapping chances add up.
अगर events A₁, A₂, … mutually exclusive हैं, तो P(A₁ ∪ A₂ ∪ …) = P(A₁) + P(A₂) + … बिना overlap वाले chances जुड़ते हैं।
若事件 A₁、A₂、… 两两互斥,则 P(A₁ ∪ A₂ ∪ …) = P(A₁) + P(A₂) + … 不重叠的概率可以相加。
Derivedनिकाले गए推导结果
From these: P(∅) = 0, P(Aᶜ) = 1 − P(A), P(A) ≤ 1, and the general addition rule. No extra assumptions needed.
इनसे: P(∅) = 0, P(Aᶜ) = 1 − P(A), P(A) ≤ 1, और general addition rule। कोई अतिरिक्त मान्यता नहीं चाहिए।
由此可得:P(∅) = 0,P(Aᶜ) = 1 − P(A),P(A) ≤ 1,以及一般加法法则。不需要额外假设。

SectionSection第 09 节

Rule 1 — The Addition Rule (OR) ➕नियम 1 — Addition Rule (OR) ➕法则 1 — 加法法则(或)➕

The Story: Raffle Tickets and Playing Cardsकहानी: Raffle Tickets और ताश के पत्ते故事:抽奖券与扑克牌

A school raffle has 100 tickets. You hold tickets #7 and #23. Only one ticket is drawn, so both cannot win. Your chance is 1/100 + 1/100 = 2%. Adding works because the events are mutually exclusive.

एक school raffle में 100 tickets हैं। आपके पास #7 और #23 हैं। सिर्फ़ एक ticket निकलता है, इसलिए दोनों नहीं जीत सकते। आपका chance 1/100 + 1/100 = 2%। जोड़ना इसलिए काम करता है क्योंकि events mutually exclusive हैं।

学校抽奖共 100 张券,你持有 7 号和 23 号。只抽一张,所以两张不可能同时中奖。你的概率是 1/100 + 1/100 = 2%。能直接相加是因为两个事件互斥。

Now: "What is the chance of drawing a King OR a Heart?" The King of Hearts is both. Adding P(King) + P(Heart) would count it twice. So we subtract the overlap once.

अब: "बादशाह या पान (Heart) निकलने का chance क्या है?" पान का बादशाह दोनों है। P(King) + P(Heart) जोड़ने पर वह दो बार गिना जाएगा। इसलिए overlap को एक बार घटाते हैं।

再看:“抽到 K 或红心的概率是多少?”红心 K 两者都是。直接相加 P(K) + P(红心) 会把它数两次,所以要减去一次重叠部分。

General addition ruleGeneral addition rule一般加法法则
P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
Works for ALL pairs of events. Subtract the overlap so it is not counted twice.
हर जोड़ी events के लिए काम करता है। Overlap घटाएँ ताकि वह दो बार न गिना जाए।
适用于任意两个事件。减去重叠部分,避免重复计数。
Mutually exclusive eventsMutually exclusive events互斥事件
P(A ∪ B) = P(A) + P(B)
Special case: A ∩ B = ∅, so the overlap term is 0.
ख़ास स्थिति: A ∩ B = ∅, इसलिए overlap वाला पद 0।
特例:A ∩ B = ∅,重叠项为 0。
Complement ruleComplement rule对立事件法则
P(Aᶜ) = 1 − P(A)
A and Aᶜ are mutually exclusive and together make Ω, so P(A) + P(Aᶜ) = 1.
A और Aᶜ mutually exclusive हैं और मिलकर Ω बनाते हैं, इसलिए P(A) + P(Aᶜ) = 1।
A 与 Aᶜ 互斥且合起来是 Ω,所以 P(A) + P(Aᶜ) = 1。
Three events (inclusion–exclusion)तीन events (inclusion–exclusion)三个事件(容斥原理)
P(A∪B∪C) = ΣP(single) − ΣP(pairs) + P(A∩B∩C)
Add singles, subtract all pairwise overlaps, then add back the triple overlap.
अकेले जोड़ें, सारे जोड़ों के overlaps घटाएँ, फिर तिहरा overlap वापस जोड़ें।
先加单个,减去所有两两重叠,再加回三者重叠。
🃏 PICTURE 4 — KING OR HEART ON A REAL DECKतस्वीर 4 — असली गड्डी पर KING या HEART图 4 — 真实牌组上的 K 或红心
King or Heart on a full deck A 2 3 4 5 6 7 8 9 10 J Q K ♠ A♠ 2♠ 3♠ 4♠ 5♠ 6♠ 7♠ 8♠ 9♠ 10♠ J♠ Q♠ K♠ ♥ A♥ 2♥ 3♥ 4♥ 5♥ 6♥ 7♥ 8♥ 9♥ 10♥ J♥ Q♥ K♥ ♦ A♦ 2♦ 3♦ 4♦ 5♦ 6♦ 7♦ 8♦ 9♦ 10♦ J♦ Q♦ K♦ ♣ A♣ 2♣ 3♣ 4♣ 5♣ 6♣ 7♣ 8♣ 9♣ 10♣ J♣ Q♣ K♣ 4 Kings + 13 Hearts − 1 (K♥ counted twice) = 16 P(King or Heart) = 4/52 + 13/52 − 1/52 = 16/52 ≈ 0.308

Kings appear first, then Hearts, then the one card counted twice.

पहले Kings दिखते हैं, फिर Hearts, फिर वह एक पत्ता जो दो बार गिना गया।

先显示 K,再显示红心,最后显示被数了两次的那张牌。

🧮 Addition Rule — Five Worked ExamplesAddition Rule — पाँच हल किए उदाहरण加法法则 — 五个例题
Ex 1 · MEउदा. 1 · ME例 1 · 互斥
A 2 or a 5 on a die. One roll shows one number. P = 1/6 + 1/6 = 2/6 ≈ 0.333
Die पर 2 या 5। एक फेंक में एक ही संख्या। P = 1/6 + 1/6 = 2/6 ≈ 0.333
骰子掷出 2 或 5。一次只出一个数。P = 1/6 + 1/6 = 2/6 ≈ 0.333
Ex 2 · MEउदा. 2 · ME例 2 · 互斥
A Club or a Diamond. P = 13/52 + 13/52 = 26/52 = 0.50
चिड़ी या ईंट। P = 13/52 + 13/52 = 26/52 = 0.50
梅花或方块。P = 13/52 + 13/52 = 26/52 = 0.50
Ex 3 · Generalउदा. 3 · General例 3 · 一般
A King or a Heart. 4/52 + 13/52 − 1/52 = 16/52 ≈ 0.308
बादशाह या पान। 4/52 + 13/52 − 1/52 = 16/52 ≈ 0.308
K 或红心。4/52 + 13/52 − 1/52 = 16/52 ≈ 0.308
Ex 4 · Generalउदा. 4 · General例 4 · 一般
Greater than 3 or even. A = {4,5,6}, B = {2,4,6}, A∩B = {4,6}. P = 3/6 + 3/6 − 2/6 = 4/6 ≈ 0.667
3 से बड़ा या सम। A = {4,5,6}, B = {2,4,6}, A∩B = {4,6}. P = 3/6 + 3/6 − 2/6 = 4/6 ≈ 0.667
大于 3 或偶数。A = {4,5,6},B = {2,4,6},A∩B = {4,6}。P = 3/6 + 3/6 − 2/6 = 4/6 ≈ 0.667
Ex 5 · Complementउदा. 5 · Complement例 5 · 对立
At least one head in 3 flips. P(no heads) = P(TTT) = (1/2)³ = 1/8. P = 1 − 1/8 = 7/8 = 0.875
3 उछाल में कम से कम एक head। P(कोई head नहीं) = P(TTT) = (1/2)³ = 1/8. P = 1 − 1/8 = 7/8 = 0.875
抛 3 次至少一次正面。P(无正面) = P(TTT) = (1/2)³ = 1/8。P = 1 − 1/8 = 7/8 = 0.875

SectionSection第 10 节

Rule 2 — The Multiplication Rule (AND) ✖️नियम 2 — Multiplication Rule (AND) ✖️法则 2 — 乘法法则(且)✖️

The Story: Guessing a PINकहानी: PIN का अंदाज़ा故事:猜 PIN 码

A security analyst asks: what is the chance of guessing a random 4-digit PIN on the first try? Each digit has 10 choices, chosen independently. So there are 10 × 10 × 10 × 10 = 10,000 PINs, and P(right first time) = 1/10,000 = 0.01%. (Real people often pick easy PINs like 1234, so real attackers do better than this — the "independent and equally likely" assumption matters.)

एक security analyst पूछता है: random 4-अंकों वाला PIN पहली कोशिश में सही अंदाज़ा लगाने का chance क्या है? हर अंक के 10 विकल्प हैं, independent तरीके से चुने गए। तो 10 × 10 × 10 × 10 = 10,000 PINs हैं, और P(पहली बार सही) = 1/10,000 = 0.01%। (असली लोग अक्सर 1234 जैसे आसान PIN चुनते हैं, इसलिए असली हमलावर इससे बेहतर करते हैं — "independent और बराबर संभावना" वाली मान्यता मायने रखती है।)

安全分析师问:第一次就猜中一个随机 4 位 PIN 的概率是多少?每位数字有 10 种选择,且相互独立。共有 10 × 10 × 10 × 10 = 10,000 种 PIN,P(一次猜中) = 1/10,000 = 0.01%。(现实中人们常选 1234 这类简单 PIN,所以真实攻击者成功率更高 ——“独立且等可能”的假设很关键。)

Independent eventsIndependent events独立事件
P(A ∩ B) = P(A) × P(B)
Knowing A happened tells you nothing about B.
A हुआ यह जानना B के बारे में कुछ नहीं बताता।
知道 A 发生了,对 B 没有任何信息。
General (dependent) formGeneral (dependent) रूप一般(相依)形式
P(A ∩ B) = P(A) × P(B | A)
Always true. Use P(B | A) when A changes the chance of B.
हमेशा सही। जब A, B का chance बदलता हो तो P(B | A) लें।
永远成立。当 A 改变 B 的概率时,用 P(B | A)。
Conditional probabilityConditional probability条件概率
P(B | A) = P(A ∩ B) / P(A)
Zoom in on the world where A happened. Needs P(A) > 0.
उस दुनिया में देखें जहाँ A हुआ। P(A) > 0 चाहिए।
把视野缩小到 A 已发生的世界。需要 P(A) > 0。
Chain ruleChain rule链式法则
P(A∩B∩C) = P(A) × P(B|A) × P(C|A∩B)
Each step is conditioned on everything before it.
हर कदम अपने से पहले की सब बातों पर conditioned है।
每一步都以之前所有事件为条件。
🧮 Multiplication Rule — Six Worked ExamplesMultiplication Rule — छह हल किए उदाहरण乘法法则 — 六个例题
Ex 1 · Indep.उदा. 1 · Indep.例 1 · 独立
Two heads in a row. 1/2 × 1/2 = 1/4 = 0.25
लगातार दो heads। 1/2 × 1/2 = 1/4 = 0.25
连续两次正面。1/2 × 1/2 = 1/4 = 0.25
Ex 2 · Indep.उदा. 2 · Indep.例 2 · 独立
A 6 on a die AND heads on a coin. 1/6 × 1/2 = 1/12 ≈ 0.083
Die पर 6 और सिक्के पर heads। 1/6 × 1/2 = 1/12 ≈ 0.083
骰子 6 且硬币正面。1/6 × 1/2 = 1/12 ≈ 0.083
Ex 3 · Indep.?उदा. 3 · Indep.?例 3 · 独立?
Three defects in a row at a 2% defect rate. If defects are independent: 0.02³ = 0.000008. But defects often come in runs (a faulty machine), so the real chance can be much higher.
2% defect दर पर लगातार तीन defects। अगर defects independent हों: 0.02³ = 0.000008। पर defects अक्सर एक साथ आते हैं (ख़राब मशीन), इसलिए असली chance बहुत ज़्यादा हो सकता है।
次品率 2% 时连续三件次品。若次品相互独立:0.02³ = 0.000008。但次品常常成批出现(机器故障),真实概率可能高得多。
Ex 4 · Dep.उदा. 4 · Dep.例 4 · 相依
Two Aces without replacement. 4/52 × 3/51 = 12/2652 = 1/221 ≈ 0.0045
बिना वापस डाले दो इक्के। 4/52 × 3/51 = 12/2652 = 1/221 ≈ 0.0045
无放回抽两张 A。4/52 × 3/51 = 12/2652 = 1/221 ≈ 0.0045
Ex 5 · Dep.उदा. 5 · Dep.例 5 · 相依
A King, then a Queen. 4/52 × 4/51 = 16/2652 ≈ 0.006
पहले बादशाह, फिर बेगम। 4/52 × 4/51 = 16/2652 ≈ 0.006
先 K 后 Q。4/52 × 4/51 = 16/2652 ≈ 0.006
Ex 6 · Chainउदा. 6 · Chain例 6 · 链式
Three red cards in a row. 26/52 × 25/51 × 24/50 = 2/17 ≈ 0.1176
लगातार तीन लाल पत्ते। 26/52 × 25/51 × 24/50 = 2/17 ≈ 0.1176
连续三张红牌。26/52 × 25/51 × 24/50 = 2/17 ≈ 0.1176
🌳 PICTURE 5 — PROBABILITY TREES: INDEPENDENT VS DEPENDENTतस्वीर 5 — PROBABILITY TREES: INDEPENDENT बनाम DEPENDENT图 5 — 概率树:独立 vs 相依
Independent and dependent probability trees Two coin flips — independentदो सिक्के — independent两次抛硬币 — 独立 ½ ½ ½ H ½ ½ ½ T HH = ¼ HT = ¼ TH = ¼ TT = ¼ Two cards, no replacement — dependentदो पत्ते, बिना वापस — dependent两张牌,无放回 — 不独立 4/52 3/51 48/51 A 48/52 4/51 47/51 not A,A = 12/2652 ≈ 0.005 A,not = 192/2652 ≈ 0.072 not,A = 192/2652 ≈ 0.072 not,not = 2256/2652 ≈ 0.851 Second branch is the same on both sides. Leaves sum to 1.दोनों तरफ़ दूसरी शाखा एक जैसी। पत्तियों का योग 1।两侧第二层概率相同。叶子之和为 1。 Second branch changes (3/51 vs 4/51). Leaves still sum to 1.दूसरी शाखा बदलती है (3/51 vs 4/51)। योग फिर भी 1।第二层概率改变(3/51 vs 4/51)。叶子之和仍为 1。

Multiply along a path to get its probability. Add paths for "or".

किसी रास्ते की probability के लिए उस पर गुणा करें। "या" के लिए रास्ते जोड़ें।

沿路径相乘得到该路径概率;“或”就把路径相加。

LIVELIVE互动Draw from an Urn — Live Probability Treeमटके से निकालें — Live Probability Tree从罐中摸球 — 实时概率树

Set the red and blue balls, then draw two. Switch between with and without replacement and watch the second-level branches change. Run 1,000 draws to compare the tree with real frequencies.

लाल और नीली गेंदें चुनें, फिर दो निकालें। वापस डालकर और बिना वापस डाले के बीच बदलें और दूसरे स्तर की शाखाएँ बदलती देखें। Tree की असली frequencies से तुलना के लिए 1,000 बार निकालें।

设置红球和蓝球数量,然后摸两个。在有放回与无放回之间切换,观察第二层分支如何变化。摸 1,000 次,把树上的概率与真实频率比较。


SectionSection第 11 节

Testing Independence 🔍Independence की जाँच 🔍检验独立性 🔍

How do you know if two events are independent? Work out P(A), P(B) and P(A ∩ B) from your data, and check whether the multiplication rule holds.

कैसे पता करें कि दो events independent हैं? अपने data से P(A), P(B) और P(A ∩ B) निकालें, और देखें कि multiplication rule लागू होता है या नहीं।

怎么知道两个事件是否独立?从数据算出 P(A)、P(B) 和 P(A ∩ B),检查乘法法则是否成立。

Independence testIndependence test独立性检验
P(A ∩ B) = P(A) × P(B)
If this holds, A and B are independent. If not, they are dependent.
अगर यह सही है तो A और B independent हैं। नहीं तो dependent।
成立则 A 与 B 独立,否则相依。
Same idea, easier to readवही विचार, पढ़ने में आसान同一思想,更易理解
P(B | A) = P(B)
Knowing A does not change the chance of B.
A का पता होने से B का chance नहीं बदलता।
知道 A 不改变 B 的概率。
🧮 Independence Check — Study Hours vs Exam ResultIndependence जाँच — पढ़ाई के घंटे बनाम परीक्षा परिणाम独立性检验 — 学习时长 vs 考试结果
Data
200 students. A = "studied more than 5 hours" (100). B = "passed" (140). A and B = 90 students.
200 छात्र। A = "5 घंटे से ज़्यादा पढ़ा" (100)। B = "pass हुआ" (140)। A और B दोनों = 90 छात्र।
200 名学生。A =“学习超过 5 小时”(100 人)。B =“通过”(140 人)。A 且 B = 90 人。
Calculateगणना计算
P(A) = 0.50, P(B) = 0.70, P(A ∩ B) = 0.45
P(A) = 0.50, P(B) = 0.70, P(A ∩ B) = 0.45
P(A) = 0.50,P(B) = 0.70,P(A ∩ B) = 0.45
Test
P(A) × P(B) = 0.35, but P(A ∩ B) = 0.45 → not independent
P(A) × P(B) = 0.35, पर P(A ∩ B) = 0.45 → independent नहीं
P(A) × P(B) = 0.35,但 P(A ∩ B) = 0.45 → 不独立
Meaningमतलब含义
P(pass | studied more) = 90/100 = 0.90, against 0.70 overall and 50/100 = 0.50 for the others. Studying and passing are linked. (This shows an association; on its own it does not prove that studying causes passing.)
P(pass | ज़्यादा पढ़ा) = 90/100 = 0.90, जबकि कुल 0.70 और बाक़ियों के लिए 50/100 = 0.50। पढ़ाई और pass होना जुड़े हैं। (यह एक संबंध दिखाता है; अकेले यह साबित नहीं करता कि पढ़ाई ही pass होने का कारण है।)
P(通过 | 学习多) = 90/100 = 0.90,而总体为 0.70,其余学生为 50/100 = 0.50。学习与通过有关联。(这只说明关联,本身不能证明学习导致通过。)
🧩 PICTURE 6 — DEPENDENCE YOU CAN SEEतस्वीर 6 — DEPENDENCE जो दिखती है图 6 — 看得见的相依
Pass rates for students who studied more or less pass 90 → 90% fail 10 studied > 5 h (100)पढ़ाई > 5 घंटे (100)学习 > 5 小时(100 人) pass 50 → 50% fail 50 studied ≤ 5 h (100)पढ़ाई ≤ 5 घंटे (100)学习 ≤ 5 小时(100 人) overall pass rateकुल pass दर总通过率 P(B) = 0.70 If studying did not matter, both green bars would stop at the dashed line.अगर पढ़ाई का असर न होता, तो दोनों हरे bars dashed line पर रुकते।如果学习时长无关,两根绿色柱子都会停在虚线处。
⚠️
Mutually Exclusive Is NOT the Same as IndependentMutually Exclusive और Independent एक नहीं हैं互斥 ≠ 独立

This is a very common mix-up. If A and B are mutually exclusive (and both possible), then knowing A happened tells you B did not happen. That is the strongest possible dependence. Example: on one die, "odd" and "even" are mutually exclusive, and P(even | odd) = 0, not 0.5.

यह बहुत आम ग़लतफ़हमी है। अगर A और B mutually exclusive हैं (और दोनों संभव हैं), तो A हुआ यह जानते ही पता चल जाता है कि B नहीं हुआ। यह सबसे मज़बूत dependence है। उदाहरण: एक die पर "विषम" और "सम" mutually exclusive हैं, और P(सम | विषम) = 0, 0.5 नहीं।

这是非常常见的混淆。若 A 与 B 互斥(且都可能发生),知道 A 发生就等于知道 B 没有发生 —— 这是最强的相依。例如一颗骰子上“奇数”与“偶数”互斥,P(偶数 | 奇数) = 0,而不是 0.5。


SectionSection第 12 节

The Complement Shortcut — The Birthday Problem 🎂Complement का Shortcut — Birthday Problem 🎂对立事件捷径 — 生日问题 🎂

How many people must be in a room for a 50% chance that two share a birthday? Most people guess around 180. The answer is just 23. The trick is the complement rule: it is hard to count all the ways of "at least one match", but easy to find P(all different) and subtract it from 1.

कमरे में कितने लोग हों कि दो का जन्मदिन एक होने का 50% chance हो? ज़्यादातर लोग लगभग 180 कहते हैं। जवाब सिर्फ़ 23 है। तरकीब complement rule है: "कम से कम एक मेल" के सारे तरीके गिनना मुश्किल है, पर P(सब अलग) निकालकर 1 से घटाना आसान है।

房间里要有多少人,才能有 50% 的概率出现两人同一天生日?多数人会猜 180 左右。答案只是 23。窍门是对立事件法则:直接数“至少一对相同”的所有情况很难,但算出 P(全部不同) 再用 1 减去它很容易。

All differentसब अलग全部不同
P(no match) = 365/365 × 364/365 × … × (365−n+1)/365
The multiplication rule: each new person must miss all earlier birthdays (365 equally likely days, ignoring 29 February).
Multiplication rule: हर नए व्यक्ति को पहले के सब जन्मदिनों से बचना है (365 बराबर संभावना वाले दिन, 29 फ़रवरी छोड़कर)।
乘法法则:每个新来的人都要避开之前所有人的生日(365 天等可能,忽略 2 月 29 日)。
At least one matchकम से कम एक मेल至少一对相同
P(match) = 1 − P(no match)
n = 23 gives 0.507. Why so few? 23 people make 253 pairs, and each pair is a chance to match.
n = 23 पर 0.507। इतने कम क्यों? 23 लोग 253 जोड़े बनाते हैं, और हर जोड़ा मेल का एक मौक़ा है।
n = 23 时为 0.507。为什么这么少?23 人能组成 253 对,每一对都可能相同。
LIVELIVE互动Fill a Room — The Birthday Problemकमरा भरें — Birthday Problem填满房间 — 生日问题

Each row is a month and each square a day. People arrive one by one; a red square means two share that birthday. Run 1,000 rooms to check the exact curve.

हर पंक्ति एक महीना और हर खाना एक दिन है। लोग एक-एक कर आते हैं; लाल खाना मतलब दो का जन्मदिन एक। सटीक curve जाँचने के लिए 1,000 कमरे चलाएँ।

每行是一个月,每个方块是一天。人一个个进来,红色方块表示有两人同一天生日。模拟 1,000 个房间来验证精确曲线。


SectionSection第 13 节

Python ImplementationPython ImplementationPython 实现

Classical probability by listing the sample spaceSample space लिखकर classical probability列出样本空间计算古典概率

# 1) Classical probability: list the sample space and count
from fractions import Fraction
from itertools import product

omega = list(product(range(1, 7), repeat=2))      # two dice: 36 outcomes
print("Size of sample space:", len(omega))

def P(event):
    favourable = [w for w in omega if event(w)]
    return Fraction(len(favourable), len(omega))

A = lambda w: w[0] + w[1] == 7                   # sum is 7
B = lambda w: w[0] == 6 or w[1] == 6             # at least one six
print("P(sum = 7)        =", P(A))
print("P(at least one 6) =", P(B))
print("P(A and B)        =", P(lambda w: A(w) and B(w)))
print("P(A or B)         =", P(lambda w: A(w) or B(w)))
print("Check addition rule:", P(A) + P(B) - P(lambda w: A(w) and B(w)))
OUTPUT
Size of sample space: 36 P(sum = 7) = 1/6 P(at least one 6) = 11/36 P(A and B) = 1/18 P(A or B) = 5/12 Check addition rule: 5/12

Frequentist probability: the law of large numbersFrequentist probability: law of large numbers频率概率:大数定律

# 2) Frequentist probability: relative frequency settles down (Law of Large Numbers)
import numpy as np
rng = np.random.default_rng(7)
flips = rng.integers(0, 2, size=100_000)          # 1 = heads
running = np.cumsum(flips) / np.arange(1, flips.size + 1)
for n in [10, 100, 1_000, 10_000, 100_000]:
    print(f"after {n:>7,} flips: share of heads = {running[n-1]:.4f}  (error {abs(running[n-1]-0.5):.4f})")
OUTPUT
after 10 flips: share of heads = 0.7000 (error 0.2000) after 100 flips: share of heads = 0.5600 (error 0.0600) after 1,000 flips: share of heads = 0.5160 (error 0.0160) after 10,000 flips: share of heads = 0.4926 (error 0.0074) after 100,000 flips: share of heads = 0.5012 (error 0.0012)

Checking the card rules by brute forceताश के नियम brute force से जाँचना用穷举验证纸牌法则

# 3) Card rules checked by brute force over a real deck
from fractions import Fraction
from itertools import permutations
ranks = "A 2 3 4 5 6 7 8 9 10 J Q K".split()
suits = "♠♥♦♣"
deck = [(r, s) for r in ranks for s in suits]

king  = sum(r == "K" for r, s in deck)
heart = sum(s == "♥" for r, s in deck)
both  = sum(r == "K" and s == "♥" for r, s in deck)
print("P(King or Heart) =", Fraction(king + heart - both, 52))

pairs = list(permutations(deck, 2))                # ordered draws, no replacement
aces  = sum(a[0] == "A" and b[0] == "A" for a, b in pairs)
print("P(two Aces, no replacement)  =", Fraction(aces, len(pairs)))
print("P(two Aces, with replacement) =", Fraction(4, 52) ** 2)
reds = Fraction(26, 52) * Fraction(25, 51) * Fraction(24, 50)
print("P(three reds in a row)       =", reds, "=", round(float(reds), 4))
OUTPUT
P(King or Heart) = 4/13 P(two Aces, no replacement) = 1/221 P(two Aces, with replacement) = 1/169 P(three reds in a row) = 2/17 = 0.1176

Bayes' theorem, one test at a timeBayes' theorem, एक-एक test贝叶斯定理:逐次检测

# 4) Bayes: update after each positive test
prior, sens, spec = 0.01, 0.95, 0.95
p = prior
for test in range(1, 4):
    p_pos = sens * p + (1 - spec) * (1 - p)        # total probability
    p = sens * p / p_pos                           # Bayes' theorem
    print(f"after positive test {test}: P(disease) = {p:.3f}")
OUTPUT
after positive test 1: P(disease) = 0.161 after positive test 2: P(disease) = 0.785 after positive test 3: P(disease) = 0.986

Independence check and the birthday problemIndependence जाँच और birthday problem独立性检验与生日问题

# 5) Independence check and the complement rule (birthday problem)
pA, pB, pAB = 100/200, 140/200, 90/200
print("P(A)P(B) =", pA * pB, " P(A and B) =", pAB, " P(B|A) =", pAB / pA)
print("independent?", abs(pA * pB - pAB) < 1e-9)

def p_shared(n):
    p_none = 1.0
    for k in range(n):
        p_none *= (365 - k) / 365
    return 1 - p_none                              # complement rule
for n in [10, 23, 30, 50, 70]:
    print(f"{n} people: P(at least two share a birthday) = {p_shared(n):.3f}")
OUTPUT
P(A)P(B) = 0.35 P(A and B) = 0.45 P(B|A) = 0.9 independent? False 10 people: P(at least two share a birthday) = 0.117 23 people: P(at least two share a birthday) = 0.507 30 people: P(at least two share a birthday) = 0.706 50 people: P(at least two share a birthday) = 0.970 70 people: P(at least two share a birthday) = 0.999

SectionSection第 14 节

All the Rules Together — Quick Referenceसारे नियम एक साथ — झटपट सारांश全部法则 — 速查表

Ruleनियम法则FormulaFormula公式When to useकब इस्तेमाल करें何时使用Key wordमुख्य शब्द关键词
ComplementComplement对立P(Aᶜ) = 1 − P(A)"At least one", "not", "none""कम से कम एक", "नहीं", "कोई नहीं"“至少一个”“不”“没有”NOTNOT非
Addition (ME)Addition (ME)加法(互斥)P(A ∪ B) = P(A) + P(B)Events that cannot overlapजो events overlap नहीं कर सकते不会重叠的事件OR, no overlapOR, overlap नहीं或,无重叠
Addition (general)Addition (general)加法(一般)P(A ∪ B) = P(A) + P(B) − P(A ∩ B)Any two events (always safe)कोई भी दो events (हमेशा सुरक्षित)任意两个事件(总是安全)OR, with overlapOR, overlap के साथ或,有重叠
Multiplication (indep.)Multiplication (indep.)乘法(独立)P(A ∩ B) = P(A) × P(B)Independent events onlyसिर्फ़ independent events仅限独立事件AND, independentAND, independent且,独立
Multiplication (general)Multiplication (general)乘法(一般)P(A ∩ B) = P(A) × P(B | A)Any two events (always safe)कोई भी दो events (हमेशा सुरक्षित)任意两个事件(总是安全)AND, dependentAND, dependent且,相依
ConditionalConditional条件概率P(B | A) = P(A ∩ B) / P(A)Given that A happenedजब A हो चुका हो已知 A 发生GIVENGIVEN已知
Total probabilityTotal probability全概率P(E) = P(E|H)P(H) + P(E|Hᶜ)P(Hᶜ)The denominator of BayesBayes का हर (denominator)贝叶斯公式的分母SPLITSPLIT拆分
Bayes' theoremBayes' theorem贝叶斯定理P(H | E) = P(E | H) × P(H) / P(E)Update a belief with evidenceसबूत से विश्वास update करना用证据更新信念UPDATEUPDATE更新

SectionSection第 15 节

The Golden Rules of ProbabilityProbability के सुनहरे नियम概率的黄金法则

🎯 10 Foundations Every Data Scientist Must Know10 बुनियादें जो हर Data Scientist को पता हों每位数据科学家必知的 10 条基础
1
Start with the sample space. Before any calculation, list or describe Ω and make sure its outcomes are equally likely if you plan to count. A wrong Ω makes every answer wrong.
Sample space से शुरू करें। गणना से पहले Ω लिखें, और अगर गिनती करनी है तो देखें कि नतीजे बराबर संभावना वाले हों। ग़लत Ω हर जवाब को ग़लत कर देता है।
从样本空间开始。计算前先列出或描述 Ω;如果要计数,确保结果等可能。Ω 错了,所有答案都错。
2
Probabilities of a partition sum to 1. If events are mutually exclusive and cover Ω, their probabilities add to exactly 1. Use this as a sanity check.
Partition की probabilities का योग 1। अगर events mutually exclusive हों और Ω ढकें, तो उनकी probabilities का योग ठीक 1। इसे जाँच के लिए इस्तेमाल करें।
划分的概率之和为 1。若事件两两互斥且覆盖 Ω,它们的概率之和恰为 1。用它来自检。
3
"OR" points to addition, "AND" to multiplication. "At least one" usually means: use the complement and subtract from 1.
"OR" addition की ओर, "AND" multiplication की ओर। "कम से कम एक" का आम मतलब: complement लें और 1 से घटाएँ।
“或”用加法,“且”用乘法。“至少一个”通常意味着:用对立事件,再从 1 中减去。
4
Check for overlap before adding. Adding P(A) + P(B) without checking for overlap is the most common mistake. Ask: can A and B happen together?
जोड़ने से पहले overlap जाँचें। Overlap जाँचे बिना P(A) + P(B) जोड़ना सबसे आम ग़लती है। पूछें: क्या A और B साथ हो सकते हैं?
相加前先查重叠。不查重叠就直接相加是最常见的错误。问问自己:A 和 B 能同时发生吗?
5
Check independence before multiplying. P(A) × P(B) equals P(A ∩ B) only for independent events. Assuming independence for linked risks (loans that default together, machines that fail together) can badly underestimate danger.
गुणा करने से पहले independence जाँचें। P(A) × P(B) = P(A ∩ B) सिर्फ़ independent events के लिए। जुड़े जोखिमों (साथ डूबने वाले loans, साथ ख़राब होने वाली मशीनें) को independent मानना ख़तरे को बहुत कम आँक सकता है।
相乘前先查独立性。只有独立事件才有 P(A) × P(B) = P(A ∩ B)。把相关风险(一起违约的贷款、一起故障的机器)当作独立,会严重低估危险。
6
Conditional probability shrinks the world. P(B | A) is worked out only inside A. The denominator becomes P(A), not 1.
Conditional probability दुनिया को छोटा करती है। P(B | A) सिर्फ़ A के अंदर निकाली जाती है। हर (denominator) P(A) बनता है, 1 नहीं।
条件概率缩小了世界。P(B | A) 只在 A 内部计算,分母变成 P(A),而不是 1。
7
Mutually exclusive ≠ independent. Events that cannot happen together are strongly dependent.
Mutually exclusive ≠ independent। जो events साथ नहीं हो सकते, वे बहुत dependent हैं।
互斥 ≠ 独立。不能同时发生的事件是强烈相依的。
8
Choose the right meaning of probability. Symmetric games → classical. Lots of repeatable data → frequentist. One-time events or updating beliefs → Bayesian.
Probability का सही अर्थ चुनें। सममित खेल → classical। बहुत सारा दोहराया जा सकने वाला data → frequentist। एक बार की घटनाएँ या विश्वास update → Bayesian।
选对概率的含义。对称游戏 → 古典;大量可重复数据 → 频率;一次性事件或更新信念 → 贝叶斯。
9
Draw it. A tree or a Venn diagram makes sample spaces, overlaps and conditions concrete, and catches errors that algebra hides.
चित्र बनाएँ। Tree या Venn diagram sample spaces, overlaps और शर्तों को ठोस बनाता है, और वे ग़लतियाँ पकड़ता है जो algebra में छिप जाती हैं।
画出来。树状图或维恩图让样本空间、重叠和条件变得具体,能发现代数中隐藏的错误。
10
Rare conditions need Bayes. A 99% sensitive and 99% specific test for a condition affecting 0.1% of people gives P(condition | positive) of only about 9%. Ignoring the prior is one of the most dangerous mistakes in medicine, law and machine learning.
दुर्लभ स्थितियों के लिए Bayes ज़रूरी। 0.1% लोगों में पाई जाने वाली स्थिति के लिए 99% sensitive और 99% specific test भी P(स्थिति | positive) सिर्फ़ लगभग 9% देता है। Prior को नज़रअंदाज़ करना चिकित्सा, क़ानून और machine learning की सबसे ख़तरनाक ग़लतियों में से एक है।
罕见情况必须用贝叶斯。对患病率 0.1% 的情况,即便检测灵敏度和特异度都是 99%,P(患病 | 阳性) 也只有约 9%。忽视先验是医学、法律和机器学习中最危险的错误之一。
🧮
You've Built the Foundationआपने बुनियाद बना ली你已打好基础

Sample spaces define what can happen. Events pick out the outcomes you care about. The classical, frequentist and Bayesian views give probability its meaning. Three axioms lead to the addition, complement and multiplication rules, and from them come conditional probability, independence and Bayes' theorem. With these you are ready for random variables, distributions and statistical inference.

Sample spaces बताते हैं कि क्या हो सकता है। Events उन नतीजों को चुनते हैं जिनकी आपको परवाह है। Classical, frequentist और Bayesian नज़रिए probability को अर्थ देते हैं। तीन axioms से addition, complement और multiplication rules निकलते हैं, और उनसे conditional probability, independence और Bayes' theorem। इनके साथ आप random variables, distributions और statistical inference के लिए तैयार हैं।

样本空间规定了可能发生什么,事件挑出你关心的结果。古典、频率和贝叶斯观点赋予概率含义。三条公理推出加法、对立和乘法法则,进而得到条件概率、独立性和贝叶斯定理。掌握这些,你就可以学习随机变量、概率分布和统计推断了。