Total Probability Theorem | 全概率定理

📚 Total Probability Theorem | 全概率定理

Probability problems in the IB syllabus often involve events that can occur through several distinct scenarios or pathways. The Law of Total Probability gives us a powerful way to break down complex probability calculations into simpler, conditional pieces. By partitioning the sample space into mutually exclusive and exhaustive events, we can express the probability of any event as a weighted average of its conditional probabilities. This theorem appears across many contexts, from picking coloured balls from different bags to interpreting medical test results. In this article, we will explore the statement, proof, applications, and common pitfalls of the Law of Total Probability, preparing you thoroughly for IB Mathematics examinations.

IB课程中的概率问题常常涉及一个事件可以通过若干不同情境或路径发生。全概率定律为我们提供了一种强有力的方法,将复杂的概率计算分解成简单的条件概率片断。通过把样本空间划分成互斥且完备的事件,我们可以把任何事件的概率表示为其条件概率的加权平均值。这个定理出现在众多情境中,从在不同袋子中抽取彩球,到解读医学检测结果。本文中我们将探讨全概率定律的陈述、证明、应用和常见误区,帮助你为IB数学考试做好充分准备。


1. The Core Idea of Total Probability | 全概率的核心思想

When an event A can happen in several different ways, it is natural to add up the probabilities of each way. However, those ways are often described by another set of events that partition the sample space. The Law of Total Probability formalises this intuitive idea. It tells us that if we know how likely each scenario is, and how likely A is within each scenario, we can reconstruct the overall probability of A, even when A and the scenarios are not independent. This is particularly useful in stratified sampling, decision trees, and any situation where an outcome depends on a preceding random choice.

当一个事件A可能以几种不同的方式发生时,很自然的想法就是把每种方式的概率相加。然而,这些方式往往由另一组划分样本空间的事件来描述。全概率定律正是将这一直观想法严格化。它告诉我们,只要知道每种情境的可能性,以及在每种情境下A发生的可能性,我们就能重新构建出A的整体概率,即便A与这些情境并不独立。这一思想在分层抽样、决策树以及任何结果依赖于之前随机选择的情形中都特别有用。


2. Partition of the Sample Space | 样本空间的分割

Formally, a collection of events B1, B2, …, Bn is called a partition of the sample space Ω if they are mutually exclusive (Bi ∩ Bj = ∅ for i ≠ j) and exhaustive (B1 ∪ B2 ∪ … ∪ Bn = Ω). In other words, every outcome belongs to exactly one of the Bi. A simple example is the result of rolling a die: the events “even number” and “odd number” form a partition. For the total probability formula to be applied, the events Bi must form a partition, and we require P(Bi) > 0 for all i, because we will condition on them.

形式上,若事件集合 B1, B2, …, Bn 满足互斥性(当 i ≠ j 时 Bi ∩ Bj = ∅)和完备性(B1 ∪ B2 ∪ … ∪ Bn = Ω),则称它们为样本空间 Ω 的一个分割。换句话说,每一个结果恰好属于其中一个 Bi。一个简单的例子是掷一个骰子:事件“偶数”和“奇数”就构成一个分割。要应用全概率公式,事件 Bi 必须构成一个分割,并且我们需要所有 i 满足 P(Bi) > 0,因为我们将以它们为条件。


3. Statement of the Law | 定律的陈述

Let B1, B2, …, Bn be a partition of the sample space with P(Bi) > 0 for all i. Then for any event A, the total probability of A is given by:

P(A) = Σi=1n P(A | Bi) · P(Bi)

In words, the probability of A is the sum over all partition pieces of the probability of A given that piece, multiplied by the probability of that piece. This formula holds regardless of whether A and the Bi are independent. Many students first encounter this law when using tree diagrams: the total probability of a leaf event is obtained by multiplying along branches and then adding up all paths that lead to that event.

设 B1, B2, …, Bn 是样本空间的一个分割,且对所有 i 有 P(Bi) > 0。那么对于任意事件 A,A 的全概率由下式给出:

P(A) = Σi=1n P(A | Bi) · P(Bi)

用语言表述就是:事件 A 的概率等于对所有分割块,将给定该块下 A 的条件概率与该块的概率相乘,再求和。无论 A 与 Bi 是否独立,这个公式都成立。许多同学第一次接触到这一定律是在使用树形图时:树叶事件的总概率是通过沿着树枝相乘,然后将所有通向该事件的路径相加而得到的。


4. A Simple Proof | 一个简单的证明

Using the definition of conditional probability and the fact that the Bi are mutually exclusive and exhaustive, we can prove the Law of Total Probability in just a few steps. First, note that A can be written as the disjoint union A = (A ∩ B1) ∪ (A ∩ B2) ∪ … ∪ (A ∩ Bn). Because the Bi are disjoint, the intersections A ∩ Bi are also disjoint. Therefore by the addition rule for mutually exclusive events: P(A) = P(A ∩ B1) + P(A ∩ B2) + … + P(A ∩ Bn). Now, by the multiplication rule P(A ∩ Bi) = P(A | Bi) P(Bi). Substituting gives the total probability formula. This proof is often required in IB Analysis and Approaches HL questions.

利用条件概率的定义以及 Bi 互斥且完备的性质,我们可以用几步就证明全概率定律。首先,注意到 A 可以写成无交并的形式:A = (A ∩ B1) ∪ (A ∩ B2) ∪ … ∪ (A ∩ Bn)。因为 Bi 互不相交,所以各交集 A ∩ Bi 也互不相交。于是根据互斥事件的加法法则:P(A) = P(A ∩ B1) + P(A ∩ B2) + … + P(A ∩ Bn)。现在,再利用乘法法则 P(A ∩ Bi) = P(A | Bi) P(Bi)。代入即得到全概率公式。这一证明在 IB 分析与方法 HL 试题中常被要求写出。


5. Connecting with Conditional Probability | 与条件概率的联系

The Law of Total Probability essentially reverses the direction of conditioning. When we know conditional probabilities P(A | Bi) but wish to find the unconditional P(A), the law provides the bridge. This is especially handy when the direct calculation of P(A) is messy, but conditional probabilities are given or easy to compute. In contrast, Bayes’ theorem reverses the flow further: it uses total probability to find P(Bi | A) from the known forward conditionals. Understanding this relationship is a key skill in IB probability, as questions often ask you to apply both laws in sequence.

全概率定律本质上是逆转了条件作用的方向。当我们知道条件概率 P(A | Bi) 却希望求出无条件概率 P(A) 时,全概率定律就搭建了桥梁。当直接计算 P(A) 很繁琐,但条件概率已知或易于计算时,这一定律尤为方便。相对地,贝叶斯定理则进一步逆转了方向:它利用全概率从已知的正向条件概率求出 P(Bi | A)。理解这层关系是 IB 概率部分的关键技能,因为试题常要求你依次运用这两个定律。


6. Tree Diagrams and Total Probability | 树形图与全概率

Tree diagrams offer an excellent visual representation of total probability. The first set of branches represents the partition events Bi with their probabilities. The second set of branches gives the conditional probabilities P(A | Bi) and P(A′ | Bi). To find P(A), you simply multiply along each path that ends in A and add all such products. This is exactly the sum Σ P(A ∩ Bi). IB exams frequently include tree diagram questions where some branch probabilities are missing, and you must use the fact that probabilities on branches from a node sum to 1 to find them.

树形图为全概率提供了极好的可视化表达。第一层分支代表分割事件 Bi 及其概率。第二层分支给出条件概率 P(A | Bi) 和 P(A′ | Bi)。要求出 P(A),只需沿每条以 A 结尾的路径相乘,然后将所有这些乘积相加。这正是求和式 Σ P(A ∩ Bi)。IB 考试中经常出现树形图题目,其中某些分支概率缺失,你必须利用从同一节点出发的各分支概率之和为 1 这一事实求出缺失值。


7. Worked Example: Balls from Two Urns | 典型例题:从两个罐子中取球

Consider two urns. Urn 1 contains 3 red and 2 blue balls. Urn 2 contains 4 red and 1 blue ball. A fair coin is tossed to choose an urn: if heads, we pick from Urn 1; if tails, from Urn 2. We then draw one ball at random from the chosen urn. What is the probability that the drawn ball is red? Let R be the event “red ball”, U1 the event “Urn 1 is chosen”, and U2 “Urn 2 is chosen”. The sample space is partitioned by U1 and U2, with P(U1) = P(U2) = 1/2. The conditional probabilities are P(R | U1) = 3/5 and P(R | U2) = 4/5. Applying the Law of Total Probability: P(R) = P(R | U1)P(U1) + P(R | U2)P(U2) = (3/5)(1/2) + (4/5)(1/2) = 3/10 + 4/10 = 7/10. Therefore the probability of drawing a red ball is 0.7.

考虑两个罐子。罐子 1 装有 3 个红球和 2 个蓝球。罐子 2 装有 4 个红球和 1 个蓝球。抛掷一枚公平硬币来选择罐子:若正面朝上则从罐子 1 中抽取,反面朝上则从罐子 2 中抽取。然后从选中的罐子中随机抽取一球。抽到红球的概率是多少?设 R 为事件“抽到红球”,U1 为“选中罐子 1”,U2 为“选中罐子 2”。样本空间被 U1 和 U2 分割,且有 P(U1) = P(U2) = 1/2。条件概率为 P(R | U1) = 3/5 和 P(R | U2) = 4/5。应用全概率定律:P(R) = P(R | U1)P(U1) + P(R | U2)P(U2) = (3/5)(1/2) + (4/5)(1/2) = 3/10 + 4/10 = 7/10。因此,抽到红球的概率为 0.7。


8. Medical Testing: A Classic Application | 医学检测:一个经典应用

Suppose a disease affects 1% of a population. A test for the disease is 95% accurate: if a person has the disease, the test is positive with probability 0.95 (sensitivity); if a person does not have the disease, the test is negative with probability 0.95 (specificity). We want the probability that a randomly selected person tests positive. Let D be the event of having the disease, and Pos be a positive test result. Then P(D) = 0.01, P(D′) = 0.99. P(Pos | D) = 0.95, P(Pos | D′) = 0.05. Using total probability: P(Pos) = P(Pos | D)P(D) + P(Pos | D′)P(D′) = (0.95)(0.01) + (0.05)(0.99) = 0.0095 + 0.0495 = 0.059. So even with a seemingly accurate test, the probability of a positive result is about 5.9%, largely driven by false positives from the healthy majority.

假设某种疾病影响总人口的 1%。针对该疾病的检测有 95% 的准确率:如果一个人患病,检测呈阳性的概率为 0.95(灵敏度);如果一个人未患病,检测呈阴性的概率为 0.95(特异度)。我们希望求出一个随机选中的人检测呈阳性的概率。设 D 为患病事件,Pos 为检测阳性结果。则 P(D) = 0.01,P(D′) = 0.99。P(Pos | D) = 0.95,P(Pos | D′) = 0.05。利用全概率公式:P(Pos) = P(Pos | D)P(D) + P(Pos | D′)P(D′) = (0.95)(0.01) + (0.05)(0.99) = 0.0095 + 0.0495 = 0.059。因此,即使检测看似准确,阳性结果的概率也约为 5.9%,这主要是由健康的大多数人产生的假阳性所致。


9. Combining with Bayes’ Theorem | 与贝叶斯定理相结合

Once the total probability P(A) is found, Bayes’ theorem allows us to reverse the condition. For example, in the medical testing scenario above, we can now find the probability that a person actually has the disease given a positive test: P(D | Pos) = P(Pos | D)P(D) / P(Pos) = (0.95 × 0.01) / 0.059 ≈ 0.161. This shows that despite the positive result, there is only about a 16.1% chance of having the disease. This counter‑intuitive result highlights why total probability is a vital ingredient in Bayesian reasoning. IB questions frequently ask for both P(A) and then P(Bi | A) in multi‑part problems.

一旦求出了全概率 P(A),贝叶斯定理就可以用来逆转条件。例如,在上述医学检测情境中,我们现在可以求出在检测呈阳性的条件下该人确实患病的概率:P(D | Pos) = P(Pos | D)P(D) / P(Pos) = (0.95 × 0.01) / 0.059 ≈ 0.161。这表明,即使检测呈阳性,患病的几率也仅有约 16.1%。这一反直觉的结果凸显了全概率在贝叶斯推理中为什么是不可或缺的一环。IB 考题经常在多部分问题中要求先求出 P(A),再求 P(Bi | A)。


10. Common Mistakes and How to Avoid Them | 常见错误及如何避免

One common error is failing to ensure that the events Bi truly partition the sample space. If they overlap or fail to cover all possibilities, the formula gives incorrect results. Another pitfall is confusing P(A | Bi) with P(Bi | A). Always check the direction of conditioning. Some students forget to multiply by P(Bi) and simply average the conditional probabilities, which is only valid when all Bi are equally likely. In tree diagrams, a frequent mistake is adding probabilities along a single branch instead of summing across different paths that lead to A. Practice recognising partition events from the context given, and label your tree diagrams carefully.

一个常见的错误是未能确保事件 Bi 真正分割了样本空间。如果它们之间有重叠,或者未能覆盖所有可能,公式就会给出错误结果。另一个陷阱是把 P(A | Bi) 与 P(Bi | A) 混淆。始终要检查条件作用的方向。有些同学忘记乘上 P(Bi),仅仅对条件概率取简单平均,而这只有在所有 Bi 等可能时才成立。在树形图中,一个频繁出现的错误是把单一分支上的概率相加,而不是把通向 A 的不同路径上的乘积求和。练习从给定的情境中识别出分割事件,并仔细标注你的树形图。


11. Practice Problem with Solution | 带解答的练习题

Problem: A factory has three machines M1, M2, M3 producing 40%, 35%, and 25% of the items, respectively. The defect rates are 2% for M1, 3% for M2, and 5% for M3. An item is chosen at random from the total output. What is the probability that it is defective? If an item is found defective, which machine is most likely responsible?

问题: 一个工厂有三台机器 M1, M2, M3,分别生产 40%,35% 和 25% 的产品。缺陷率分别为 M1 2%,M2 3%,M3 5%。从总产量中随机抽取一件产品。它是缺陷品的概率是多少?若发现一件产品有缺陷,哪台机器最可能是责任者?

Solution: Let D be the event “defective item”. The machines form a partition: P(M1) = 0.4, P(M2) = 0.35, P(M3) = 0.25. Given defect rates: P(D | M1) = 0.02, P(D | M2) = 0.03, P(D | M3) = 0.05. Total probability: P(D) = Σi=13 P(D | Mi)P(Mi) = (0.02)(0.4) + (0.03)(0.35) + (0.05)(0.25) = 0.008 + 0.0105 + 0.0125 = 0.031. So the overall defect probability is 3.1%. For the second part, use Bayes’ theorem: P(M1 | D) = (0.02×0.4)/0.031 ≈ 0.258; P(M2 | D) = (0.03×0.35)/0.031 ≈ 0.339; P(M3 | D) = (0.05×0.25)/0.031 ≈ 0.403. Therefore, machine M3 is most likely responsible given a defect.

解答: 设 D 为事件“缺陷品”。机器构成一个分割:P(M1) = 0.4,P(M2) = 0.35,P(M3) = 0.25。给定缺陷率:P(D | M1) = 0.02,P(D | M2) = 0.03,P(D | M3) = 0.05。全概率:P(D) = Σi=13 P(D | Mi)P(Mi) = (0.02)(0.4) + (0.03)(0.35) + (0.05)(0.25) = 0.008 + 0.0105 + 0.0125 = 0.031。所以总体缺陷概率为 3.1%。对于第二部分,使用贝叶斯定理:P(M1 | D) = (0.02×0.4)/0.031 ≈ 0.258;P(M2 | D) = (0.03×0.35)/0.031 ≈ 0.339;P(M3 | D) = (0.05×0.25)/0.031 ≈ 0.403。因此,在已知缺陷的情况下,机器 M3 最可能是责任者。


12. Summary and Final Tips | 总结与最后提示

The Law of Total Probability is an essential tool for tackling any probability problem where an event can occur through multiple mutually exclusive pathways. Always begin by identifying a valid partition of the sample space. Write down the known probabilities P(Bi) and conditional probabilities P(A | Bi). Construct a tree diagram if it helps to visualise the structure. Check that the sum of the branch probabilities at each node equals 1. Finally, apply the formula P(A) = Σ P(A | Bi)P(Bi) with confidence, and be prepared to use the result in Bayes’ theorem for reversed inference. With consistent practice, total probability questions become straightforward and enjoyable.

全概率定律是处理任何可通过多种互斥路径发生的事件之概率问题的基本工具。始终从识别样本空间的一个有效分割开始。写下已知的概率 P(Bi) 和条件概率 P(A | Bi)。如果有助可视化结构,可以构建树形图。检查每个节点处各分支概率之和是否为 1。最后,自信地应用公式 P(A) = Σ P(A | Bi)P(Bi),并准备好在贝叶斯定理中使用该结果进行反向推断。通过持续练习,全概率问题将变得直截了当且令人愉悦。

Published by TutorHao | Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version