Conditional probability · 条件概率
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| conditional probability/kənˈdɪʃənl ˌprɒbəˈbɪlɪti/ | 条件概率 | tiáo jiàn gài lǜ |
| two-way table/tuː weɪ ˈteɪbl/ | 双向表 | shuāng xiàng biǎo |
| dependent/dɪˈpendənt/ | 相依的 | xiāng yī de |
The detective's question
- You know someone studies French. What's the chance they also study German?
- This isn't the same as "what's the chance someone studies both?" — you've narrowed the group to just the French students.
- That's conditional probability 条件概率: the chance of $B$ given that $A$ has already happened.
How to read it
- $\text{P}(B \mid A)$ means "the probability of $B$ given $A$".
- Look only at the part that matches the condition — on a Venn diagram, two-way table 双向表, or tree.
In a class of $30$, $18$ study French. Of those $18$, $7$ also study German. $\text{P}(\text{German} \mid \text{French}) = \dfrac{7}{18}$.

On a tree diagram, multiply probabilities along the branches; here two reds give $\tfrac38\times\tfrac38=\tfrac{9}{64}$
Conditional probability · 条件概率
P(A | B) = P(A ∩ B) ÷ P(B)
When one event affects another, conditional probabilities change — and Bayes reverses them. · 当一个事件影响另一个时,条件概率改变——而贝叶斯把它们反转。
Of 18 French students, 7 also study German. P(German | French) = 7/a. What is a? · 在 18 名法语学生中,7 名也学德语。P(德语 | 法语) = 7/a。a 是多少?
Given they are French, the total to divide by is the 18 French students. · 已知他们是法语的,要除以的总数是 18 名法语学生。
Conditional probability is the probability of an event: · 条件概率是一个事件的概率:
It is the probability of B given that A has occurred. · 它是已知 A 已经发生时 B 的概率。
Of 100 people, 40 are female; of those, 10 are left-handed. P(left-handed | female) as a decimal is? · 在 100 人中,40 人是女性;在那些人中,10 人是左撇子。P(左撇子 | 女性) 作为一个小数是多少?
10/40 = 0.25.
The formula (Extended)
The denominator changes. In conditional probability, the total you divide by is only the group that meets the condition — not the whole population. This is the most common error.
P(B | A) = P(A and B) / P(). · P(B | A) = P(A 和 B) / P()。
P(B|A) = P(A ∩ B) / P(A). The denominator is the probability of the condition. · P(B|A) = P(A ∩ B) / P(A)。分母是条件的概率。
On a two-way table
- To find $\text{P}(B \mid A)$: look at the row (or column) for $A$, and find the fraction that is also $B$.
- The row total is the denominator, not the grand total.
Of 20 students, 12 like tea; of those, 3 also like coffee. P(coffee | tea) = 3/a. What is a? · 在 20 名学生中,12 名喜欢茶;在那些人中,3 名也喜欢咖啡。P(咖啡 | 茶) = 3/a。a 是多少?
Condition on the 12 tea-drinkers, so a = 12. · 以 12 名喝茶者为条件,所以 a = 12。
Independent vs dependent 相依的
- If $\text{P}(B \mid A) = \text{P}(B)$, the events are independent — knowing $A$ happened doesn't change the chance of $B$.
- If they differ, the events are dependent.

Conditional probability restricts attention to the group matching the condition — like looking only inside one region of a Venn diagram.
If P(B | A) = P(B), then events A and B are independent. · 如果 P(B | A) = P(B),那么事件 A 和 B 是独立的。
Independence means knowing A happened does not change the probability of B. · 独立意味着知道 A 发生不改变 B 的概率。
Condition on the smaller group
- Of 30 students, 18 study French and 7 of these study German. Given French, use $p=7/18$, not $7/30$; the condition selects only 18 students.
- Suppose 12 students in the full class study German. Then $P(G)=12/30=0.4$ differs from $P(G\mid F)=7/18$. The two events are not independent for these data.
Among 18 French students, 9 also study German. Find P(German | French). · 在 18 名法语学生中,有 9 人同时也学习德语。求 P(德语 | 法语)。
Restrict the denominator to French students: 9/18 = 0.5. · 将分母限定为法语学生:9/18 = 0.5。
You've got it
- conditional probability $=$ chance of $B$ given $A$ already happened
- restrict your attention to just the group that meets the condition
- $\text{P}(\text{German} \mid \text{French}) = \dfrac{7}{18}$ (out of the French students only)