∴Logic WikiA library of reasoningSearch concepts, fallacies, and cases/中文

Probability and conditional probability

概率与条件概率

A probability statement needs an event, conditioning information, and a model.

P(A∩B)=P(A)P(B∣A)P(A\cap B)=P(A)P(B\mid A)

概念与边界

概率位于 0 与 1 之间。互斥事件的概率可相加;非互斥事件需减去交集。联合概率一般写为 P(A)P(B∣A),只有独立时才等于 P(A)P(B)。

条件概率改变参考总体。“获奖者中的受训比例”与“受训者中的获奖比例”条件不同,不能直接交换。

The concept and its limits

Probabilities lie between 0 and 1. Probabilities of disjoint events add; overlapping events require subtracting their intersection. Joint probability is generally P(A)P(B∣A), equaling P(A)P(B) only under independence.

Conditioning changes the reference population. The share trained among winners differs from the share winning among trainees.

把概念用起来

十人中六人喝茶、五人喝咖啡,三人两种都喝,则八人至少喝一种。直接把六与五相加会把那三人算两次。

Working through an example

Of ten people, six drink tea, five coffee, and three both. Eight drink at least one. Adding six and five directly counts the overlap twice.

先写清事件与分母

概率计算始于一个明确的问题:从什么集合中,按什么机制选择,哪些结果算作目标事件?同一个“20%”可以指全部订单中的退货,也可以指延迟订单中的退货。把后一个比例直接用于全部订单,就是换了分母。有限且等可能的模型才可直接用“有利结果数除以全部结果数”;不等可能时必须累加相应的概率。

以下都是本站构造的练习数据。某批 100 个订单中,40 个延迟、20 个退货,其中 12 个既延迟又退货。随机抽取一个订单,退货概率是 20/100;已知订单延迟时,退货概率是 12/40;已知订单退货时,延迟概率是 12/20。三者回答不同问题。

原创数据:订单的完整分类
订单退货未退货合计
延迟122840
未延迟85260
合计2080100

本节依据:HKU T01,§§2、4、5:概率运算与条件概率 ↗

Define the event and denominator

A probability calculation begins with a specified selection mechanism, population, and event. Twenty percent might describe returns among all orders or among delayed orders. Applying the latter proportion to all orders changes the denominator. Counting favorable outcomes works directly only when outcomes are equally likely; otherwise their probabilities must be added.

The following data are invented for teaching. Of 100 orders, 40 were delayed and 20 were returned; 12 had both features. For one randomly selected order, the probability of a return is 20/100. Given a delay, it is 12/40. Given a return, the probability of delay is 12/20. These are three different questions.

Original data: a complete classification of orders
OrdersReturnedNot returnedTotal
Delayed122840
Not delayed85260
Total2080100

Section sources: HKU T01, §§2, 4, 5: probability rules and conditional probability ↗

“并且”和“或者”怎样计算

“A 或 B”包含二者都发生的情况,因此相加时必须减去重复计算的交集。上例中,延迟或退货的概率为 0.4+0.2−0.12=0.48。条件概率中的条件事件必须具有正概率;在这个初等定义中,不能把零作分母。

“并且”的一般计算是先算 A,再乘以在 A 已发生条件下 B 的概率。不能仅因两个事件名称不同就相乘各自的无条件概率。上例若错误地假设延迟和退货独立,会得到 0.4×0.2=0.08,与实际交集 0.12 不同。

P(A∪B)=P(A)+P(B)−P(A∩B),P(A∩B)=P(A)P(B∣A)P(A\cup B)=P(A)+P(B)-P(A\cap B),\qquad P(A\cap B)=P(A)P(B\mid A)

Combining events

Inclusive “A or B” counts outcomes in which both occur, so the overlap must be subtracted. In the example, the probability of delay or return is 0.4 + 0.2 − 0.12 = 0.48. The conditioning event must have positive probability for the elementary ratio definition; division by zero is unavailable.

For “and,” multiply the probability of A by the probability of B conditional on A. Different event names do not justify multiplying unconditional probabilities. Incorrectly assuming independence here gives 0.4 × 0.2 = 0.08, rather than the actual intersection of 0.12.

P(A∪B)=P(A)+P(B)−P(A∩B),P(A∩B)=P(A)P(B∣A)P(A\cup B)=P(A)+P(B)-P(A\cap B),\qquad P(A\cap B)=P(A)P(B\mid A)

独立不等于互斥

互斥意味着不能同时发生;独立意味着知道其中一件发生,不改变另一件的概率。当两个事件概率都大于零时,互斥反而意味着不独立:知道一件发生,就把另一件的条件概率降到了零。

掷一次公平骰子,“点数为 1”与“点数为 2”互斥,却不独立。“点数为偶数”与“点数不大于 3”各有概率 1/2,交集只有点数 2,概率 1/6,因此也不独立。独立性要核算,不能从“看起来无关”推出。

Independence versus mutual exclusion

Mutual exclusion means events cannot occur together. Independence means that learning one has occurred does not change the probability of the other. Two mutually exclusive events with positive probabilities are dependent: occurrence of one makes the conditional probability of the other zero.

On one fair die, a result of 1 and a result of 2 are mutually exclusive but dependent. An even result and a result no greater than 3 each have probability 1/2, but their intersection contains only 2 and has probability 1/6. They too are dependent. Independence needs justification, not an impression of unrelatedness.

换一组事件再算

先写事件,再写分母。以下均按题目指定的随机机制计算,不把这些模型当作真实总体的测量结果。

独立练习 1

均匀随机选择整数 1 至 12。A 是 3 的倍数,B 是偶数。求 P(A 或 B),并判断是否独立。

查看答案与推理过程

A 有 4 个结果,B 有 6 个,交集为 6、12 共 2 个。并集概率为 (4+6−2)/12=2/3。交集概率 1/6 等于 (1/3)×(1/2),所以在这个模型中二者独立,但并不互斥。

独立练习 2

袋中有 3 个红球、2 个蓝球。不放回随机抽两球,两球都红的概率是多少?

查看答案与推理过程

第一球红的概率为 3/5;第一球已红时,剩余 4 球中只有 2 球红,所以第二球红的条件概率为 2/4。两球都红为 3/10。直接算 (3/5)² 忽略了不放回改变条件。

Try different events

Write down the events and denominator before calculating. Use the stated random mechanism; these models are not measurements of a real population.

Independent exercise 1

Choose an integer uniformly from 1 through 12. A means a multiple of 3; B means even. Find P(A or B), and decide whether A and B are independent.

Show answer and reasoning

A has 4 outcomes, B has 6, and their intersection contains 6 and 12. The union has probability (4 + 6 − 2)/12 = 2/3. The intersection probability, 1/6, equals (1/3) × (1/2), so these events are independent in this model, but not mutually exclusive.

Independent exercise 2

A bag contains 3 red balls and 2 blue balls. Draw two randomly without replacement. What is the probability both are red?

Show answer and reasoning

The first draw is red with probability 3/5. After a red draw, 2 of the 4 remaining balls are red, so the conditional probability is 2/4. Their product is 3/10. Squaring 3/5 ignores the change caused by sampling without replacement.

检查你的理解

问:两个事件不能同时发生,是否表示独立?答:通常不是;一个发生就排除了另一个。

Check your understanding

Question: Are mutually exclusive events independent? Answer: Usually not; one occurring rules out the other.

References

  1. Critical thinking web ↗
    Joe Lau and Jonathan Chan · Critical Thinking Web · Selected sections
    Fallacies and scientific-method tutorials; statistics T01 §§2, 4–5 and T15 Bayesian confirmation
    Version, terms, and access scope