📚 Conditional Probability: Formulas and Worked Examples | 条件概率:公式与典型例题
Conditional probability is one of the most important topics in IB Mathematics, appearing in both Analysis and Approaches (AA) and Applications and Interpretation (AI) syllabi. It forms the foundation for more advanced concepts such as Bayes’ theorem, probability trees, and statistical inference. This article explores the core formulas, common pitfalls, and typical exam-style problems you are likely to encounter.
条件概率是IB数学中最重要的内容之一,在分析与方法(AA)和应用与解释(AI)两套课程体系中均有涉及。它是贝叶斯定理、概率树和统计推断等更高级概念的基础。本文将深入讲解核心公式、常见错误以及你可能会遇到的典型考试题目。
1. Definition of Conditional Probability | 条件概率的定义
Conditional probability measures the probability of one event occurring given that another event has already occurred. The probability of event A given event B is written as P(A|B), read as “the probability of A given B.” Formally, we restrict the sample space to the outcomes within B.
条件概率衡量的是在另一个事件已经发生的条件下,某一事件发生的概率。在事件B已发生的条件下,事件A发生的概率记为P(A|B),读作”在B条件下A的概率”。从形式上看,我们将样本空间限制在B所包含的样本点内。
P(A|B) = P(A ∩ B) / P(B), where P(B) > 0
Intuitively, this formula tells us that knowing B has occurred narrows down the possible outcomes. Think of it as asking: among all outcomes where B happens, what fraction also satisfy A?
直观上,这一公式告诉我们,知道B已发生会缩小可能结果的集合。可以这样理解:在所有B发生的结果中,有多少比例同时也满足A?
2. Key Formulas and Their Rearrangements | 关键公式及其变形
From the definition above, we can derive several important formulas that appear frequently in IB exams.
由上述定义可以推导出几个在IB考试中频繁出现的重要公式。
The Multiplication Law | 乘法法则:
P(A ∩ B) = P(A|B) × P(B) = P(B|A) × P(A)
Independent Events | 独立事件: if A and B are independent, then P(A|B) = P(A). This implies:
独立事件:若A和B相互独立,则P(A|B) = P(A)。由此可得:
P(A ∩ B) = P(A) × P(B)
Chain Rule | 链式法则: for three events A, B, C, the joint probability can be expressed as:
链式法则:对三个事件A、B、C,联合概率可以表示为:
P(A ∩ B ∩ C) = P(A) × P(B|A) × P(C|A ∩ B)
This chain rule is particularly useful when working with probability trees over multiple stages.
链式法则在处理多阶段概率树时尤为有用。
3. The Law of Total Probability | 全概率公式
When dividing a sample space into mutually exclusive and exhaustive events B₁, B₂, …, Bₙ, the law of total probability allows us to compute P(A) by considering each “path” to A separately.
当样本空间被划分为互斥且完备的事件B₁, B₂, …, Bₙ时,全概率公式使我们可以分别考虑到达A的每条”路径”,从而计算P(A)。
P(A) = P(A|B₁)P(B₁) + P(A|B₂)P(B₂) + … + P(A|Bₙ)P(Bₙ)
Equivalently, in summation notation:
用求和记号等价表示为:
P(A) = Σ P(A|Bᵢ) P(Bᵢ) for i = 1 to n
In IB examinations, you will frequently use this formula when events are best described by first considering which “case” or “branch” we are in.
在IB考试中,当事件最适合通过先判断处于哪种”情形”或”分支”来描述时,你经常会用到该公式。
4. Bayes’ Theorem | 贝叶斯定理
Bayes’ theorem allows us to “reverse” a conditional probability. Given P(A|B), we can find P(B|A) provided we also know the marginal probabilities.
贝叶斯定理允许我们”反转”条件概率。已知P(A|B),只要还知道边际概率,就可以求出P(B|A)。
P(B|A) = P(A|B) × P(B) / P(A)
Using the law of total probability to expand the denominator:
利用全概率公式展开分母:
P(B|A) = P(A|B) × P(B) / [P(A|B)P(B) + P(A|Bᶜ)P(Bᶜ)]
Bayes’ theorem is a standard topic in IB HL and is often examined in the context of medical testing, spam filters, and quality control problems.
贝叶斯定理是IB高级水平(HL)的标准内容,常通过医学检测、垃圾邮件过滤和质检问题等情境进行考查。
5. Conditional Probability and Independence | 条件概率与独立性
Two events A and B are said to be independent if the occurrence of one does not change the probability of the other. There are three equivalent conditions for independence:
若事件A与B中一个的发生不改变另一个发生的概率,则称A与B相互独立。独立有以下三个等价条件:
- P(A ∩ B) = P(A) × P(B)
- P(A|B) = P(A), provided P(B) > 0
- P(B|A) = P(B), provided P(A) > 0
It is a common misconception to confuse “mutually exclusive” with “independent.” Two mutually exclusive events with non-zero probabilities are never independent, because P(A ∩ B) = 0 while P(A) × P(B) > 0.
一个常见误解是将”互斥”与”独立”混为一谈。两个概率非零的互斥事件绝不独立,因为此时P(A ∩ B) = 0,而P(A) × P(B) > 0。
6. Worked Example 1: Direct Application | 典型例题1:直接应用
A bag contains 4 red balls and 6 blue balls. Two balls are drawn without replacement. Find the probability that the second ball is red given that the first ball is red.
一个袋子中有4个红球和6个蓝球。不放回地抽取两个球。已知第一个球是红球,求第二个球是红球的概率。
Solution | 解答:
Let R₁ be the event that the first ball is red, and R₂ be the event that the second ball is red. After the first red ball is drawn, there are 3 red balls and 6 blue balls remaining, a total of 9 balls. Therefore:
设R₁为第一个球是红球的事件,R₂为第二个球是红球的事件。第一个红球被抽出后,袋中剩余3个红球和6个蓝球,共9个球。因此:
P(R₂|R₁) = 3/9 = 1/3
We can also verify using the definition: P(R₁) = 4/10 = 2/5, and P(R₁ ∩ R₂) = (4/10) × (3/9) = 12/90 = 2/15. Then P(R₂|R₁) = (2/15) / (2/5) = (2/15) × (5/2) = 1/3. Both approaches agree.
我们也可以用定义验证:P(R₁) = 4/10 = 2/5,且P(R₁ ∩ R₂) = (4/10) × (3/9) = 12/90 = 2/15。于是P(R₂|R₁) = (2/15) / (2/5) = (2/15) × (5/2) = 1/3。两种方法结果一致。
7. Worked Example 2: Probability Tree | 典型例题2:概率树
A factory has two machines, A and B. Machine A produces 60% of the items, machine B produces 40%. The defect rates are 2% for machine A and 5% for machine B. An item is selected at random and found to be defective. Find the probability that it was produced by machine B.
某工厂有两台机器A和B。机器A生产60%的产品,机器B生产40%。A的次品率为2%,B的次品率为5%。随机抽取一件产品,发现其是次品。求该次品由机器B生产的概率。
Solution | 解答:
Let D be the event that the item is defective, and B be the event that it was produced by machine B. Using Bayes’ theorem:
设D为产品是次品的事件,B为该产品由机器B生产的事件。利用贝叶斯定理:
P(B|D) = P(D|B)P(B) / [P(D|A)P(A) + P(D|B)P(B)]
Substituting the known values:
代入已知数值:
P(B|D) = (0.05)(0.40) / [(0.02)(0.60) + (0.05)(0.40)]
= 0.02 / (0.012 + 0.02) = 0.02 / 0.032 = 0.625
Alternatively, using a probability tree, we can compute P(D) = 0.012 + 0.020 = 0.032, and then P(B ∩ D) = 0.02, yielding P(B|D) = 0.020 / 0.032 = 0.625.
或者,使用概率树,可以计算P(D) = 0.012 + 0.020 = 0.032,再求P(B ∩ D) = 0.02,得到P(B|D) = 0.020 / 0.032 = 0.625。
Notice that although P(D|B) = 5% appears to be small, the posterior probability P(B|D) = 62.5% is quite high because machine B’s contribution to the total defective output dominates.
注意,尽管P(D|B) = 5%看起来很小,但后验概率P(B|D) = 62.5%相当高,因为机器B在总次品数中的贡献占主导地位。
8. Worked Example 3: Contingency Table | 典型例题3:列联表
Students at a school were surveyed about whether they study mathematics at higher level. The results are summarised in the table below.
某学校的学生就是否在高级水平学习数学进行了调查。结果汇总如下表。
| Study Maths HL 学习数学高级水平 |
Do NOT study Maths HL 不学习数学高级水平 |
Total 总计 |
|
| Female 女生 |
15 | 35 | 50 |
| Male 男生 |
25 | 25 | 50 |
| Total 总计 |
40 | 60 | 100 |
Find: (a) P(Maths HL | Female); (b) P(Female | Maths HL); (c) Determine whether the events “Female” and “Maths HL” are independent.
求:(a) P(数学高级水平 | 女生);(b) P(女生 | 数学高级水平);(c) 判断”女生”与”数学高级水平”是否相互独立。
Solution | 解答:
(a) P(Maths HL | Female) = 15 / 50 = 0.30. Given the student is female, the probability she studies Maths HL is 30%.
(a) P(数学高级水平 | 女生) = 15 / 50 = 0.30。已知学生是女生,她学习数学高级水平的概率为30%。
(b) P(Female | Maths HL) = 15 / 40 = 0.375. Among all Maths HL students, 37.5% are female.
(b) P(女生 | 数学高级水平) = 15 / 40 = 0.375。在所有学习数学高级水平的学生中,37.5%是女生。
(c) Since P(Female) = 50 / 100 = 0.50 and P(Female | Maths HL) = 15 / 40 = 0.375, these are not equal, so the events are not independent. Equivalently, P(Female ∩ Maths HL) = 15/100 = 0.15, which is not equal to P(Female) × P(Maths HL) = 0.50 × 0.40 = 0.20.
(c) 因为P(女生) = 50 / 100 = 0.50且P(女生 | 数学高级水平) = 15 / 40 = 0.375,两者不相等,因此两个事件不独立。等价地,P(女生 ∩ 数学高级水平) = 15/100 = 0.15,不等于P(女生) × P(数学高级水平) = 0.50 × 0.40 = 0.20。
9. Common Mistakes and Exam Tips | 常见错误与应试技巧
Below are some common pitfalls students fall into when dealing with conditional probability in IB examinations.
以下列出了学生在IB考试中处理条件概率时常犯的一些错误。
- Confusing P(A|B) with P(B|A): These are generally not the same. Always check which event is given.
- Forgetting to check for independence: Before assuming P(A ∩ B) = P(A)P(B), verify whether independence is stated or can be logically justified.
- Ignoring the sample space restriction: When using the definition formula, ensure P(B) is not zero.
- Using addition instead of multiplication: Remember that “and” in probability corresponds to multiplication when events are independent or when using the multiplication law.
- Rounding prematurely: In multi-step conditional probability problems, keep fractions or at least 3 significant figures throughout to avoid rounding errors.
容易混淆P(A|B)与P(B|A):两者通常不相等。务必检查哪个事件是已知条件。
忘记检验独立性:在假设P(A ∩ B) = P(A)P(B)之前,需验证题目是否说明独立或是否可以从逻辑上证明成立。
忽略样本空间的限制:使用定义公式时,确保P(B)不为零。
加法与乘法混用:记住在概率中,”且”对应乘法(当事件独立或使用乘法法则时)。
过早四舍五入:在多步骤条件概率问题中,请始终保留分数或至少3位有效数字,以免累积舍入误差。
10. Applying Conditional Probability to Independent and Mutually Exclusive Events | 条件概率在独立与互斥事件中的应用
Let us illustrate key distinctions with a summary table. It is important to understand the relationship between P(A | B), the notation “given”, and the concepts of independence and mutual exclusivity.
让我们用一张汇总表来说明关键区别。理解P(A | B)、”已知”的符号含义以及独立和互斥概念之间的关系非常重要。
| Scenario 情形 |
Meaning 含义 |
Conditional probability 条件概率 |
| Independent | A and B do not affect each other | P(A|B) = P(A) |
| 独立 | A与B互不影响 | P(A|B) = P(A) |
| Mutually exclusive | A and B cannot happen simultaneously | P(A|B) = 0 |
| 互斥 | A与B不可能同时发生 | P(A|B) = 0 |
If A is a subset of B, then P(A|B) = P(A) / P(B). And if B is a subset of A, then P(A|B) = 1.
若A是B的子集,则P(A|B) = P(A) / P(B)。若B是A的子集,则P(A|B) = 1。
11. Practice Problem | 练习题目
In a certain population, 1% of people have a certain disease. A diagnostic test for the disease gives a positive result 99% of the time when the person has the disease, and gives a false positive 2% of the time when the person does not have the disease. A person is chosen at random and tests positive. Find the probability that the person actually has the disease.
在某一群体中,有1%的人患有某种疾病。对该疾病进行诊断检测时,当一个人确实患病时,检测结果呈阳性的概率为99%;当一个人未患病时,检测结果呈假阳性的概率为2%。随机选取一人,检测结果为阳性。求此人实际患病的概率。
Solution | 解答:
Let D be the event of having the disease, and T⁺ be the event of a positive test result. We need P(D|T⁺).
设D为患病事件,T⁺为检测结果呈阳性的事件。我们需要求P(D|T⁺)。
P(D|T⁺) = P(T⁺|D)P(D) / [P(T⁺|D)P(D) + P(T⁺|Dᶜ)P(Dᶜ)]
= (0.99)(0.01) / [(0.99)(0.01) + (0.02)(0.99)]
= 0.0099 / (0.0099 + 0.0198) = 0.0099 / 0.0297 ≈ 0.3333
Even with a positive test result, the probability of actually having the disease is only about 33% due to the low prevalence of the disease and the non-negligible false positive rate.
即使检测结果呈阳性,实际患病的概率也仅为约33%。这是因为疾病在人群中的患病率很低,同时假阳性率不可忽略。
12. Review and Final Thoughts | 复习与总结
Conditional probability requires careful reading of what information is “given.” You should be comfortable with all of the following: the definition formula, the multiplication law, the law of total probability, and Bayes’ theorem. Drawing probability trees or completing contingency tables can greatly help visualise and solve these problems.
条件概率要求仔细阅读题目中”已知”了什么信息。你应该熟练掌握以下所有内容:定义公式、乘法法则、全概率公式和贝叶斯定理。绘制概率树或完成列联表可以极大地帮助你直观理解并解决这类问题。
On exam day, always write down the formula you are using, show your working step by step, and check whether your final answer is reasonable. If you obtain a probability greater than 1 or less than 0, review your calculations immediately.
考试当天,请务必写出所用公式,逐步展示解答过程,并检查最终答案是否合理。如果得到的概率大于1或小于0,请立即复查计算。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导