Conditional Probability
Conditional probability is the probability of an event occurring given that another event has already occurred. It is a cornerstone of statistics that helps us update our beliefs and make better predictions when new information becomes available.
This guide covers the conditional probability formula, independent vs dependent events, the multiplication rule, Bayes' Theorem, two-way tables, tree diagrams, worked examples, memory aids, and a practice quiz.
1Introduction
Imagine you're trying to predict if it will rain tomorrow. If you know nothing else, the probability might be around 30%. But what if you wake up and see dark clouds gathering and hear a weather report predicting a storm? Suddenly, the probability of rain feels much higher.
This is the essence of conditional probability: it is the probability of an event occurring given that another event has already occurred or is known to be true. It is about updating our beliefs and probabilities with new, relevant information.
You're a detective investigating a crime. You initially think there's a 10% chance the suspect is guilty. Then, new evidence emerges: the suspect's fingerprints are found at the scene. Suddenly, your belief in their guilt skyrockets! The probability of guilt given the fingerprint evidence is much higher than the initial probability alone. Conditional probability is your statistical magnifying glass, focusing on the relevant facts.
Why It Matters
Medical Tests
How likely is it that you actually have a disease given that your test result was positive?
Weather Forecasting
What is the chance of snow given the temperature drops below freezing?
Business Decisions
What is the probability a customer will buy a product given they clicked on an ad?
Sports Analytics
What is the chance a team wins given they are leading at halftime?
2Key Definitions
Conditional Probability
The probability of an event A occurring given that another event B has already occurred. Written as P(A|B) and read "the probability of A given B."
Independent Events
Two events where the occurrence of one does not affect the probability of the other. If A and B are independent, then P(A|B) = P(A).
Dependent Events
Two events where the occurrence of one does affect the probability of the other. If A and B are dependent, then P(A|B) ≠ P(A).
Mutually Exclusive Events
Two events that cannot both occur at the same time. If A and B are mutually exclusive, then P(A and B) = 0.
Bayes' Theorem
A formula that describes how to update the probability of a hypothesis based on new evidence. It relates P(A|B) to P(B|A).
Prior Probability
Your initial belief or probability of an event before any new evidence is considered, e.g. P(A) in Bayes' Theorem.
Posterior Probability
The updated probability of an event after considering new evidence, e.g. P(A|B) in Bayes' Theorem.
Tree Diagram
A visual tool used to map out sequential events and their probabilities, especially useful for conditional probabilities.
Two-Way Table
A table that displays the frequencies of two categorical variables, often used to calculate conditional probabilities from observed data.
3Conditional Probability Formula
The core idea of conditional probability is that knowing event B has happened reduces our sample space to only those outcomes where B is true. Then, we look for event A within that reduced sample space.
P(A|B) = P(A ∩ B) / P(B)
The probability of A given B equals the probability of both A and B occurring, divided by the probability of B. P(B) cannot be zero.

Think of it this way: out of all the times B happens, how often does A also happen? The vertical line "|" in P(A|B) literally means "given that."
Worked Example: Drawing Balls
A bag contains 5 red balls and 3 blue balls. You draw one ball and it is red. What is the probability that the next ball (drawn without replacement) is also red?
Initial: 8 balls (5 red, 3 blue)
After first red drawn: 7 balls left (4 red, 3 blue)
P(2nd red | 1st red) = 4 / 7
Answer: 4/7
Worked Example: Using the Formula
If P(A) = 0.4, P(B) = 0.5, and P(A and B) = 0.2, find P(A|B).
P(A|B) = P(A and B) / P(B)
P(A|B) = 0.2 / 0.5
P(A|B) = 0.4
4Independent vs Dependent Events
Understanding the difference between independent and dependent events is crucial for applying the correct probability rules.

Independent Events
The occurrence of one does not influence the probability of the other.
Test: P(A|B) = P(A)
Example: Flipping a coin twice. The outcome of the first flip does not affect the second.
Dependent Events
The occurrence of one does affect the probability of the other.
Test: P(A|B) ≠ P(A)
Example: Drawing cards without replacement. The probability of the second draw depends on the first.
Worked Example: Testing for Independence
A survey of 200 students found: 60 boys like Math, 30 boys like English, 40 girls like Math, 70 girls like English. Are "being a Boy" and "liking Math" independent?
P(Math | Boy) = 60 / 90 = 2/3
P(Math) = 100 / 200 = 1/2
2/3 ≠ 1/2
The events are dependent.
5The Multiplication Rule
The general multiplication rule applies to any two events, whether they are independent or dependent. It is a rearrangement of the conditional probability formula.
P(A and B) = P(A|B) × P(B)
P(A and B) = P(B|A) × P(A)
The general multiplication rule — works for all events. Multiply the probability of the first event by the conditional probability of the second given the first.
Independent Events
P(A and B) = P(A) × P(B)
Since P(A|B) = P(A) for independent events, the rule simplifies to the product of individual probabilities.
Dependent Events
P(A and B) = P(A|B) × P(B)
You must use the conditional probability since the events influence each other.
Worked Example: Drawing Marbles
A bag has 6 red marbles and 4 blue marbles. You draw two marbles without replacement. What is the probability of drawing two red marbles?
P(1st red) = 6/10
P(2nd red | 1st red) = 5/9
P(both red) = (6/10) × (5/9)
P(both red) = 30/90 = 1/3
6Bayes' Theorem
Bayes' Theorem is a powerful tool for reversing conditional probabilities. It allows us to find P(A|B) if we know P(B|A), along with the individual probabilities of A and B. It is fundamental for updating our beliefs based on new evidence.
P(A|B) = P(B|A) × P(A) / P(B)
P(A|B) = posterior probability (what we want)
P(B|A) = likelihood (probability of evidence given hypothesis)
P(A) = prior probability (initial belief)
P(B) = total probability of evidence

Interactive: Bayes' Theorem Calculator
Adjust disease prevalence, test sensitivity, and specificity to see how Bayes' theorem determines the true probability of disease given a positive test.
P(Disease | Positive)
16.7%
Out of 1,000 people:
10 have disease, 10 test + (true pos)
990 are healthy, 50 test + (false pos)
10 of 60 positives actually have disease
Law of Total Probability
When P(B) is not directly known, you can compute it using the Law of Total Probability:
P(B) = P(B|A) × P(A) + P(B|Aᶜ) × P(Aᶜ)
Where Aᶜ is the complement of A (i.e., "not A").
Worked Example: Medical Test
A rare disease affects 1% of the population. A test is 90% accurate: if you have the disease, it is positive 90% of the time; if you do not have the disease, it is negative 90% of the time (positive 10%). If a person tests positive, what is the probability they actually have the disease?
P(D) = 0.01, P(Dᶜ) = 0.99
P(T+|D) = 0.90, P(T+|Dᶜ) = 0.10
Step 1: Find P(T+)
P(T+) = (0.90)(0.01) + (0.10)(0.99)
P(T+) = 0.009 + 0.099 = 0.108
Step 2: Apply Bayes' Theorem
P(D|T+) = (0.90 × 0.01) / 0.108
P(D|T+) = 0.009 / 0.108
P(D|T+) ≈ 0.0833 (about 8.33%)
Even with a positive test, there is only about an 8.33% chance the person actually has the disease. The rarity of the disease (low prior probability) makes false positives a significant factor.
7Two-Way Tables & Tree Diagrams
Visual aids are incredibly helpful for organizing information and solving conditional probability problems.
Two-Way Tables
A two-way table (contingency table) displays the frequencies of two categorical variables. To find a conditional probability, restrict to the relevant row or column and divide.

Worked Example: Favorite Subject Survey
| Math | English | Total | |
|---|---|---|---|
| Boys | 60 | 30 | 90 |
| Girls | 40 | 70 | 110 |
| Total | 100 | 100 | 200 |
P(Math | Boy) = 60 / 90 = 2/3 ≈ 0.667
P(Girl | English) = 70 / 100 = 7/10 = 0.7
Tree Diagrams
Tree diagrams are ideal for sequential events where the outcome of one event influences the next. Each path through the tree represents a sequence of events, and the probability of a complete path is the product of all branches along it.

Reading a Tree Diagram
P(Rain) = 0.3, P(No Rain) = 0.7
P(Traffic Jam | Rain) = 0.8
P(Traffic Jam | No Rain) = 0.1
Path: Rain AND Traffic Jam
P(Rain and Jam) = 0.3 × 0.8 = 0.24
8Memory Aids
"The Line Means Given!"
In P(A|B), the "|" literally means "given that." This helps translate the notation into plain English every time.
"Conditional Probability Shrinks the World"
When you are given that event B has occurred, your "world" (denominator) shrinks to only those outcomes where B is true. You are no longer considering the entire sample space.
"AND means Multiply (with caution!)"
When you see "and" in a probability question, you are usually multiplying. Use P(A) × P(B|A) for dependent events, and P(A) × P(B) only for independent events.
"Bayes' Theorem: Flip the Conditional!"
Bayes' Theorem helps you go from P(B|A) to P(A|B). Think of it as "flipping" the conditional statement, but you need the other pieces P(A) and P(B) to do it correctly.
"Independent = No Influence"
If knowing B happened does not change the probability of A, then A and B are independent. They do not influence each other.
"Mutually Exclusive = No Overlap"
If events are mutually exclusive, they cannot happen together, so their intersection P(A and B) is zero. Picture Venn diagrams with two separate circles that do not touch.
9Common Mistakes
Confusing P(A and B) with P(A|B)
P(A and B) is the probability of both events happening in the entire sample space. P(A|B) is the probability of A happening only within the subset where B has already occurred. They are different quantities.
Forgetting to update the sample space (denominator)
When calculating P(A|B), the denominator must be P(B) (or the count of B), not the total sample space. This is the most frequent error in conditional probability.
Incorrectly assuming independence
Do not assume events are independent unless explicitly stated or proven. Always test for independence using P(A|B) = P(A) or use the general multiplication rule P(A and B) = P(A) × P(B|A).
Confusing mutually exclusive with independent
Mutually exclusive means P(A and B) = 0 — if A happens, B cannot. Independent means P(A|B) = P(A) — knowing B does not change A's probability. If events are mutually exclusive with non-zero probabilities, they are actually highly dependent.
Flipping the conditional incorrectly
P(A|B) is generally not equal to P(B|A). You must use Bayes' Theorem to correctly "flip" a conditional probability. For example, P(Disease|Positive Test) is very different from P(Positive Test|Disease).
Not drawing a diagram
For complex problems, tree diagrams and two-way tables are invaluable for organizing information and avoiding errors. Skipping the visual step often leads to mistakes in multi-step problems.
Calculation errors with small probabilities
Double-check your arithmetic, especially when dealing with multiple steps or small probabilities in Bayes' Theorem. A misplaced decimal can dramatically change your answer.
Quick Revision Summary
- ✓Conditional probability updates probabilities based on new information: P(A|B) = P(A ∩ B) / P(B).
- ✓The denominator P(B) represents the reduced sample space — only outcomes where B is true.
- ✓Independent events: P(A|B) = P(A). Knowing B does not change A's probability.
- ✓Dependent events: P(A|B) ≠ P(A). Knowing B changes A's probability.
- ✓Multiplication rule (general): P(A and B) = P(A|B) × P(B).
- ✓Multiplication rule (independent): P(A and B) = P(A) × P(B).
- ✓Bayes' Theorem: P(A|B) = P(B|A) × P(A) / P(B) — reverses conditional probabilities.
- ✓Tree diagrams are best for sequential events; two-way tables are best for categorical data.
- ✓P(A|B) is generally not equal to P(B|A) — use Bayes' Theorem to flip conditionals.
- ✓Mutually exclusive events with non-zero probabilities are always dependent, not independent.
Frequently Asked Questions
- What's the difference between P(A and B) and P(A|B)?
- P(A and B) is the probability that both A and B happen within the entire original sample space. P(A|B) is the probability that A happens given that B has already happened, effectively reducing your sample space to only those outcomes where B is true. Think of P(A and B) as a slice of the whole pie, and P(A|B) as a slice of just the B-portion of the pie.
- Can events be both mutually exclusive and independent?
- Generally, no (unless one of the events has a probability of 0). If two events A and B are mutually exclusive, then P(A and B) = 0. If they were also independent, then P(A and B) = P(A) × P(B), which would require P(A) or P(B) to be 0. So if both events have non-zero probability, they cannot be both mutually exclusive and independent. In fact, mutually exclusive events are highly dependent — knowing one happened tells you the other definitely did not.
- When should I use a tree diagram versus a two-way table?
- Tree diagrams are best for sequential events where the outcome of one event influences the probabilities of subsequent events (dependent events). They clearly show the multiplication rule along each path. Two-way tables (contingency tables) are ideal for two categorical variables where you want to analyze their relationship and calculate conditional probabilities from observed frequencies or counts.
- Why is Bayes' Theorem important?
- Bayes' Theorem allows us to update our beliefs (prior probabilities) with new evidence to get a more accurate, updated probability (posterior probability). It is essential in fields like medical diagnosis (reversing P(Test+|Disease) to find P(Disease|Test+)), spam filtering, and artificial intelligence, where you need to assess the likelihood of a cause given an observed effect.
- How do I know if two events are independent?
- You can test for independence using any of these conditions: (1) P(A|B) = P(A), (2) P(B|A) = P(B), or (3) P(A and B) = P(A) × P(B). If any one of these is true, the events are independent. If none hold, they are dependent. Do not assume independence unless it is given or you have proven it with data.
Practice Quiz
Test your understanding — select the correct answer for each question.
1.P(A|B) represents:
2.Formula for conditional probability:
3.Two events are independent if:
4.Bayes' theorem relates:
5.P(A and B) = P(A) × P(B) for:
6.Drawing cards without replacement creates:
7.In a two-way table, P(row | column) =
8.P(B|A) × P(A) equals:
9.Medical test example: sensitivity is:
10.If P(A) = 0.3, P(B) = 0.4, P(A and B) = 0.1, find P(A|B)
Final Study Advice
- 1.Always identify whether events are independent or dependent before choosing a formula.
- 2.Draw a tree diagram or two-way table for complex problems — they organize information and reduce errors.
- 3.Remember that P(A|B) ≠ P(B|A) in general — always check which direction the conditional goes.
- 4.For Bayes' Theorem problems, find P(B) first using the Law of Total Probability before plugging into the formula.
- 5.Practice with real-world scenarios (medical tests, card draws, surveys) to build intuition for conditional reasoning.