Conditional Probability
Conditional probability helps us answer a very common real-life question: what is the chance of something happening given that something else has already happened? students, this idea appears in weather forecasts 🌦️, medical testing, sports stats 🏀, machine learning, and even quality control in factories. In IB Mathematics: Analysis and Approaches HL, conditional probability is a key part of Statistics and Probability because it connects raw data with smarter decision-making.
What conditional probability means
Suppose we have two events, $A$ and $B$. The conditional probability of $A$ given $B$ is written as $P(A\mid B)$ and means the probability that $A$ occurs if we already know that $B$ has occurred.
This matters because once we know $B$ happened, the sample space changes. We are no longer looking at all possible outcomes, only the outcomes inside $B$. That is why conditional probability is not the same as the ordinary probability $P(A)$.
The key formula is
$$P(A\mid B)=\frac{P(A\cap B)}{P(B)}, \quad P(B)>0$$
Here:
- $P(A\cap B)$ is the probability that both $A$ and $B$ happen.
- $P(B)$ is the probability that $B$ happens.
This formula says: among the outcomes where $B$ happens, what fraction also belong to $A$?
A simple example
Imagine a school survey of $100$ students:
- $60$ play a sport, so $P(S)=0.60$
- $30$ play a sport and also take music, so $P(S\cap M)=0.30$
What is the probability that a student takes music given that they play a sport?
Using the formula,
$$P(M\mid S)=\frac{P(M\cap S)}{P(S)}=\frac{0.30}{0.60}=0.5$$
So, $50\%$ of the students who play a sport also take music. This is different from the probability of music overall, $P(M)$, because we have narrowed the group to only sport players.
Working with notation and interpreting events
The notation can look technical at first, but the idea is very practical. Think of $A$ as a result you care about and $B$ as extra information.
Examples:
- $P(R\mid F)$ could mean the probability of a person being right-handed given that they are female.
- $P(D\mid +)$ could mean the probability of having a disease given a positive test result.
- $P(H\mid R)$ could mean the probability of getting heads given that a coin was chosen from a special bag.
The vertical bar $\mid$ means “given.” It tells you that the event on the right side is already known to be true.
It is important to remember that $P(A\mid B)$ is not usually equal to $P(B\mid A)$. The order matters.
For example, in a medical test:
- $P(\text{positive}\mid \text{disease})$ may be high.
- $P(\text{disease}\mid \text{positive})$ may be much lower.
These are very different probabilities because they ask different questions.
Using tables, Venn diagrams, and tree diagrams
Conditional probability is often easier to understand using diagrams or tables. These are useful tools in IB because they help organize information clearly and reduce mistakes.
Contingency tables
A two-way table is useful when two categorical variables are involved.
For example, suppose a class of $50$ students is grouped by whether they study Physics and whether they study Chemistry.
| | Chemistry | Not Chemistry | Total |
|------------|-----------|----------------|-------|
| Physics | $12$ | $8$ | $20$ |
| Not Physics| $10$ | $20$ | $30$ |
| Total | $22$ | $28$ | $50$ |
If we want $P(\text{Chemistry}\mid \text{Physics})$, we use the students in the Physics group only:
$$P(\text{Chemistry}\mid \text{Physics})=\frac{12}{20}=0.6$$
If we want $P(\text{Physics}\mid \text{Chemistry})$, we use the Chemistry total:
$$P(\text{Physics}\mid \text{Chemistry})=\frac{12}{22}$$
This shows why the denominator depends on the condition.
Venn diagrams
Venn diagrams are helpful when events overlap. If $A$ and $B$ are events, then the overlap region is $A\cap B$.
If you know the total probability of $B$, then conditional probability focuses only on the $B$ circle. The chance of $A$ given $B$ is the part of $B$ that also lies in $A$.
Tree diagrams
Tree diagrams are especially useful when events happen in stages. For example, if a box contains red and blue balls and one ball is removed without replacement, then the second draw depends on the first.
Suppose a bag contains $3$ red balls and $2$ blue balls. Two balls are drawn without replacement.
The probability of drawing a red first is
$$P(R_1)=\frac{3}{5}$$
If the first ball is red, then there are $2$ red balls left out of $4$ balls total, so
$$P(R_2\mid R_1)=\frac{2}{4}=\frac{1}{2}$$
The probability of two reds in a row is found by multiplying along the branch:
$$P(R_1\cap R_2)=P(R_1)P(R_2\mid R_1)=\frac{3}{5}\cdot\frac{1}{2}=\frac{3}{10}$$
This is a classic IB-style reasoning method.
Independence and conditional probability
Two events $A$ and $B$ are independent if the occurrence of one does not affect the probability of the other. In that case,
$$P(A\mid B)=P(A)$$
and also
$$P(A\cap B)=P(A)P(B)$$
This is a very useful test.
If $P(A\mid B)\neq P(A)$, then the events are not independent.
Example of independence
If a fair die is rolled once, the probability of getting a $6$ is
$$P(6)=\frac{1}{6}$$
If the result of a previous coin toss is heads, it does not change the die outcome. So the probability of a $6$ given heads is still
$$P(6\mid H)=\frac{1}{6}$$
The events are independent.
Example of dependence
If a card is drawn from a deck and not replaced, the second draw depends on the first. That means conditional probability is needed.
If the first card is an ace, then the probability of drawing another ace changes because one ace has already been removed. This is dependence in action.
Why conditional probability matters in Bayes’ theorem
Conditional probability is the foundation of Bayes’ theorem, which is also part of the IB syllabus. Bayes’ theorem helps reverse conditional statements.
If we know $P(B\mid A)$ but want $P(A\mid B)$, Bayes’ theorem gives:
$$P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}$$
This is extremely important in situations like medical testing.
Real-world example: medical tests
Suppose:
- $P(D)=0.01$ for a disease,
- $P(+\mid D)=0.99$ for a test sensitivity,
- $P(+\mid D^c)=0.05$ for a false positive rate.
We want $P(D\mid +)$, the probability that a person has the disease given a positive test.
First find $P(+)$ using the law of total probability:
$$P(+)=P(+\mid D)P(D)+P(+\mid D^c)P(D^c)$$
$$P(+)=0.99(0.01)+0.05(0.99)=0.0099+0.0495=0.0594$$
Now apply Bayes’ theorem:
$$P(D\mid +)=\frac{0.99(0.01)}{0.0594}\approx 0.1667$$
So even with a positive test, the probability of actually having the disease is about $16.67\%$. This shows why conditional probability is so important for interpreting data correctly. A small base rate can strongly affect the final answer.
Common mistakes and how to avoid them
One common mistake is to forget that the condition changes the sample space. If students is calculating $P(A\mid B)$, the denominator must be based on $B$, not on the whole group.
Another mistake is to confuse $P(A\mid B)$ with $P(B\mid A)$. These are not interchangeable.
A third mistake is to use the formula $P(A\mid B)=\frac{P(A\cap B)}{P(B)}$ when $P(B)=0$. Conditional probability is only defined when $P(B)>0$.
To avoid mistakes:
- identify the condition first,
- find the correct reduced sample space,
- use clear notation,
- check whether events are independent,
- and interpret the result in words.
Conclusion
Conditional probability is a central idea in Statistics and Probability because it describes probability in the presence of new information. It helps with tables, diagrams, tree models, and real applications such as testing, reliability, and decision-making. In IB Mathematics: Analysis and Approaches HL, it supports later ideas like independence, compound probability, and Bayes’ theorem. When students understands $P(A\mid B)=\frac{P(A\cap B)}{P(B)}$, many problems become easier to organize and solve accurately ✅
Study Notes
- Conditional probability means the probability of one event happening given that another event has already happened.
- The main formula is $$P(A\mid B)=\frac{P(A\cap B)}{P(B)}, \quad P(B)>0$$
- The condition changes the sample space, so the denominator is the probability of the event after the word “given.”
- $P(A\mid B)$ and $P(B\mid A)$ are generally different.
- Independence means one event does not affect the other, so $$P(A\mid B)=P(A)$$
- Tree diagrams, Venn diagrams, and contingency tables are useful for organizing conditional probability problems.
- Conditional probability is the basis of Bayes’ theorem:
$$P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}$$
- In real life, conditional probability helps interpret medical tests, surveys, games of chance, and quality control data.
- Always state the condition clearly and interpret the answer in context.
