Probability概率
Sub-topics 4.5, 4.6, 4.11 (SL core) and 4.13 (AHL, HL only) of IB AA HL Topic 4. Sample spaces, combined events, conditional probability, independence, Bayes' theorem.
IB AA HL Topic 4 的子主题 4.5、4.6、4.11(SL 核心内容)以及 4.13(AHL,仅 HL)。覆盖样本空间(sample space)、复合事件(combined events)、条件概率(conditional probability)、独立性(independent events)以及贝叶斯定理(Bayes' theorem)。
Unit Cram Cheat-Sheet单元速记小抄
Core (SL 4.5, 4.6, 4.11; SL and HL):核心内容(SL 4.5、4.6、4.11;SL 与 HL 共同):
$$ P(A) = \frac{n(A)}{n(U)} \qquad 0 \le P(A) \le 1 \qquad P(A') = 1 - P(A) $$ $$ P(A \cup B) = P(A) + P(B) - P(A \cap B) $$ $$ \text{Mutually exclusive: } P(A \cap B) = 0,\;\; P(A \cup B) = P(A) + P(B) $$ $$ P(A \mid B) = \frac{P(A \cap B)}{P(B)} \quad (P(B) > 0) $$ $$ \text{Independent: } P(A \cap B) = P(A)\,P(B) \;\Longleftrightarrow\; P(A \mid B) = P(A) $$ $$ \text{Expected number of occurrences of } A \text{ in } n \text{ trials} = n\,P(A) $$HL only (AHL 4.13: Bayes' theorem, up to 3 events):仅 HL(AHL 4.13:贝叶斯定理,最多 3 个事件):
$$ P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{\displaystyle\sum_{j} P(B \mid A_j)\,P(A_j)} \quad \text{for partition } \{A_1, A_2, A_3\} $$Decision tree: "and" between events → intersection (multiply if independent, otherwise use a conditional probability); "or" → union (subtract the overlap unless mutually exclusive); "given" → conditional probability.
关键词决策树:事件之间出现"and"(且)→ 交集(intersection)(独立就相乘,否则用条件概率);"or"(或)→ 并集(union)(除非互斥,否则要减去重叠);"given"(在……条件下)→ 条件概率。
HL: "reverse the conditional" → Bayes' theorem.HL:要"反转条件" → 贝叶斯定理。
Sample Spaces and Events样本空间与事件 SL 4.5
- Define trial, outcome, sample space $U$ and event, and state the range $0 \le P(A) \le 1$.
- List a sample space systematically (ordered pairs, a table or a list) and state $n(U)$.
- Calculate $P(A) = \frac{n(A)}{n(U)}$ when outcomes are equally likely, and state that assumption.
- Explain why outcomes such as "the sum of two dice" are not equally likely.
- Estimate a probability from a relative frequency when outcomes are not equally likely.
- 定义(
define)试验、结果、样本空间 $U$ 和事件,并写出(state)取值范围 $0 \le P(A) \le 1$。 - 系统地列出(
list)样本空间(有序对、表格或列表),并写出 $n(U)$。 - 在结果等可能时计算(
calculate)$P(A) = \frac{n(A)}{n(U)}$,并写明这一假设。 - 解释(
explain)为什么"两枚骰子之和"这类结果不是等可能的。 - 结果不等可能时,用相对频率(
relative frequency)估计(estimate)概率。
trial)指随机实验的一次执行;可能的单个结果称为结果(outcome);所有结果的集合就是样本空间(sample space)$U$;事件(event)$A$ 是 $U$ 的一个子集。当所有结果是等可能的(equally likely outcomes)时,
$$ P(A) = \frac{n(A)}{n(U)}, $$
其中 $n(\cdot)$ 表示元素个数。概率(probability)取值在 $[0, 1]$ 之间。必然事件概率为 $1$,不可能事件概率为 $0$。
Valid whenever all outcomes in $U$ are equally likely. If they aren't, fall back to relative frequency: $P(A) \approx \dfrac{\text{number of times } A \text{ occurs}}{\text{number of trials}}$ as the number of trials grows large.
前提是 $U$ 中所有结果等可能。若不等可能,则退而求其次用相对频率(relative frequency)估计:当试验次数足够大时,$P(A) \approx \dfrac{\text{number of times } A \text{ occurs}}{\text{number of trials}}$。
Outcome. A single element of $U$ (HEADS, the integer $4$, the queen of spades).
Sample space $U$. The set of all outcomes. For one die: $U = \{1, 2, 3, 4, 5, 6\}$, $n(U) = 6$.
Event. A subset of $U$. "Even score on a die" is $A = \{2, 4, 6\}$, $n(A) = 3$.
Equally likely. Each outcome has the same probability $1/n(U)$. State this assumption explicitly when you use $P(A) = n(A)/n(U)$.
Relative frequency. Empirical estimate from observed data; it motivates the idea of probability, but give exact answers wherever the outcomes are equally likely. 试验(
trial)。 一次执行(抛一次硬币、掷一次骰子、抽一张牌)。结果(
outcome)。 $U$ 中的单个元素(HEADS、整数 $4$、黑桃皇后)。样本空间 $U$(
sample space)。 所有结果组成的集合。掷一次骰子:$U = \{1, 2, 3, 4, 5, 6\}$,$n(U) = 6$。事件(
event)。 $U$ 的子集。"骰子点数为偶数"对应 $A = \{2, 4, 6\}$,$n(A) = 3$。等可能(
equally likely)。 每个结果概率都等于 $1/n(U)$。每次用 $P(A) = n(A)/n(U)$ 都要明示这条假设。相对频率(
relative frequency)。 来自观测数据的经验估计;它用来引出概率的概念,但只要结果等可能,就要给出精确答案。
Worked Example: Two dice, sum equals 7例题:两骰之和为 7
Problem: Two fair six-sided dice are rolled. Find the probability the sum is $7$.
Sample space. Ordered pairs $(d_1, d_2)$ with each $d_i \in \{1, \ldots, 6\}$, so $n(U) = 36$. Each pair is equally likely.
Event. Sum $= 7$ gives $A = \{(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)\}$, $n(A) = 6$.
$$ P(A) = \frac{6}{36} = \frac{1}{6}. $$题目:掷两枚均匀的六面骰子。求两数之和为 $7$ 的概率。
样本空间。有序对 $(d_1, d_2)$,其中每个 $d_i \in \{1, \ldots, 6\}$,所以 $n(U) = 36$,每一对等可能。
事件。"和为 $7$"对应 $A = \{(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)\}$,$n(A) = 6$。
$$ P(A) = \frac{6}{36} = \frac{1}{6}. $$Worked Example: Drawing a card例题:抽一张牌
Problem: One card is drawn from a standard $52$-card deck. What is the probability the card is a face card (J, Q, K)?
$n(U) = 52$. Face cards: $3$ ranks $\times$ $4$ suits $= 12$. So $n(A) = 12$ and
$$ P(A) = \frac{12}{52} = \frac{3}{13}. $$Notice we keep the answer as an exact fraction: Paper 1 allows no technology, and $\frac{3}{13}$ is exact, while a decimal such as $0.231$ is only a rounded value.
题目:从一副标准 $52$ 张牌中抽一张。求抽到人头牌(J、Q、K)的概率。
$n(U) = 52$。人头牌:$3$ 种点数 $\times$ $4$ 种花色 $= 12$ 张。所以 $n(A) = 12$,
$$ P(A) = \frac{12}{52} = \frac{3}{13}. $$注意答案保留为精确分数:Paper 1 不允许使用技术工具,$\frac{3}{13}$ 是精确值,而 $0.231$ 这样的小数只是近似值。
▸ Going deeper: The three Kolmogorov axioms深入:柯尔莫哥洛夫三公理
Every probability statement in IB AA HL ultimately rests on three axioms:
Axiom 1 (non-negativity). $P(A) \ge 0$ for every event $A$.
Axiom 2 (unit measure). $P(U) = 1$.
Axiom 3 (additivity for disjoint events). If $A \cap B = \varnothing$, then $P(A \cup B) = P(A) + P(B)$.
The complement rule, the addition rule for overlapping events, and the bounds $0 \le P(A) \le 1$ are all derived from these three. For instance, $P(A) + P(A') = P(U) = 1$ follows from Axiom 3 (since $A$ and $A'$ are disjoint and their union is $U$) and Axiom 2.
When a "show that" question asks you to justify a step, quoting "by the addition rule for mutually exclusive events" is exactly Axiom 3 in disguise.
IB AA HL 中所有概率陈述最终都建立在三条公理之上:
公理 1(非负性)。对任意事件 $A$,$P(A) \ge 0$。
公理 2(规范性)。$P(U) = 1$。
公理 3(互斥事件可加性)。若 $A \cap B = \varnothing$,则 $P(A \cup B) = P(A) + P(B)$。
补集(complement)法则、可重叠事件的加法定律(addition rule),以及 $0 \le P(A) \le 1$ 都是从这三条推导而来。例如 $P(A) + P(A') = P(U) = 1$,就是先用公理 3($A$ 与 $A'$ 互斥且并起来等于 $U$),再用公理 2 得到的。
当 "show that" 题要你说明某一步的依据时,写 "by the addition rule for mutually exclusive events" 实际上就是公理 3 的另一种表达。
For two dice or two coins, write the sample space as ordered pairs, so $n(U) = 36$ for two dice, not $21$ unordered pairs or $11$ possible sums. Say "the outcomes are equally likely" before you divide $n(A)$ by $n(U)$, and leave the answer as an exact fraction such as $\frac{1}{6}$ unless the question asks for a decimal.
两枚骰子或两枚硬币时,把样本空间写成有序对,所以两枚骰子的 $n(U) = 36$,不是 $21$ 个无序对,也不是 $11$ 种可能的和。用 $n(A)$ 除以 $n(U)$ 之前,先写明"结果等可能"(equally likely),除非题目要求小数,否则答案保留为 $\frac{1}{6}$ 这样的精确分数。
A fair coin is tossed three times. List the sample space, state $n(U)$, and find $P(\text{exactly two heads})$.一枚均匀硬币抛三次。列出样本空间,写出 $n(U)$,并求 $P(\text{exactly two heads})$。
$U = \{HHH, HHT, HTH, THH, HTT, THT, TTH, TTT\}$, so $n(U) = 8$, all equally likely. Exactly two heads: $HHT, HTH, THH$, so $P = \frac{3}{8}$.
$U = \{HHH, HHT, HTH, THH, HTT, THT, TTH, TTT\}$,所以 $n(U) = 8$,各结果等可能。恰好两次正面:$HHT, HTH, THH$,所以 $P = \frac{3}{8}$。
Two fair dice are rolled. Find the probability that the product of the scores is $6$.掷两枚均匀骰子。求两数之积为 $6$ 的概率。
Ordered pairs with product $6$: $(1,6), (6,1), (2,3), (3,2)$, so $n(A) = 4$. With $n(U) = 36$ equally likely pairs, $P = \frac{4}{36} = \frac{1}{9}$.
积为 $6$ 的有序对:$(1,6), (6,1), (2,3), (3,2)$,所以 $n(A) = 4$。$n(U) = 36$ 个有序对等可能,$P = \frac{4}{36} = \frac{1}{9}$。
A student says: "The sum of two dice can be any of the $11$ values $2$ to $12$, so $P(\text{sum} = 7) = \frac{1}{11}$." Explain the error and give the correct value.一名学生说:"两枚骰子之和可取 $2$ 到 $12$ 共 $11$ 个值,所以 $P(\text{sum} = 7) = \frac{1}{11}$。"指出错误并给出正确值。
The $11$ sums are not equally likely: a sum of $2$ arises from one ordered pair, a sum of $7$ from six. The equally likely outcomes are the $36$ ordered pairs, so $P(\text{sum} = 7) = \frac{6}{36} = \frac{1}{6}$.
这 $11$ 个和并不等可能:和为 $2$ 只来自一个有序对,和为 $7$ 来自六个。等可能的结果是 $36$ 个有序对,所以 $P(\text{sum} = 7) = \frac{6}{36} = \frac{1}{6}$。
A drawing pin is dropped $400$ times and lands point up $132$ times. Estimate $P(\text{point up})$, and say why $\frac{n(A)}{n(U)}$ cannot be used here.一枚图钉被丢 $400$ 次,其中 $132$ 次针尖朝上。估计 $P(\text{point up})$,并说明为什么这里不能用 $\frac{n(A)}{n(U)}$。
Relative frequency: $\frac{132}{400} = 0.33$. The two outcomes (point up, point down) are not equally likely, so the classical formula would wrongly give $\frac{1}{2}$; the estimate improves as the number of trials grows.
相对频率:$\frac{132}{400} = 0.33$。两个结果(针尖朝上、朝下)并不等可能,用古典公式会错误地得到 $\frac{1}{2}$;试验次数越多,估计越可靠。
Complementary Events and Expected Frequency互补事件与期望频数 SL 4.5
- Define the complementary event $A'$ and state $P(A') = 1 - P(A)$.
- Recognise "at least one" and "not" wording and calculate it as $1 - P(\text{none})$.
- Calculate the expected number of occurrences of $A$ in $n$ trials as $n\,P(A)$.
- Explain why an expected frequency need not be a whole number and is not a prediction of the exact count.
- Find an unknown probability from an expected frequency.
- 定义(
define)互补事件 $A'$,并写出(state)$P(A') = 1 - P(A)$。 - 识别"至少一个"与"不发生"的说法,并按 $1 - P(\text{none})$ 计算(
calculate)。 - 计算 $n$ 次试验中 $A$ 发生次数的期望 $n\,P(A)$。
- 解释(
explain)为什么期望频数不必是整数,也不是对实际次数的预测。 - 由期望频数反求(
find)未知概率。
complement)$A'$ 包含所有不属于 $A$ 的结果:
$$ P(A') = 1 - P(A). $$
当题目问"$P(\text{at least one})$"(至少一个)或"$P(\text{not } X)$"(不发生 $X$)时,从补集入手通常比直接枚举更快。对 $n$ 次独立试验(independent events),$A$ 发生次数的期望(expected number of occurrences)为 $n\,P(A)$。
Worked Example: At least one of something例题:至少出现一次
Problem: A bag contains $5$ red and $3$ blue marbles. Three marbles are drawn without replacement. Find $P(\text{at least one blue})$.
Use the complement. "At least one blue" $=$ NOT "all red":
$$ P(\text{all red}) = \frac{5}{8} \cdot \frac{4}{7} \cdot \frac{3}{6} = \frac{60}{336} = \frac{5}{28}. $$ $$ P(\text{at least one blue}) = 1 - \frac{5}{28} = \frac{23}{28}. $$题目:袋中有 $5$ 个红球与 $3$ 个蓝球。不放回地抽 $3$ 个球。求 $P(\text{at least one blue})$(至少一个蓝球)。
用补集。"至少一个蓝球" $=$ "不全是红球"的补:
$$ P(\text{all red}) = \frac{5}{8} \cdot \frac{4}{7} \cdot \frac{3}{6} = \frac{60}{336} = \frac{5}{28}. $$ $$ P(\text{at least one blue}) = 1 - \frac{5}{28} = \frac{23}{28}. $$Worked Example: Expected frequency例题:期望频数
Problem: A spinner shows red with probability $0.3$. It is spun $200$ times. How many times is it expected to land on red?
The expected number of occurrences is $n\,P(A)$:
$$ E = 200 \times 0.3 = 60. $$This is the theoretical expectation, not a prediction of the exact count. In a real $200$-spin trial the count will fluctuate around $60$.
题目:一个旋转盘指向红色的概率为 $0.3$。共旋转 $200$ 次。期望落在红色上的次数是多少?
期望发生次数(expected number of occurrences)等于 $n\,P(A)$:
这是理论期望,不是对实际次数的预测。在真实的 $200$ 次试验中,实际计数会在 $60$ 附近波动。
▸ Going deeper: Why $E = nP(A)$深入:为什么 $E = nP(A)$
Let $X_i$ be the indicator of $A$ on trial $i$ ($X_i = 1$ if $A$ occurs, $0$ otherwise). Then $E[X_i] = 1 \cdot P(A) + 0 \cdot P(A') = P(A)$. The total count $X = X_1 + X_2 + \cdots + X_n$ has expectation
$$ E[X] = E[X_1] + E[X_2] + \cdots + E[X_n] = n\,P(A), $$using linearity of expectation. Linearity holds even when the $X_i$ are not independent, which is why $E[X] = nP(A)$ also works for drawing without replacement (where each trial has the same marginal probability $P(A)$ even though the trials are dependent). This is what a question means when it says "in the long run."
设 $X_i$ 为第 $i$ 次试验中 $A$ 的指示函数($A$ 发生则 $X_i = 1$,否则为 $0$)。则 $E[X_i] = 1 \cdot P(A) + 0 \cdot P(A') = P(A)$。总计数 $X = X_1 + X_2 + \cdots + X_n$ 的期望为
$$ E[X] = E[X_1] + E[X_2] + \cdots + E[X_n] = n\,P(A), $$这用到了期望的线性性。即便 $X_i$ 不独立,线性性仍然成立。这就是为什么 $E[X] = nP(A)$ 对"不放回抽样"同样适用:虽然各次试验相互依赖,但每次的边际概率仍为 $P(A)$。题目里出现 "in the long run"(长期来看)的提法时,正是这个意思。
When you use the complement, write the line that names it, such as $P(\text{at least one blue}) = 1 - P(\text{no blue})$, before any numbers, so the method is visible. For an expected frequency, give $n\,P(A)$ exactly as calculated (for example $33.3$ or $\frac{100}{3}$); do not round it to a whole number, because it is an average, not a count.
用补集时,先写出说明所用补集的那一行,如 $P(\text{at least one blue}) = 1 - P(\text{no blue})$,再代入数字,让方法清晰可见。期望频数按 $n\,P(A)$ 的计算结果原样给出(如 $33.3$ 或 $\frac{100}{3}$);不要取整,因为它是平均值,不是计数。
$P(A) = 0.35$. Find $P(A')$.$P(A) = 0.35$。求 $P(A')$。
$A$ and $A'$ are mutually exclusive and together make up $U$, so $P(A') = 1 - 0.35 = 0.65$.
$A$ 与 $A'$ 互斥,合起来就是 $U$,所以 $P(A') = 1 - 0.35 = 0.65$。
A fair die is rolled $3$ times. Find $P(\text{at least one six})$ as an exact fraction.均匀骰子掷 $3$ 次。用精确分数求 $P(\text{at least one six})$。
$P(\text{no six}) = \left(\frac{5}{6}\right)^3 = \frac{125}{216}$, so $P(\text{at least one six}) = 1 - \frac{125}{216} = \frac{91}{216}$.
$P(\text{no six}) = \left(\frac{5}{6}\right)^3 = \frac{125}{216}$,所以 $P(\text{at least one six}) = 1 - \frac{125}{216} = \frac{91}{216}$。
A fair die is rolled $150$ times. Find the expected number of scores greater than $4$.均匀骰子掷 $150$ 次。求点数大于 $4$ 的期望次数。
$P(\text{score} > 4) = P(\{5, 6\}) = \frac{2}{6} = \frac{1}{3}$, so the expected number is $150 \times \frac{1}{3} = 50$.
$P(\text{score} > 4) = P(\{5, 6\}) = \frac{2}{6} = \frac{1}{3}$,所以期望次数为 $150 \times \frac{1}{3} = 50$。
A machine produces faulty items with probability $p$. In a batch of $400$ items, the expected number of faulty items is $14$. Find $p$, then the expected number of non-faulty items.一台机器产出次品的概率为 $p$。在 $400$ 件的一批产品中,次品的期望件数为 $14$。求 $p$,再求合格品的期望件数。
$400p = 14$, so $p = \frac{14}{400} = 0.035$. Non-faulty has probability $1 - 0.035 = 0.965$, so the expected number is $400 \times 0.965 = 386$ (check: $386 + 14 = 400$).
$400p = 14$,所以 $p = \frac{14}{400} = 0.035$。合格品概率为 $1 - 0.035 = 0.965$,期望件数为 $400 \times 0.965 = 386$(验算:$386 + 14 = 400$)。
Combined Events and the Addition Rule复合事件与加法定律 SL 4.6
- Interpret "and" as the intersection $A \cap B$ and "or" as the union $A \cup B$.
- State and apply the addition rule $P(A \cup B) = P(A) + P(B) - P(A \cap B)$.
- Define mutually exclusive events and use $P(A \cup B) = P(A) + P(B)$ for them.
- Calculate any one of $P(A)$, $P(B)$, $P(A \cap B)$, $P(A \cup B)$ from the other three.
- Deduce whether given probabilities are consistent with the events being mutually exclusive.
- 把"and"理解为交集 $A \cap B$,把"or"理解为并集 $A \cup B$。
- 写出(
state)并应用加法定律 $P(A \cup B) = P(A) + P(B) - P(A \cap B)$。 - 定义(
define)互斥事件(mutually exclusive events),并对其使用 $P(A \cup B) = P(A) + P(B)$。 - 已知 $P(A)$、$P(B)$、$P(A \cap B)$、$P(A \cup B)$ 中的三个,计算(
calculate)第四个。 - 推断(
deduce)给定概率是否与"事件互斥"相容。
mutually exclusive events,不能同时发生)时,$P(A \cap B) = 0$,公式简化为 $P(A) + P(B)$。读题时盯紧关键词:"and"(交,intersection)、"or"(并,union)。
Mutually exclusive. $A$ and $B$ cannot both occur. $P(A \cap B) = 0$.
Independent. Knowing one does not change the probability of the other. $P(A \cap B) = P(A)\,P(B)$.
Two non-trivial events ($P(A), P(B) > 0$) cannot be both mutually exclusive and independent: if they were exclusive then $P(A\cap B) = 0 \ne P(A)P(B)$. 这两个词常被混淆,但描述的是不同的事情:一个说明事件能否同时发生,另一个说明一个事件是否改变另一个事件的概率。
互斥(
mutually exclusive)。$A$ 与 $B$ 不能同时发生。$P(A \cap B) = 0$。独立(
independent)。知道其中一个发生与否,不会改变另一个的概率。$P(A \cap B) = P(A)\,P(B)$。若两个事件概率都不为零($P(A), P(B) > 0$),它们不可能既互斥又独立:若互斥则 $P(A\cap B) = 0 \ne P(A)P(B)$。
Worked Example: Card from a deck例题:从一副牌中抽一张
Problem: One card is drawn from a standard deck. Let $A = \{\text{card is a heart}\}$, $B = \{\text{card is a face card}\}$. Find $P(A \cup B)$.
$P(A) = 13/52$, $P(B) = 12/52$. Overlap (hearts that are face cards): J$\heartsuit$, Q$\heartsuit$, K$\heartsuit$, so $P(A \cap B) = 3/52$.
$$ P(A \cup B) = \frac{13}{52} + \frac{12}{52} - \frac{3}{52} = \frac{22}{52} = \frac{11}{26}. $$题目:从标准 52 张牌中抽一张。设 $A = \{\text{card is a heart}\}$(红心),$B = \{\text{card is a face card}\}$(人头牌)。求 $P(A \cup B)$。
$P(A) = 13/52$,$P(B) = 12/52$。重叠部分(既是红心又是人头牌):J$\heartsuit$、Q$\heartsuit$、K$\heartsuit$,因此 $P(A \cap B) = 3/52$。
$$ P(A \cup B) = \frac{13}{52} + \frac{12}{52} - \frac{3}{52} = \frac{22}{52} = \frac{11}{26}. $$Worked Example: Disjoint cases例题:互斥情形
Problem: A single ball is drawn from an urn containing $4$ red, $6$ green and $5$ blue balls. Find $P(\text{red or green})$.
Red and green are mutually exclusive (the ball has one colour), so:
$$ P(R \cup G) = P(R) + P(G) = \frac{4}{15} + \frac{6}{15} = \frac{10}{15} = \frac{2}{3}. $$Equivalently, complement of blue: $1 - 5/15 = 2/3$.
题目:从装有 $4$ 红、$6$ 绿、$5$ 蓝共 $15$ 个球的瓮中抽一个球。求 $P(\text{red or green})$。
红与绿互斥(一个球只有一种颜色),所以:
$$ P(R \cup G) = P(R) + P(G) = \frac{4}{15} + \frac{6}{15} = \frac{10}{15} = \frac{2}{3}. $$等价做法:取蓝色的补集,$1 - 5/15 = 2/3$。
▸ Going deeper: Inclusion-exclusion for three events深入:三事件的容斥原理
The two-event addition rule generalizes. For three events,
$$ P(A \cup B \cup C) = P(A) + P(B) + P(C) - P(A \cap B) - P(A \cap C) - P(B \cap C) + P(A \cap B \cap C). $$Reading. Add the singletons, subtract every pairwise overlap (each was added twice in the singletons but should appear once), then add back the triple overlap (it was added three times and subtracted three times, so we need it once more). This pattern is called inclusion-exclusion; it is easiest to see on a three-circle Venn diagram.
Example. Of $100$ students, $50$ study French ($F$), $40$ study Spanish ($S$), $30$ study German ($G$). $20$ study French and Spanish, $15$ French and German, $10$ Spanish and German; $5$ study all three. How many study at least one language?
$$ |F \cup S \cup G| = 50 + 40 + 30 - 20 - 15 - 10 + 5 = 80. $$So $80$ study at least one and $20$ study none.
两事件加法定律可以推广。对于三事件,
$$ P(A \cup B \cup C) = P(A) + P(B) + P(C) - P(A \cap B) - P(A \cap C) - P(B \cap C) + P(A \cap B \cap C). $$解读:先加单个事件,再减去每一对的两两重叠(每对在单个加和里被算了两次,应保留一次),最后加回三者的共同部分(在前两步里被加三次、减三次,需要再加一次)。这就是容斥原理(inclusion-exclusion),在三圆韦恩图上最容易看清。
示例:$100$ 名学生中,$50$ 学法语 ($F$),$40$ 学西语 ($S$),$30$ 学德语 ($G$)。$20$ 同时学法、西,$15$ 同时学法、德,$10$ 同时学西、德,$5$ 三种都学。问至少学一门的有多少人?
$$ |F \cup S \cup G| = 50 + 40 + 30 - 20 - 15 - 10 + 5 = 80. $$所以有 $80$ 人至少学一门,$20$ 人一门都没学。
Write the addition rule in symbols first, then substitute: $P(A \cup B) = P(A) + P(B) - P(A \cap B)$. Drop the $P(A \cap B)$ term only after you have stated why it is $0$ ("$A$ and $B$ are mutually exclusive"). Check that every answer lies in $[0, 1]$: a union larger than $1$, or an intersection larger than either single probability, means the overlap was handled wrongly.
先用符号写出加法定律,再代入:$P(A \cup B) = P(A) + P(B) - P(A \cap B)$。只有在说明了 $P(A \cap B)$ 为何等于 $0$("$A$ 与 $B$ 互斥")之后,才能去掉这一项。检查每个答案都在 $[0, 1]$ 内:并集概率大于 $1$,或交集概率大于某个单独事件的概率,说明重叠部分处理错了。
$P(A) = 0.45$, $P(B) = 0.3$ and $P(A \cup B) = 0.6$. Find $P(A \cap B)$.$P(A) = 0.45$,$P(B) = 0.3$,$P(A \cup B) = 0.6$。求 $P(A \cap B)$。
Rearrange the addition rule: $P(A \cap B) = P(A) + P(B) - P(A \cup B) = 0.45 + 0.3 - 0.6 = 0.15$.
把加法定律变形:$P(A \cap B) = P(A) + P(B) - P(A \cup B) = 0.45 + 0.3 - 0.6 = 0.15$。
$A$ and $B$ are mutually exclusive with $P(A) = 0.25$ and $P(B) = 0.4$. Find $P(A \cup B)$ and $P(A' \cap B')$.$A$ 与 $B$ 互斥,$P(A) = 0.25$,$P(B) = 0.4$。求 $P(A \cup B)$ 与 $P(A' \cap B')$。
Mutually exclusive, so $P(A \cup B) = 0.25 + 0.4 = 0.65$. "Neither" is the complement of the union: $P(A' \cap B') = 1 - 0.65 = 0.35$.
互斥,所以 $P(A \cup B) = 0.25 + 0.4 = 0.65$。"两者都不发生"是并集的补集:$P(A' \cap B') = 1 - 0.65 = 0.35$。
Can events with $P(A) = 0.7$ and $P(B) = 0.6$ be mutually exclusive? Explain.$P(A) = 0.7$、$P(B) = 0.6$ 的两个事件能否互斥?说明理由。
No. If they were, $P(A \cup B) = 0.7 + 0.6 = 1.3 > 1$, which is impossible. Since $P(A \cup B) \le 1$, the addition rule gives $P(A \cap B) \ge 0.7 + 0.6 - 1 = 0.3$, so they must overlap.
不能。若互斥,则 $P(A \cup B) = 0.7 + 0.6 = 1.3 > 1$,不可能。由于 $P(A \cup B) \le 1$,加法定律给出 $P(A \cap B) \ge 0.7 + 0.6 - 1 = 0.3$,所以两者必有重叠。
One card is drawn from a standard $52$-card deck. Find $P(\text{red or a king})$.从标准 $52$ 张牌中抽一张。求 $P(\text{red or a king})$(红色或 K)。
$P(\text{red}) = \frac{26}{52}$, $P(\text{king}) = \frac{4}{52}$, and the two red kings give $P(\text{red and king}) = \frac{2}{52}$. So $P = \frac{26 + 4 - 2}{52} = \frac{28}{52} = \frac{7}{13}$.
$P(\text{red}) = \frac{26}{52}$,$P(\text{king}) = \frac{4}{52}$,红色的 K 有两张,$P(\text{red and king}) = \frac{2}{52}$。所以 $P = \frac{26 + 4 - 2}{52} = \frac{28}{52} = \frac{7}{13}$。
Venn, Tree, and Sample-Space Diagrams韦恩图、树状图与样本空间表 SL 4.6
- Choose a Venn diagram, a tree diagram or a sample-space table to suit the structure of a problem.
- Draw a two-event Venn diagram with the intersection filled first, and check that the four regions total $1$ (or $n(U)$).
- Draw a tree diagram for two stages, with and without replacement, and check that the branches from each node sum to $1$.
- Calculate probabilities by multiplying along paths and adding over the paths that make up the event.
- Use a sample-space table to count equally likely outcomes of two trials.
- 按题目结构选用(
choose)韦恩图、树状图或样本空间表。 - 画出(
draw)两事件韦恩图,先填交集,并检查四个区域之和为 $1$(或 $n(U)$)。 - 画出有放回与不放回的两阶段树状图(
tree diagram),并检查每个节点的分支之和为 $1$。 - 沿路径相乘、对构成事件的各路径求和,计算(
calculate)概率。 - 用样本空间表数出两次试验中等可能的结果。
Tree diagram: sequential events; multiply along branches, add over leaves.
Sample-space table: two independent trials with small outcome sets (dice, coins).
Draw the correct diagram before computing: it organises the information and makes a wrong number easy to spot. 韦恩图(
Venn diagram):事件之间存在重叠,按区域读计数或概率。树状图(
tree diagram):顺序发生的事件;沿分支相乘,按叶子求和。样本空间表(
sample-space table):两次独立试验且结果集合较小(骰子、硬币)。计算前先画出正确的图:它能整理信息,也让错误的数字一眼可见。
Venn diagram: two events韦恩图:两个事件
Worked Example: Completing a Venn diagram from probabilities例题:由概率补全韦恩图
Problem: Events $A$ and $B$ satisfy $P(A) = 0.5$, $P(B) = 0.45$ and $P(A \cup B) = 0.75$. Complete a Venn diagram, then find $P(\text{exactly one of } A, B)$ and $P(A' \cap B')$.
Step 1: the intersection first. By the addition rule,
$$ P(A \cap B) = P(A) + P(B) - P(A \cup B) = 0.5 + 0.45 - 0.75 = 0.2. $$Step 2: the other regions by subtraction. $A$ only $= 0.5 - 0.2 = 0.3$; $B$ only $= 0.45 - 0.2 = 0.25$; neither $= 1 - 0.75 = 0.25$. Check: $0.3 + 0.2 + 0.25 + 0.25 = 1$. These are the values in Figure 1.
Step 3: read off.
$$ P(\text{exactly one}) = 0.3 + 0.25 = 0.55, \qquad P(A' \cap B') = 0.25. $$Why this works: the four regions are mutually exclusive and fill $U$, so their probabilities add, and every event built from $A$ and $B$ is a union of regions.
题目:事件 $A$、$B$ 满足 $P(A) = 0.5$、$P(B) = 0.45$、$P(A \cup B) = 0.75$。补全韦恩图,再求 $P(\text{exactly one of } A, B)$(恰好发生一个)和 $P(A' \cap B')$。
第 1 步:先求交集。由加法定律,
$$ P(A \cap B) = P(A) + P(B) - P(A \cup B) = 0.5 + 0.45 - 0.75 = 0.2. $$第 2 步:用减法求其余区域。只属于 $A$ $= 0.5 - 0.2 = 0.3$;只属于 $B$ $= 0.45 - 0.2 = 0.25$;都不属于 $= 1 - 0.75 = 0.25$。验算:$0.3 + 0.2 + 0.25 + 0.25 = 1$。这就是图 1 中的数值。
第 3 步:读图。
$$ P(\text{exactly one}) = 0.3 + 0.25 = 0.55, \qquad P(A' \cap B') = 0.25. $$为什么可行:四个区域两两互斥且合起来就是 $U$,所以它们的概率可以相加;由 $A$、$B$ 构成的任何事件都是若干区域的并。
Sample-space table: two dice样本空间表:两枚骰子
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Each of the $36$ cells is equally likely. Read off probabilities by counting cells: $P(\text{sum} = 7) = 6/36 = 1/6$; $P(\text{sum} \ge 10) = 6/36 = 1/6$; $P(\text{sum is prime}) = 15/36 = 5/12$.
$36$ 个格子每一个都等可能。数格子就能直接读概率:$P(\text{sum} = 7) = 6/36 = 1/6$;$P(\text{sum} \ge 10) = 6/36 = 1/6$;$P(\text{sum is prime}) = 15/36 = 5/12$。
Tree diagram: two-stage experiment树状图:两阶段试验
Bag: $3$ red, $2$ blue. Draw two without replacement.
袋中:$3$ 红、$2$ 蓝。不放回地抽两个。
-
Draw 1第 1 次: R ($3/5$)
- Draw 2第 2 次: R ($2/4$) → RR : $3/5 \cdot 2/4 = 6/20$
- Draw 2第 2 次: B ($2/4$) → RB : $3/5 \cdot 2/4 = 6/20$
-
Draw 1第 1 次: B ($2/5$)
- Draw 2第 2 次: R ($3/4$) → BR : $2/5 \cdot 3/4 = 6/20$
- Draw 2第 2 次: B ($1/4$) → BB : $2/5 \cdot 1/4 = 2/20$
Leaves sum to $6/20 + 6/20 + 6/20 + 2/20 = 20/20 = 1$.
叶子概率之和 $6/20 + 6/20 + 6/20 + 2/20 = 20/20 = 1$。
Multiply along a path. Each leaf probability is the product of the branches that reach it.
Add over leaves. To find $P(\text{event})$, sum the leaf probabilities for every path that satisfies the event.
For with replacement, every branch repeats the same probabilities. For without replacement, the second-stage probabilities depend on the first-stage outcome (as above). 同一节点的分支之和为 $1$。动手计算前先核对:一个分支错,后面的叶子全错。
沿路径相乘。每个叶子的概率等于到达它所经过的所有分支概率的乘积。
按叶子求和。要算 $P(\text{event})$,把满足该事件的所有路径的叶子概率相加。
有放回(with replacement)时,各分支概率重复出现;不放回(without replacement)时,第二阶段的概率取决于第一阶段的结果(如上图所示)。
Worked Example: Tree, two-colour draw例题:树状图,两色抽取
Problem: Using the bag $3$ R, $2$ B above, find $P(\text{exactly one red})$.
"Exactly one red" $=$ RB or BR, two leaves:
$$ P(\text{exactly one R}) = \frac{6}{20} + \frac{6}{20} = \frac{12}{20} = \frac{3}{5}. $$题目:沿用上面的袋子($3$ R、$2$ B),求 $P(\text{exactly one red})$(恰好一个红球)。
"恰好一红" $=$ RB 或 BR,共两片叶子:
$$ P(\text{exactly one R}) = \frac{6}{20} + \frac{6}{20} = \frac{12}{20} = \frac{3}{5}. $$▸ Going deeper: Why tree diagrams encode the multiplication rule深入:树状图为何对应乘法定律
A path from root to leaf is a sequence of outcomes. The probability that all of those outcomes happen is, by the multiplication rule for conditional probabilities (chain rule),
$$ P(E_1 \cap E_2 \cap \cdots \cap E_k) = P(E_1)\,P(E_2 \mid E_1)\,P(E_3 \mid E_1 \cap E_2)\cdots $$Each branch probability is exactly the conditional one needed for the next step. Multiplying along the path therefore gives the joint probability of that whole path. Summing over disjoint paths gives the probability of any union of paths, and every event on a tree diagram is such a union.
从根到叶的一条路径就是一串结果。这些结果全部发生的概率,由条件概率的乘法定律(链式法则,chain rule)给出:
每条分支的概率正好是下一步所需的条件概率。因此沿路径相乘就得到这条路径的联合概率。把若干条互斥路径的概率相加,就得到任意路径并的概率,而树状图上的每个事件都是这样的路径之并。
Label every branch of a tree with its probability and write each leaf product at the end of its path; check that the branches from each node sum to $1$. For "without replacement", the second-stage denominators drop by one. In a Venn diagram, write the intersection first and confirm the four regions total $1$ (or $n(U)$) before answering. If a question says "draw" or "complete" a diagram, the diagram itself is part of the answer.
树状图的每条分支都标上概率,并在每条路径末端写出叶子乘积;检查每个节点的分支之和为 $1$。"不放回"(without replacement)时,第二阶段的分母减一。韦恩图先写交集,作答前确认四个区域之和为 $1$(或 $n(U)$)。若题目要求"画出"(draw)或"补全"(complete)图,图本身就是答案的一部分。
A bag holds $3$ red and $2$ blue marbles. Two are drawn with replacement. Find $P(\text{both the same colour})$.袋中有 $3$ 个红球、$2$ 个蓝球。有放回地抽两次。求 $P(\text{both the same colour})$(两次同色)。
With replacement the branches repeat: $P(RR) = \left(\frac{3}{5}\right)^2 = \frac{9}{25}$ and $P(BB) = \left(\frac{2}{5}\right)^2 = \frac{4}{25}$. Add the two leaves: $\frac{13}{25}$.
有放回时分支概率重复:$P(RR) = \left(\frac{3}{5}\right)^2 = \frac{9}{25}$,$P(BB) = \left(\frac{2}{5}\right)^2 = \frac{4}{25}$。两片叶子相加:$\frac{13}{25}$。
In a class of $30$, $18$ study art, $15$ study music and $5$ study neither. Find how many study both, and the probability that a randomly chosen student studies exactly one.某班 $30$ 人,$18$ 人学美术,$15$ 人学音乐,$5$ 人两者都不学。求两者都学的人数,以及随机选一名学生恰好学其中一门的概率。
$n(A \cup M) = 30 - 5 = 25$, so $n(A \cap M) = 18 + 15 - 25 = 8$. Art only $= 10$, music only $= 7$ (check: $10 + 8 + 7 + 5 = 30$). $P(\text{exactly one}) = \frac{17}{30}$.
$n(A \cup M) = 30 - 5 = 25$,所以 $n(A \cap M) = 18 + 15 - 25 = 8$。只学美术 $= 10$,只学音乐 $= 7$(验算:$10 + 8 + 7 + 5 = 30$)。$P(\text{exactly one}) = \frac{17}{30}$。
Two fair dice are rolled. Use a sample-space table to find the probability that the scores differ by exactly $1$.掷两枚均匀骰子。用样本空间表求两数之差恰为 $1$ 的概率。
The cells next to the main diagonal: $(1,2), (2,1), (2,3), (3,2), (3,4), (4,3), (4,5), (5,4), (5,6), (6,5)$, which is $10$ of $36$ cells. $P = \frac{10}{36} = \frac{5}{18}$.
紧挨主对角线的格子:$(1,2), (2,1), (2,3), (3,2), (3,4), (4,3), (4,5), (5,4), (5,6), (6,5)$,共 $36$ 格中的 $10$ 格。$P = \frac{10}{36} = \frac{5}{18}$。
The probability of rain on Monday is $0.3$. If it rains on Monday, the probability of rain on Tuesday is $0.6$; otherwise it is $0.2$. Draw a tree and find $P(\text{rain on exactly one of the two days})$.周一下雨的概率为 $0.3$。若周一下雨,周二下雨的概率为 $0.6$;否则为 $0.2$。画树状图,求 $P(\text{rain on exactly one of the two days})$(恰好一天下雨)。
Branches: Monday rain $0.3$, dry $0.7$; after rain, Tuesday rain $0.6$, dry $0.4$; after dry, rain $0.2$, dry $0.8$. Exactly one day: rain then dry $0.3 \times 0.4 = 0.12$, plus dry then rain $0.7 \times 0.2 = 0.14$, total $0.26$.
分支:周一下雨 $0.3$,不下 $0.7$;周一下雨后,周二下雨 $0.6$,不下 $0.4$;周一不下后,周二下雨 $0.2$,不下 $0.8$。恰好一天:先雨后晴 $0.3 \times 0.4 = 0.12$,加先晴后雨 $0.7 \times 0.2 = 0.14$,共 $0.26$。
Conditional Probability条件概率 SL 4.6 / 4.11
- State the definition $P(A \mid B) = \frac{P(A \cap B)}{P(B)}$ and the condition $P(B) > 0$.
- Identify the given event from wording such as "given that", "if" and "of those who".
- Calculate a conditional probability from a two-way table, a Venn diagram or a tree diagram by restricting the sample space.
- Use the multiplication rule $P(A \cap B) = P(B)\,P(A \mid B)$, including draws without replacement.
- Explain why $P(A \mid B)$ and $P(B \mid A)$ are in general different.
- 写出(
state)定义 $P(A \mid B) = \frac{P(A \cap B)}{P(B)}$ 及条件 $P(B) > 0$。 - 从"given that"、"if"、"of those who"等说法中识别(
identify)作为条件的事件。 - 通过缩减样本空间,从双向表、韦恩图或树状图计算(
calculate)条件概率。 - 使用乘法定律 $P(A \cap B) = P(B)\,P(A \mid B)$,包括不放回抽取。
- 解释(
explain)为什么 $P(A \mid B)$ 与 $P(B \mid A)$ 一般不相等。
Worked Example: Two-way table例题:双向表
Problem: A school surveys $200$ students about sports preferences:
| Soccer (S) | Not soccer ($S'$) | Total | |
|---|---|---|---|
| Boys (B) | 60 | 40 | 100 |
| Girls (B') | 30 | 70 | 100 |
| Total | 90 | 110 | 200 |
A student is chosen at random. Find (a) $P(S \mid B)$ and (b) $P(B \mid S)$.
(a) Restrict to boys ($n = 100$); $60$ of them prefer soccer:
$$ P(S \mid B) = \frac{60}{100} = \frac{3}{5}. $$(b) Restrict to soccer ($n = 90$); $60$ of them are boys:
$$ P(B \mid S) = \frac{60}{90} = \frac{2}{3}. $$Note that $P(S \mid B) \ne P(B \mid S)$: the order of the conditional matters. At HL this reversal is the starting point of Bayes' theorem (Section 2.7).
题目:某校对 $200$ 名学生做体育偏好调查:
| Soccer (S) | Not soccer ($S'$) | Total | |
|---|---|---|---|
| Boys (B) | 60 | 40 | 100 |
| Girls (B') | 30 | 70 | 100 |
| Total | 90 | 110 | 200 |
随机选一名学生。求 (a) $P(S \mid B)$ 与 (b) $P(B \mid S)$。
(a) 限制到男生($n = 100$),其中 $60$ 人喜欢足球:
$$ P(S \mid B) = \frac{60}{100} = \frac{3}{5}. $$(b) 限制到喜欢足球的学生($n = 90$),其中 $60$ 人是男生:
$$ P(B \mid S) = \frac{60}{90} = \frac{2}{3}. $$注意 $P(S \mid B) \ne P(B \mid S)$:条件的方向至关重要。在 HL 中,这种反转正是贝叶斯定理(Bayes' theorem)的起点(见 2.7 节)。
Worked Example: From the formula例题:直接套公式
Problem: $P(A) = 0.6$, $P(B) = 0.4$, $P(A \cap B) = 0.24$. Find $P(A \mid B)$ and $P(B \mid A)$.
$$ P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{0.24}{0.4} = 0.6, $$ $$ P(B \mid A) = \frac{P(A \cap B)}{P(A)} = \frac{0.24}{0.6} = 0.4. $$Notice $P(A \mid B) = P(A)$ and $P(B \mid A) = P(B)$, so the events are independent. (Equivalent check: $P(A)P(B) = 0.24 = P(A \cap B)$.)
题目:$P(A) = 0.6$,$P(B) = 0.4$,$P(A \cap B) = 0.24$。求 $P(A \mid B)$ 与 $P(B \mid A)$。
$$ P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{0.24}{0.4} = 0.6, $$ $$ P(B \mid A) = \frac{P(A \cap B)}{P(A)} = \frac{0.24}{0.6} = 0.4. $$注意到 $P(A \mid B) = P(A)$、$P(B \mid A) = P(B)$,所以两个事件相互独立。(等价验证:$P(A)P(B) = 0.24 = P(A \cap B)$。)
▸ Going deeper: The multiplication rule and the chain rule深入:乘法定律与链式法则
Rearranging the conditional formula gives the multiplication rule:
$$ P(A \cap B) = P(B)\,P(A \mid B). $$By symmetry, the same intersection equals $P(A)\,P(B \mid A)$. Equating the two gives the HL result Bayes' theorem in its smallest form (see Section 2.7).
Extending to three events:
$$ P(A \cap B \cap C) = P(A)\,P(B \mid A)\,P(C \mid A \cap B). $$This is the chain rule and it underwrites every tree diagram: each branch probability is a conditional, and a leaf is a product of conditionals along its path.
把条件概率公式整理一下就是乘法定律:
$$ P(A \cap B) = P(B)\,P(A \mid B). $$由对称性,该交集也等于 $P(A)\,P(B \mid A)$。令两者相等,就得到 HL 内容贝叶斯定理(Bayes' theorem)的最小形式(见 2.7 节)。
推广到三个事件:
$$ P(A \cap B \cap C) = P(A)\,P(B \mid A)\,P(C \mid A \cap B). $$这就是链式法则(chain rule),也是每张树状图背后的原理:每条分支概率都是一个条件概率,每片叶子就是这条路径上所有条件概率的乘积。
Before substituting, write the definition with the given event in the denominator, for example $P(S \mid B) = \frac{P(S \cap B)}{P(B)}$. The given event follows the words "given that", "if" or "of those who". From a two-way table, the denominator is the row or column total of the given event, never the grand total. A conditional probability can never exceed $1$, and $P(A \mid B) = P(B \mid A)$ only when $P(A) = P(B)$ (or the intersection is empty).
代入数字前,先写出定义,并把作为条件的事件放在分母,如 $P(S \mid B) = \frac{P(S \cap B)}{P(B)}$。条件事件跟在"given that"、"if"或"of those who"之后。用双向表时,分母是条件事件所在行或列的合计,绝不是总计。条件概率不会超过 $1$;只有当 $P(A) = P(B)$(或交集为空)时,才有 $P(A \mid B) = P(B \mid A)$。
Using the two-way table above, find the probability that a student is a girl, given that the student does not prefer soccer.用上面的双向表,求在学生不喜欢足球的条件下,该学生是女生的概率。
Restrict to the $S'$ column: $110$ students, of whom $70$ are girls. $P(B' \mid S') = \frac{70}{110} = \frac{7}{11}$.
限制到 $S'$ 这一列:共 $110$ 人,其中 $70$ 人是女生。$P(B' \mid S') = \frac{70}{110} = \frac{7}{11}$。
$P(A) = 0.5$, $P(B) = 0.4$ and $P(A \cap B) = 0.1$. Find $P(A \mid B)$, $P(B \mid A)$ and $P(A' \mid B)$.$P(A) = 0.5$,$P(B) = 0.4$,$P(A \cap B) = 0.1$。求 $P(A \mid B)$、$P(B \mid A)$ 与 $P(A' \mid B)$。
$P(A \mid B) = \frac{0.1}{0.4} = 0.25$; $P(B \mid A) = \frac{0.1}{0.5} = 0.2$; within $B$ the complement rule still holds, so $P(A' \mid B) = 1 - 0.25 = 0.75$.
$P(A \mid B) = \frac{0.1}{0.4} = 0.25$;$P(B \mid A) = \frac{0.1}{0.5} = 0.2$;在 $B$ 内补集法则仍成立,所以 $P(A' \mid B) = 1 - 0.25 = 0.75$。
Two fair dice are rolled. Find the probability that the sum is $8$, given that at least one die shows a $6$.掷两枚均匀骰子。已知至少有一枚是 $6$,求两数之和为 $8$ 的概率。
"At least one $6$" has $6 + 6 - 1 = 11$ equally likely ordered pairs. Of these, the sum is $8$ for $(2,6)$ and $(6,2)$. So $P = \frac{2}{11}$.
"至少一个 $6$"共有 $6 + 6 - 1 = 11$ 个等可能的有序对。其中和为 $8$ 的是 $(2,6)$ 和 $(6,2)$。所以 $P = \frac{2}{11}$。
Two cards are drawn from a standard $52$-card deck without replacement. Find $P(\text{second is an ace} \mid \text{first is an ace})$ and $P(\text{both aces})$.从标准 $52$ 张牌中不放回地抽两张。求 $P(\text{second is an ace} \mid \text{first is an ace})$ 与 $P(\text{both aces})$。
After one ace is removed, $3$ aces remain among $51$ cards: $P = \frac{3}{51} = \frac{1}{17}$. Multiplication rule: $P(\text{both aces}) = \frac{4}{52} \times \frac{3}{51} = \frac{12}{2652} = \frac{1}{221}$.
取走一张 A 后,$51$ 张牌中还剩 $3$ 张 A:$P = \frac{3}{51} = \frac{1}{17}$。乘法定律:$P(\text{both aces}) = \frac{4}{52} \times \frac{3}{51} = \frac{12}{2652} = \frac{1}{221}$。
Independent Events独立事件 SL 4.6 / 4.11
- State the definition: $A$ and $B$ are independent if and only if $P(A \cap B) = P(A)\,P(B)$.
- Show that two events are, or are not, independent by calculating both sides of that equation.
- Use the equivalent test $P(A \mid B) = P(A)$ when $P(B) > 0$.
- Distinguish independent events from mutually exclusive events, and explain why two mutually exclusive events with non-zero probabilities are dependent.
- Calculate probabilities for repeated independent trials, including with replacement.
- 写出(
state)定义:$A$ 与 $B$ 独立当且仅当 $P(A \cap B) = P(A)\,P(B)$。 - 计算该等式两边,证明(
show that)两个事件独立或不独立。 - 当 $P(B) > 0$ 时使用等价判定 $P(A \mid B) = P(A)$。
- 区分(
distinguish)独立事件与互斥事件,并解释为什么两个概率都不为零的互斥事件是相依的。 - 计算(
calculate)重复独立试验(包括有放回抽取)的概率。
independent events)是一种数值意义上的性质:必须把等式算出来验证,单凭"看起来没关系"是不能下结论的。
Independence is not "disjoint." Two disjoint non-trivial events are dependent, not independent (knowing one happened tells you the other did not).
With replacement ⇒ independent across trials. Without replacement ⇒ dependent.
"Show that $A$ and $B$ are independent" means compute both sides of $P(A)P(B) = P(A \cap B)$ and confirm equality. 独立不等于"不同事件"。从一张牌中抽到 K 与抽到红心是独立事件($P(K \cap H) = 1/52 = (4/52)(13/52)$ ✓),尽管它们看似"不同"。
独立不等于互斥。两个互不相交且概率都不为零的事件其实是相依的,不是独立的(知道一个发生,就立刻知道另一个一定没发生)。
有放回 ⇒ 各次试验相互独立;不放回 ⇒ 相依。
"Show that $A$ and $B$ are independent"(证明 $A$ 与 $B$ 独立)就是要把 $P(A)P(B)$ 与 $P(A \cap B)$ 都算出来,确认两边相等。
Worked Example: Verifying independence例题:验证独立性
Problem: A single card is drawn from a $52$-card deck. Let $A = \{\text{ace}\}$, $B = \{\text{spade}\}$. Are $A$ and $B$ independent?
$P(A) = 4/52 = 1/13$; $P(B) = 13/52 = 1/4$; $P(A \cap B) = P(\text{ace of spades}) = 1/52$. Check:
$$ P(A)\,P(B) = \frac{1}{13} \cdot \frac{1}{4} = \frac{1}{52} = P(A \cap B). $$So $A$ and $B$ are independent.
题目:从 $52$ 张牌中抽一张。设 $A = \{\text{ace}\}$(A 牌),$B = \{\text{spade}\}$(黑桃)。问 $A$、$B$ 是否独立?
$P(A) = 4/52 = 1/13$;$P(B) = 13/52 = 1/4$;$P(A \cap B) = P(\text{ace of spades}) = 1/52$。验证:
$$ P(A)\,P(B) = \frac{1}{13} \cdot \frac{1}{4} = \frac{1}{52} = P(A \cap B). $$因此 $A$、$B$ 独立。
Worked Example: Sequential independent trials例题:序贯独立试验
Problem: A biased coin shows heads with probability $0.6$. It is tossed three times. Find $P(\text{exactly two heads})$.
Each toss is independent. Three orderings of two heads: HHT, HTH, THH. Each has probability $0.6 \cdot 0.6 \cdot 0.4 = 0.144$.
$$ P(\text{exactly 2 H}) = 3 \cdot 0.144 = 0.432. $$This is the binomial probability $\binom{3}{2}\,p^2\,(1-p)^{1} = 3 \cdot 0.36 \cdot 0.4 = 0.432$, the bridge to Unit D3.
题目:一枚有偏硬币正面朝上概率为 $0.6$。抛 3 次。求 $P(\text{exactly two heads})$(恰好两次正面)。
各次抛掷相互独立。"两正一反"有三种排列:HHT、HTH、THH,每种概率都是 $0.6 \cdot 0.6 \cdot 0.4 = 0.144$。
$$ P(\text{exactly 2 H}) = 3 \cdot 0.144 = 0.432. $$这其实就是二项概率 $\binom{3}{2}\,p^2\,(1-p)^{1} = 3 \cdot 0.36 \cdot 0.4 = 0.432$,这是通向 D3 单元的桥梁。
▸ Going deeper: Pairwise vs. mutual independence深入:两两独立与相互独立
For three or more events, pairwise independence ($P(A_i \cap A_j) = P(A_i)P(A_j)$ for every pair) is not the same as mutual independence (every subset factors). This guide works with the two-event criterion only; the three-event case is extension material, but the counterexample below is worth knowing.
Counterexample. Toss two fair coins. Let $A = \{\text{first is H}\}$, $B = \{\text{second is H}\}$, $C = \{\text{exactly one H}\}$. Then $P(A) = P(B) = P(C) = 1/2$ and every pairwise intersection equals $1/4 = (1/2)(1/2)$. But $A \cap B \cap C = \varnothing$ (if both are H, you don't have exactly one), so $P(A \cap B \cap C) = 0 \ne 1/8$. Pairwise yes, mutually no.
当涉及三个或更多事件时,两两独立(任意一对都满足 $P(A_i \cap A_j) = P(A_i)P(A_j)$)不等于相互独立(任意子集的概率都等于各事件概率之积)。本指南只使用两事件判定;三事件的情形属于拓展内容,但下面的反例值得知道。
反例:抛两枚均匀硬币。设 $A = \{\text{first is H}\}$、$B = \{\text{second is H}\}$、$C = \{\text{exactly one H}\}$。则 $P(A) = P(B) = P(C) = 1/2$,且任何两两交集都等于 $1/4 = (1/2)(1/2)$。但 $A \cap B \cap C = \varnothing$(若两次都正面,就不可能恰好一次正面),所以 $P(A \cap B \cap C) = 0 \ne 1/8$。两两独立成立,相互独立不成立。
For "show that $A$ and $B$ are independent", calculate $P(A)\,P(B)$ and $P(A \cap B)$ separately, show they are equal, and write the conclusion in words. Use $P(A \cap B) = P(A)\,P(B)$ to find an intersection only when the question states independence (or the trials are with replacement); otherwise use the addition rule or a conditional probability. Never write "independent" when you mean "mutually exclusive".
对"证明 $A$ 与 $B$ 独立"(show that),分别算出 $P(A)\,P(B)$ 与 $P(A \cap B)$,说明二者相等,再用文字写出结论。只有题目说明独立(或有放回试验)时,才能用 $P(A \cap B) = P(A)\,P(B)$ 求交集;否则用加法定律或条件概率。不要把"互斥"(mutually exclusive)写成"独立"(independent)。
$P(A) = 0.4$, $P(B) = 0.25$ and $P(A \cap B) = 0.1$. Are $A$ and $B$ independent? Find $P(A \cup B)$.$P(A) = 0.4$,$P(B) = 0.25$,$P(A \cap B) = 0.1$。$A$ 与 $B$ 是否独立?求 $P(A \cup B)$。
$P(A)\,P(B) = 0.4 \times 0.25 = 0.1 = P(A \cap B)$, so $A$ and $B$ are independent. $P(A \cup B) = 0.4 + 0.25 - 0.1 = 0.55$.
$P(A)\,P(B) = 0.4 \times 0.25 = 0.1 = P(A \cap B)$,所以 $A$ 与 $B$ 独立。$P(A \cup B) = 0.4 + 0.25 - 0.1 = 0.55$。
Using the soccer two-way table in Section 2.5, are "boy" and "prefers soccer" independent?用 2.5 节的足球双向表判断,"男生"与"喜欢足球"是否独立?
$P(S) = \frac{90}{200} = 0.45$ but $P(S \mid B) = \frac{60}{100} = 0.6$. Since $P(S \mid B) \ne P(S)$, they are not independent. (Equivalently $P(B)\,P(S) = 0.5 \times 0.45 = 0.225 \ne 0.3 = P(B \cap S)$.)
$P(S) = \frac{90}{200} = 0.45$,但 $P(S \mid B) = \frac{60}{100} = 0.6$。由于 $P(S \mid B) \ne P(S)$,二者不独立。(等价地,$P(B)\,P(S) = 0.5 \times 0.45 = 0.225 \ne 0.3 = P(B \cap S)$。)
$A$ and $B$ are mutually exclusive with $P(A) = 0.2$ and $P(B) = 0.3$. Are they independent?$A$ 与 $B$ 互斥,$P(A) = 0.2$,$P(B) = 0.3$。它们独立吗?
No. Mutually exclusive gives $P(A \cap B) = 0$, but $P(A)\,P(B) = 0.06 \ne 0$. Knowing $A$ happened tells you $B$ did not, so the events are dependent.
不独立。互斥给出 $P(A \cap B) = 0$,但 $P(A)\,P(B) = 0.06 \ne 0$。知道 $A$ 发生就知道 $B$ 没有发生,所以两事件相依。
$A$ and $B$ are independent with $P(A) = 0.3$ and $P(B) = 0.6$. Find $P(A \cap B')$ and $P(A' \cap B')$.$A$ 与 $B$ 独立,$P(A) = 0.3$,$P(B) = 0.6$。求 $P(A \cap B')$ 与 $P(A' \cap B')$。
$P(A \cap B') = P(A) - P(A \cap B) = 0.3 - 0.18 = 0.12$, which equals $0.3 \times 0.4$. $P(A' \cap B') = 1 - P(A \cup B) = 1 - (0.3 + 0.6 - 0.18) = 0.28$, which equals $0.7 \times 0.4$: the complements of independent events are also independent.
$P(A \cap B') = P(A) - P(A \cap B) = 0.3 - 0.18 = 0.12$,正好等于 $0.3 \times 0.4$。$P(A' \cap B') = 1 - P(A \cup B) = 1 - (0.3 + 0.6 - 0.18) = 0.28$,正好等于 $0.7 \times 0.4$:独立事件的补事件也相互独立。
Bayes' Theorem贝叶斯定理 AHL 4.13 HL
- State Bayes' theorem for a partition $\{A, A'\}$ and for a partition $\{A_1, A_2, A_3\}$.
- Calculate $P(B)$ with the law of total probability, $P(B) = \sum_j P(B \mid A_j)\,P(A_j)$.
- Identify the prior $P(A_i)$, the likelihood $P(B \mid A_i)$ and the posterior $P(A_i \mid B)$ in a context.
- Calculate a reversed conditional probability from a tree diagram whose first branches are the partition.
- Explain why a small prior can give a small posterior even when the likelihood is large (false positives).
- 写出(
state)划分 $\{A, A'\}$ 与划分 $\{A_1, A_2, A_3\}$ 下的贝叶斯定理。 - 用全概率公式(
law of total probability)$P(B) = \sum_j P(B \mid A_j)\,P(A_j)$ 计算(calculate)$P(B)$。 - 在情境中识别(
identify)先验 $P(A_i)$、似然 $P(B \mid A_i)$ 与后验 $P(A_i \mid B)$。 - 由第一层分支为划分的树状图,计算反向的条件概率。
- 解释(
explain)为什么即使似然很大,先验很小时后验仍可能很小(假阳性,false positive)。
partition)$\{A_1, A_2, A_3\}$ 与任意满足 $P(B) > 0$ 的事件 $B$,
$$ P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{\displaystyle\sum_{j} P(B \mid A_j)\,P(A_j)}. $$
本指南中贝叶斯定理(Bayes' theorem)的划分最多含三个事件。分子是联合概率 $P(A_i \cap B) = P(B\mid A_i)P(A_i)$;分母是全概率 $P(B)$,在所有 $A_j$ 上求和。
For two events ($\{A, A'\}$):
对两个事件的划分($\{A, A'\}$):
$$ P(A \mid B) = \frac{P(B \mid A)\,P(A)}{P(B \mid A)\,P(A) + P(B \mid A')\,P(A')} $$Setup ritual. Identify the partition $\{A_1, \ldots, A_k\}$ (the causes). Write the prior $P(A_i)$ for each. Write the likelihood $P(B \mid A_i)$ for each. Plug into the formula. 题目给的是正向条件概率,如 $P(\text{positive test} \mid \text{disease})$、$P(\text{defect} \mid \text{factory})$ 或 $P(\text{spam word} \mid \text{spam})$,而问的是反向:$P(\text{disease} \mid \text{positive test})$、$P(\text{factory} \mid \text{defect})$、$P(\text{spam} \mid \text{contains word})$。只要题目问"已知一个[下游观察],求 $P([\text{upstream cause}])$(上游原因)",答案就是贝叶斯。
套路化设定:先确定划分 $\{A_1, \ldots, A_k\}$(即所有可能"原因")。为每个原因写出先验(
prior)$P(A_i)$。再写出每个的似然(likelihood)$P(B \mid A_i)$。最后代入公式。
Worked Example: Medical test (two events)例题:医学检测(两个事件)
Problem: A disease affects $1\%$ of a population. A test has $95\%$ sensitivity ($P(+ \mid D) = 0.95$) and $90\%$ specificity ($P(- \mid D') = 0.90$, so $P(+ \mid D') = 0.10$). A randomly chosen person tests positive. Find $P(D \mid +)$.
Partition: $\{D, D'\}$ with priors $P(D) = 0.01$, $P(D') = 0.99$.
Likelihoods: $P(+ \mid D) = 0.95$, $P(+ \mid D') = 0.10$.
Total probability of testing positive:
$$ P(+) = P(+ \mid D)P(D) + P(+ \mid D')P(D') = (0.95)(0.01) + (0.10)(0.99) = 0.0095 + 0.099 = 0.1085. $$Bayes:
$$ P(D \mid +) = \frac{(0.95)(0.01)}{0.1085} = \frac{0.0095}{0.1085} = \frac{19}{217} \approx 0.0876. $$Even a $95\%$-sensitive test on a rare disease gives only about $8.8\%$ posterior: the base rate dominates. This is the classic "base-rate" lesson Bayes teaches.
题目:某疾病在人群中患病率为 $1\%$。检测的灵敏度为 $95\%$($P(+ \mid D) = 0.95$),特异度为 $90\%$($P(- \mid D') = 0.90$,故 $P(+ \mid D') = 0.10$)。随机选一人检测呈阳性,求 $P(D \mid +)$。
划分:$\{D, D'\}$,先验 $P(D) = 0.01$,$P(D') = 0.99$。
似然:$P(+ \mid D) = 0.95$,$P(+ \mid D') = 0.10$。
检测呈阳性的全概率(law of total probability):
贝叶斯:
$$ P(D \mid +) = \frac{(0.95)(0.01)}{0.1085} = \frac{0.0095}{0.1085} = \frac{19}{217} \approx 0.0876. $$对一种罕见病,即便检测灵敏度高达 $95\%$,后验(posterior)也只有约 $8.8\%$:基线患病率才是主导因素。这正是贝叶斯告诉我们的"基率"经典教训。
Worked Example: Three factories例题:三家工厂
Problem: A company sources widgets from three factories: $A_1$ supplies $50\%$, $A_2$ supplies $30\%$, $A_3$ supplies $20\%$. The defect rates are $1\%$, $2\%$, $5\%$ respectively. A widget is selected at random and found to be defective ($B$). Find $P(A_2 \mid B)$.
Partition: $\{A_1, A_2, A_3\}$ with $P(A_1) = 0.5$, $P(A_2) = 0.3$, $P(A_3) = 0.2$.
Likelihoods: $P(B \mid A_1) = 0.01$, $P(B \mid A_2) = 0.02$, $P(B \mid A_3) = 0.05$.
Total probability of a defective widget:
$$ P(B) = (0.01)(0.5) + (0.02)(0.3) + (0.05)(0.2) = 0.005 + 0.006 + 0.010 = 0.021. $$Posterior for factory 2:
$$ P(A_2 \mid B) = \frac{(0.02)(0.3)}{0.021} = \frac{0.006}{0.021} = \frac{6}{21} = \frac{2}{7}. $$So about $28.6\%$ of defective widgets come from factory $2$. Sanity check: $P(A_1 \mid B) + P(A_2 \mid B) + P(A_3 \mid B) = 5/21 + 6/21 + 10/21 = 21/21 = 1$. ✓
题目:某公司从三家工厂进货:$A_1$ 占 $50\%$,$A_2$ 占 $30\%$,$A_3$ 占 $20\%$。三家次品率分别为 $1\%$、$2\%$、$5\%$。随机抽一件产品发现是次品($B$),求 $P(A_2 \mid B)$。
划分:$\{A_1, A_2, A_3\}$,$P(A_1) = 0.5$,$P(A_2) = 0.3$,$P(A_3) = 0.2$。
似然:$P(B \mid A_1) = 0.01$,$P(B \mid A_2) = 0.02$,$P(B \mid A_3) = 0.05$。
抽到次品的全概率:
$$ P(B) = (0.01)(0.5) + (0.02)(0.3) + (0.05)(0.2) = 0.005 + 0.006 + 0.010 = 0.021. $$来自工厂 2 的后验:
$$ P(A_2 \mid B) = \frac{(0.02)(0.3)}{0.021} = \frac{0.006}{0.021} = \frac{6}{21} = \frac{2}{7}. $$因此次品中约有 $28.6\%$ 来自工厂 2。验算:$P(A_1 \mid B) + P(A_2 \mid B) + P(A_3 \mid B) = 5/21 + 6/21 + 10/21 = 21/21 = 1$。 ✓
▸ Going deeper: Deriving Bayes from the chain rule深入:从链式法则推导贝叶斯
From the multiplication rule, the joint probability of $A_i$ and $B$ can be written two ways:
$$ P(A_i \cap B) = P(A_i)\,P(B \mid A_i) = P(B)\,P(A_i \mid B). $$Solve for $P(A_i \mid B)$:
$$ P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{P(B)}. $$The denominator $P(B)$ comes from the law of total probability: if $\{A_1, A_2, A_3\}$ partitions $U$ then
$$ P(B) = P(B \cap A_1) + P(B \cap A_2) + P(B \cap A_3) = \sum_j P(B \mid A_j)\,P(A_j). $$Substituting gives the full Bayes formula. This guide stops at three partition elements, but the same derivation generalizes to any number.
由乘法定律,$A_i$ 与 $B$ 的联合概率可以用两种方式写出:
$$ P(A_i \cap B) = P(A_i)\,P(B \mid A_i) = P(B)\,P(A_i \mid B). $$解出 $P(A_i \mid B)$:
$$ P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{P(B)}. $$分母 $P(B)$ 来自全概率公式(law of total probability):若 $\{A_1, A_2, A_3\}$ 是 $U$ 的划分,则
代回去就得到完整的贝叶斯公式。本指南只用到三个划分元素,但同样的推导对任意数量都成立。
▸ Going deeper: "Likelihood times prior" reading深入:把贝叶斯读成"似然 × 先验"
Three pieces of vocabulary worth knowing:
- Prior $P(A_i)$: what you believed about cause $A_i$ before seeing $B$.
- Likelihood $P(B \mid A_i)$: how plausible the observation $B$ is under cause $A_i$.
- Posterior $P(A_i \mid B)$: updated belief about $A_i$ after observing $B$.
The formula reads posterior $\propto$ likelihood $\times$ prior, normalized by the total probability of the evidence. This reading is what makes Bayes intuitive: rare causes (small prior) can still dominate if their likelihood for the evidence is much higher than competitors'; and vice versa, common causes win even with mediocre likelihoods.
有三个词值得记住:
- 先验(
prior)$P(A_i)$:在观察到 $B$ 之前,你对原因 $A_i$ 的信念。 - 似然(
likelihood)$P(B \mid A_i)$:在 $A_i$ 为真的前提下,观察到 $B$ 的合理程度。 - 后验(
posterior)$P(A_i \mid B)$:观察到 $B$ 之后对 $A_i$ 更新过的信念。
公式可以读作 后验 $\propto$ 似然 $\times$ 先验,再用证据的全概率归一化。这个读法让贝叶斯变得直观:罕见原因(先验小)只要其似然远高于其它竞争原因,仍可能在后验中占主导;反过来,常见原因即便似然平平也能胜出。
Draw the tree with the partition (the causes) on the first branches and the evidence on the second, so every number given in the question has a place. Write $P(B)$ as a sum of path products before simplifying, then check that the numerator is exactly one of those terms. If you find several posteriors, they must add to $1$; a posterior is a probability, so it can never exceed $1$.
画树状图时,第一层分支放划分(各个原因),第二层放证据,让题目给出的每个数都有位置。化简前先把 $P(B)$ 写成各路径乘积之和,再检查分子恰好是其中一项。若求了多个后验,它们之和必须为 $1$;后验是概率,不可能超过 $1$。
$P(A) = 0.2$, $P(B \mid A) = 0.9$ and $P(B \mid A') = 0.3$. Find $P(A \mid B)$.$P(A) = 0.2$,$P(B \mid A) = 0.9$,$P(B \mid A') = 0.3$。求 $P(A \mid B)$。
$P(B) = (0.9)(0.2) + (0.3)(0.8) = 0.18 + 0.24 = 0.42$. $P(A \mid B) = \frac{0.18}{0.42} = \frac{3}{7} \approx 0.429$.
$P(B) = (0.9)(0.2) + (0.3)(0.8) = 0.18 + 0.24 = 0.42$。$P(A \mid B) = \frac{0.18}{0.42} = \frac{3}{7} \approx 0.429$。
$5\%$ of a population has a condition. A test is positive for $80\%$ of people with the condition and for $10\%$ of people without it (false positives). Find $P(\text{condition} \mid \text{positive})$.人群中 $5\%$ 患有某种状况。检测对患者有 $80\%$ 呈阳性,对非患者有 $10\%$ 呈阳性(假阳性,false positive)。求 $P(\text{condition} \mid \text{positive})$。
$P(+) = (0.8)(0.05) + (0.1)(0.95) = 0.04 + 0.095 = 0.135$. $P(C \mid +) = \frac{0.04}{0.135} = \frac{8}{27} \approx 0.296$. Most positives come from the much larger group without the condition.
$P(+) = (0.8)(0.05) + (0.1)(0.95) = 0.04 + 0.095 = 0.135$。$P(C \mid +) = \frac{0.04}{0.135} = \frac{8}{27} \approx 0.296$。大部分阳性来自人数多得多的非患者群体。
Machines $M_1$, $M_2$, $M_3$ make $40\%$, $35\%$ and $25\%$ of a factory's output, with fault rates $2\%$, $3\%$ and $4\%$. A faulty item is found. Find the probability it was made by $M_3$.机器 $M_1$、$M_2$、$M_3$ 分别生产工厂产量的 $40\%$、$35\%$、$25\%$,次品率分别为 $2\%$、$3\%$、$4\%$。发现一件次品,求它由 $M_3$ 生产的概率。
$P(F) = (0.02)(0.4) + (0.03)(0.35) + (0.04)(0.25) = 0.008 + 0.0105 + 0.01 = 0.0285$. $P(M_3 \mid F) = \frac{0.01}{0.0285} = \frac{20}{57} \approx 0.351$.
$P(F) = (0.02)(0.4) + (0.03)(0.35) + (0.04)(0.25) = 0.008 + 0.0105 + 0.01 = 0.0285$。$P(M_3 \mid F) = \frac{0.01}{0.0285} = \frac{20}{57} \approx 0.351$。
In the medical-test example, $P(+ \mid D) = 0.95$ but $P(D \mid +) \approx 0.088$. Explain the difference in one sentence.在医学检测例题中,$P(+ \mid D) = 0.95$,而 $P(D \mid +) \approx 0.088$。用一句话解释这种差异。
The prior $P(D) = 0.01$ is so small that the false positives from the $99\%$ without the disease ($0.099$) far outnumber the true positives ($0.0095$), so most people who test positive do not have the disease.
先验 $P(D) = 0.01$ 太小,来自 $99\%$ 非患者的假阳性($0.099$)远多于真阳性($0.0095$),所以检测呈阳性的人大多并未患病。
Exam Strategy & Common Pitfalls考试策略与常见陷阱
- $P(A) = n(A)/n(U)$ and $P(A') = 1 - P(A)$
- $P(A) = n(A)/n(U)$ 与 $P(A') = 1 - P(A)$
- $P(A \cup B) = P(A) + P(B) - P(A \cap B)$
- $P(A \cup B) = P(A) + P(B) - P(A \cap B)$
- $P(A \mid B) = P(A \cap B)/P(B)$
- $P(A \mid B) = P(A \cap B)/P(B)$
- Independent $\Leftrightarrow P(A \cap B) = P(A)P(B)$
- 独立 $\Leftrightarrow P(A \cap B) = P(A)P(B)$
- $E[\text{occurrences}] = n\,P(A)$
- $E[\text{occurrences}] = n\,P(A)$(期望发生次数)
- Bayes' theorem (up to 3 events) HL
- 贝叶斯定理(最多 3 个事件)HL
- "and" $\to$ intersection; "or" $\to$ union; "given" $\to$ conditional
- "and" $\to$ 交集;"or" $\to$ 并集;"given" $\to$ 条件概率
- Mutually exclusive $\ne$ independent: different ideas
- 互斥 $\ne$ 独立:两者是不同的概念
- Tree diagrams encode the chain rule (multiply along, add across)
- 树状图本质上就是链式法则:沿路径相乘,按叶子相加
- When complement is faster than direct enumeration
- 何时用补集比直接枚举更快
- Why $P(A \mid B) \ne P(B \mid A)$ in general
- 为什么一般 $P(A \mid B) \ne P(B \mid A)$
- Posterior $\propto$ likelihood $\times$ prior (Bayes intuition) HL
- 后验 $\propto$ 似然 $\times$ 先验(贝叶斯直觉)HL
Common Pitfalls常见陷阱
2. Forgetting to subtract the overlap in $P(A \cup B)$ when $A$ and $B$ are not mutually exclusive.
3. Inverting the conditional: writing $P(A \mid B)$ when the question asks for $P(B \mid A)$.
4. Treating "without replacement" trials as independent: the second-stage probabilities change.
5. Not labelling tree branches, then summing the wrong leaves.
6. Filling in a Venn diagram from outside in. Always start with the central intersection.
7. Giving a rounded decimal on Paper 1 (no technology) when the exact fraction is available. 1. 把"互斥(
mutually exclusive)"与"独立(independent)"混为一谈:两个概率都不为零的事件不可能既互斥又独立。2. 当 $A$、$B$ 并非互斥时,$P(A \cup B)$ 忘记减去重叠部分。
3. 把条件方向写反:题目要 $P(B \mid A)$ 却写成 $P(A \mid B)$。
4. 把"不放回"的多次试验当成独立试验:后一阶段的概率会变化。
5. 树状图分支没标好,最后把不该相加的叶子加进去。
6. 韦恩图从外往里填。一律先填中心的交集。
7. 在 Paper 1(不允许使用技术工具)中,能写出精确分数时却给出四舍五入的小数。
8. Forgetting that the denominator is the total probability of the evidence, summed over the whole partition, not just one branch.
8. 忘记分母是证据在整个划分上的全概率,而不是单一分支。
Paper 1 (no technology) and Paper 2 (technology required) each last 2 hours and are each worth 30%; each has a compulsory Section A (short response) and Section B (extended response). Paper 3 (technology required, 1 hour, 20%) has two compulsory extended-response questions. The internal assessment, a mathematical exploration, is the remaining 20%. Practise the tree, Venn and Bayes calculations in this unit by hand with exact fractions, since Paper 1 allows no technology.
Paper 1(不允许使用技术工具)与 Paper 2(要求使用技术工具)各 2 小时,各占 30%;两份试卷都有必答的 Section A(短答)和 Section B(长答)。Paper 3(要求使用技术工具,1 小时,占 20%)有两道必答的长答题。其余 20% 是内部评估(internal assessment),即数学探究(mathematical exploration)。由于 Paper 1 不允许使用技术工具,本单元的树状图、韦恩图和贝叶斯计算都要练到能用精确分数手算。
Paper 1 (no technology) and Paper 2 (technology required) each last 1 hour 30 minutes and are each worth 40%; each has a compulsory Section A (short response) and Section B (extended response). There is no Paper 3 at SL. The internal assessment, a mathematical exploration, is the remaining 20%. Practise the tree, Venn and conditional-probability calculations in this unit by hand with exact fractions, since Paper 1 allows no technology.
Paper 1(不允许使用技术工具)与 Paper 2(要求使用技术工具)各 1 小时 30 分钟,各占 40%;两份试卷都有必答的 Section A(短答)和 Section B(长答)。SL 没有 Paper 3。其余 20% 是内部评估(internal assessment),即数学探究(mathematical exploration)。由于 Paper 1 不允许使用技术工具,本单元的树状图、韦恩图和条件概率计算都要练到能用精确分数手算。
Flashcards闪卡
Multiply along a path
Add across leaves求和为 $1$
沿路径相乘
按叶子相加
then $A$-only, $B$-only
then "neither"先填 $A\cap B$
再填只属于 $A$、只属于 $B$
最后填"都不属于"
Unit D2: Practice QuizD2 单元:练习测验
Ten mixed-difficulty items in IB Paper-style flavour. Your score updates in real time at the top of the page. Aim for 8/10 before exam day. Items labelled (HL) cover AHL 4.13, Bayes' theorem, which is HL only.
10 道难度混合的题目,仿 IB Paper 风格。得分会在页面顶部实时更新。考前目标至少 8/10。标有(HL)的题属于 AHL 4.13 贝叶斯定理,仅 HL 学生需要。
Readiness Checklist备考清单
Click each item you've mastered. Aim for 100% before exam day. Items labelled (HL) are AHL 4.13 (Bayes' theorem) and apply only to HL students.
每掌握一条就点一下。考试前争取 100%。标有(HL)的条目属于 AHL 4.13(贝叶斯定理),仅 HL 学生需要。
- Define trial, outcome, sample space $U$, and event; compute $P(A) = n(A)/n(U)$能定义试验、结果、样本空间 $U$ 与事件,并计算 $P(A) = n(A)/n(U)$ SL 4.5
- Apply the complement rule $P(A') = 1 - P(A)$ and recognize "at least one" cues能用补集法则 $P(A') = 1 - P(A)$,并识别"at least one"的信号 SL 4.5
- Compute the expected number of occurrences in $n$ trials using $n\,P(A)$能用 $n\,P(A)$ 计算 $n$ 次试验中 $A$ 的期望发生次数 SL 4.5
- Apply the addition rule $P(A\cup B) = P(A) + P(B) - P(A\cap B)$ for any two events能对任意两个事件套用加法定律 $P(A\cup B) = P(A) + P(B) - P(A\cap B)$ SL 4.6
- Identify mutually exclusive events and use the collapsed addition rule能识别互斥事件并使用简化版加法定律 SL 4.6
- Build and interpret Venn diagrams; fill in the intersection first能构建并解读韦恩图;一律先填交集 SL 4.6
- Build and interpret tree diagrams; multiply along paths and add over leaves能构建并解读树状图;沿路径相乘、按叶子相加 SL 4.6
- Use sample-space tables for two-trial experiments (dice, coins)能用样本空间表处理两阶段试验(骰子、硬币) SL 4.6
- Apply the conditional probability formula $P(A \mid B) = P(A\cap B)/P(B)$能套用条件概率公式 $P(A \mid B) = P(A\cap B)/P(B)$ SL 4.6
- Read two-way tables and extract conditional probabilities by restricting the sample space能读双向表,并通过限制样本空间得出条件概率 SL 4.6
- Test independence using $P(A \cap B) = P(A)P(B)$ and distinguish it from "mutually exclusive"能用 $P(A \cap B) = P(A)P(B)$ 检验独立,并把它与"互斥"区分开 SL 4.6
- State Bayes' theorem for a partition of up to three events and identify priors / likelihoods / posteriors (HL)能写出最多三事件划分下的贝叶斯定理,并指认先验 / 似然 / 后验(HL) AHL 4.13
- Apply Bayes to two-event problems (e.g. medical tests) and derive the posterior given an observation (HL)能把贝叶斯用于两事件问题(如医学检测),在给定观察下求后验(HL) AHL 4.13
- Apply Bayes to three-event partition problems (e.g. multiple factories / sources) and sanity-check that posteriors sum to $1$ (HL)能把贝叶斯用于三事件划分问题(如多家工厂 / 来源),并验证后验之和为 $1$(HL) AHL 4.13
IB Paper-Style PracticeIB 试卷风格练习
IB exam-style questions in short-response and extended-response formats, with and without technology, including HL-only questions on Bayes' theorem. EMH difficulty mix. Use this after the in-page quiz and flashcards.
IB 考试风格题,包括短答与长答两种形式、可用与不可用技术工具的题目,以及仅限 HL 的贝叶斯定理题。难度按 EMH 分级。建议在做完本页测验与闪卡后再来。
How to use this guide本指南使用说明
How to use this guide本指南使用说明
Read only the Unit Cram Cheat-Sheet at the top and the gold-dashed Cram-Mode Cheat at the head of each section. Memorize four formulas: $P(A) = n(A)/n(U)$, $P(A\cup B) = P(A)+P(B)-P(A\cap B)$, $P(A\mid B) = P(A\cap B)/P(B)$, and (HL) Bayes. Skim one worked example per section. Take the practice quiz.
只看顶部的 Unit Cram Cheat-Sheet(单元速记小抄)和每节开头金色虚线框的 Cram-Mode Cheat。背熟四条公式:$P(A) = n(A)/n(U)$、$P(A\cup B) = P(A)+P(B)-P(A\cap B)$、$P(A\mid B) = P(A\cap B)/P(B)$,以及(HL)贝叶斯定理(Bayes' theorem)。每节扫一道例题,做练习测验。
Read only the Unit Cram Cheat-Sheet at the top and the gold-dashed Cram-Mode Cheat at the head of each section. Memorize three formulas: $P(A) = n(A)/n(U)$, $P(A\cup B) = P(A)+P(B)-P(A\cap B)$ and $P(A\mid B) = P(A\cap B)/P(B)$, plus the independence test $P(A \cap B) = P(A)\,P(B)$. Skim one worked example per section. Take the practice quiz.
只看顶部的 Unit Cram Cheat-Sheet(单元速记小抄)和每节开头金色虚线框的 Cram-Mode Cheat。背熟三条公式:$P(A) = n(A)/n(U)$、$P(A\cup B) = P(A)+P(B)-P(A\cap B)$ 和 $P(A\mid B) = P(A\cap B)/P(B)$,再加上独立性判定 $P(A \cap B) = P(A)\,P(B)$。每节扫一道例题,做练习测验。
Open every ▸ Going deeper. A multi-part probability question can start from a Venn diagram, a tree or a table and then build conditional probability and, at HL, Bayes' theorem on top of it, so practise translating fluently between the diagram and the formula. Practise the HL Bayes partition setup until it is a reflex.
把每个 ▸ Going deeper(深入)都展开。一道多问的概率题可以从韦恩图(Venn diagram)、树状图(tree diagram)或表格出发,再叠加条件概率,HL 还会叠加贝叶斯定理,所以要练到在图与公式之间流畅切换。把 HL 的贝叶斯划分(partition)套路练到下意识。
Open every ▸ Going deeper. A multi-part probability question can start from a Venn diagram, a tree or a table and then build conditional probability and independence on top of it, so practise translating fluently between the diagram and the formula, and practise "show that" independence arguments until they are a reflex.
把每个 ▸ Going deeper(深入)都展开。一道多问的概率题可以从韦恩图(Venn diagram)、树状图(tree diagram)或表格出发,再叠加条件概率与独立性,所以要练到在图与公式之间流畅切换,并把"证明独立"(show that)的论证练到下意识。