Conditional probability
Introduced| English | Meaning |
|---|---|
| conditional probability/kənˈdɪʃənl ˌprɒbəˈbɪlɪti/ | The probability of an event given that another event has occurred. |
| two-way table/tuː weɪ ˈteɪbl/ | A table showing frequencies or other data classified by two categorical variables. |
| dependent/dɪˈpendənt/ | dependent |
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?
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Given they are French, the total to divide by is the 18 French students.
Conditional probability is the probability of an event:
Difficulty 1/5 · 100 coins + a small bonus on first completion today
It is the probability of B given that A has occurred.
Of 100 people, 40 are female; of those, 10 are left-handed. P(left-handed | female) as a decimal is?
Difficulty 2/5 · 140 coins + a small bonus on first completion today
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(______).
Difficulty 1/5 · 100 coins + a small bonus on first completion today
P(B|A) = P(A ∩ B) / P(A). The denominator is the probability of the condition.
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?
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Condition on the 12 tea-drinkers, so 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.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Independence means knowing A happened does not change the probability of 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).
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Restrict the denominator to French students: 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)