Conditional Probability
The conditional probability P(A|B) measures the probability of A given that B has already occurred.
Free · no credit card · in your study plan in 2 minutes
Formula
P(A \mid B) = \frac{P(A \cap B)}{P(B)} \quad (P(B) > 0)Variables & units – Conditional Probability
| Symbol | Meaning | Unit |
|---|---|---|
| P(A|B) | Probability of A given B | dimensionless |
| P(A∩B) | Probability that both A and B occur | dimensionless |
| P(B) | Probability of the condition (P(B) > 0) | dimensionless |
Derivation & background – Conditional Probability
Andrei Kolmogorov made conditional probability a foundation of modern probability theory in 1933. Intuitively the sample space shrinks to B; A is measured only inside B. Rearranged, the formula gives the multiplication rule P(A∩B) = P(A|B)·P(B), the calculation rule for tree-diagram paths. A and B are stochastically independent exactly when P(A|B) = P(A).
Exam blueprint
Validity range
Defined only for P(B) > 0. P(A|B) and P(B|A) are different quantities and must not be swapped.
Derivation steps
The sample space shrinks to B; A counts only inside B.
- 1Only outcomes in B are relevant; of these, those in A∩B belong to A.
- 2The ratio P(A∩B)/P(B) normalizes B to the new total probability 1.
Rearrangements
Multiplication rule
Path rule in the tree diagram: multiply probabilities along the path.
Bayes theorem
Reverses the direction of conditioning.
Test independence
Holds exactly when A and B are stochastically independent.
Task variant
60% of the students are girls, 30% are athletic girls. Compute P(sport|girl).
P(S|G) = P(S∩G)/P(G) = 0.3/0.6 = 0.5. Half of the girls do sport.
Two dice: A = "sum 8", B = "first die shows 6". Compute P(A|B).
Given B only the second die remains: sum 8 requires a 2, so P(A|B) = 1/6. Compare: P(A) = 5/36, B changes the odds.
Common mistakes
Confusing P(A|B) with P(B|A).
The condition stands after the bar; conversion only via Bayes theorem.
Equating P(A∩B) with P(A|B).
P(A∩B) measures in the whole sample space, P(A|B) only inside B.
Dividing by the wrong marginal total in the contingency table.
For P(A|B) divide by the marginal total of B.
Exam context
- Contingency table and tree diagram tasks, medical tests, independence proofs.
These mistakes cost points in real exams. The set drills them until they stick.
Formula cluster
Conditional probability
Multiplication rule, contingency table and Bayes build on the same definition.
Worked example
Die roll: B = "even number" with P(B) = 1/2, A = "number > 3". A∩B = {4, 6}, so P(A∩B) = 2/6 = 1/3. P(A|B) = (1/3)/(1/2) = 2/3.
Applications
Contingency tables and tree diagrams, medical test problems in exams, testing independence, risk assessment, basis of Bayes' theorem
Quanta exam set
Curated exam set for "Conditional Probability":
Question (front)
Which formula describes Conditional Probability?
Answer in your set
Question (front)
How do you rearrange P(A|B) = P(A∩B)/P(B) for Multiplication rule?
Answer in your set
Question (front)
Which common mistake happens with Conditional Probability?
Answer in your set
+ 7 more cards: units, variables, derivation, example, exam task
These 10 cards are ready. One click and they sit in your deck, FSRS schedules the reviews until exam day.
Scientific sources
Common notations & search queries
Related formulas
More Mathematics formulas
Frequently asked questions about Conditional Probability
How do I calculate a conditional probability?+
Use the definition P(A|B) = P(A∩B)/P(B): divide the probability that both events occur together by the probability of the condition. Die example: B = "even number" has P(B) = 1/2, A = "number greater than 3". Jointly favourable are {4, 6}, so P(A∩B) = 2/6 = 1/3. Hence P(A|B) = (1/3)/(1/2) = 2/3. Intuitively the sample space shrinks to the three even numbers {2, 4, 6}, of which two exceed 3. Depending on the task you find P(A∩B) in the contingency table (inner cell), in the tree diagram (path product) or by direct counting. The decisive step is to identify condition and target event cleanly: what is given, what is asked?
What is the difference between P(A|B) and P(B|A)?+
The direction of conditioning is swapped, and that usually changes the value drastically. P(A|B) asks: how likely is A given that B has occurred? P(B|A) asks the reverse. Famous medical test example: P(positive|ill) is the sensitivity of the test, often 99%. P(ill|positive) is what the tested person wants to know, and can still be small for a rare disease, because among the positives are many false alarms from the large healthy majority. The two quantities also have different denominators: P(A|B) normalizes to B, P(B|A) to A. They can only be converted via Bayes theorem: P(B|A) = P(A|B)·P(B)/P(A). Carelessly equating the two directions is called the prosecutor's fallacy and is one of the most consequential statistical errors.
How do I use contingency tables and tree diagrams for conditional probabilities?+
Both representations organize the same information, but with different strengths. The contingency table holds the joint probabilities P(A∩B) etc. in its four inner cells and the marginal probabilities at the edges. You read off a conditional probability by dividing an inner cell by its marginal total: P(A|B) = cell(A∩B)/margin(B). The tree diagram carries conditional probabilities directly on the second-level branches; the path rule P(A∩B) = P(B)·P(A|B) multiplies along the path. Rule of thumb: if shares and percentages of a fixed population are given, the table is faster; if the task describes a temporal process in stages, the tree is more natural. For "reversed" questions (Bayes) it often helps to redraw the tree with the stages swapped.
When are two events stochastically independent?+
When the occurrence of one does not change the probability of the other: P(A|B) = P(A). Equivalent and computationally handier is the product formula P(A∩B) = P(A)·P(B); this is exactly what you verify in tasks. Example: in a double coin toss, "first coin heads" and "second coin heads" are independent: P(A∩B) = 1/4 = (1/2)·(1/2) ✓. Counterexample die: A = "number > 3" and B = "even" are dependent, since P(A∩B) = 1/3, but P(A)·P(B) = (1/2)·(1/2) = 1/4. Important: independence is not mutual exclusivity! Disjoint events with positive probabilities are maximally dependent, because one rules out the other. And real-world independence should be justifiable, for example by separate random mechanisms.
How is conditional probability related to Bayes theorem?+
Bayes theorem is a direct consequence of the definition. The joint probability can be decomposed in two ways: P(A∩B) = P(A|B)·P(B) = P(B|A)·P(A). Equating both expressions and solving for P(B|A) yields Bayes theorem: P(B|A) = P(A|B)·P(B)/P(A). It answers exactly the question of how to convert one conditioning direction into the other. The denominator P(A) is usually determined via total probability: P(A) = P(A|B)·P(B) + P(A|B̄)·P(B̄), the two tree-diagram paths leading to A. Typical exam application: from the sensitivity and false-positive rate of a test, compute the probability of really being ill given a positive result.
Retain Conditional Probability for exams
Create a curated FSRS exam set for P(A|B) = P(A∩B)/P(B): formula recall, variables, derivation, rearrangement, worked example, common mistakes and exam context.
Free · curated formula set · LaTeX · FSRS spaced repetition
How do you calculate with Conditional Probability?
Here is how to work through a typical Conditional Probability (P(A|B) = P(A∩B)/P(B)) task step by step:
- 1
Task
60% of the students are girls, 30% are athletic girls. Compute P(sport|girl).
Solution path
P(S|G) = P(S∩G)/P(G) = 0.3/0.6 = 0.5. Half of the girls do sport.
- 2
Task
Two dice: A = "sum 8", B = "first die shows 6". Compute P(A|B).
Solution path
Given B only the second die remains: sum 8 requires a 2, so P(A|B) = 1/6. Compare: P(A) = 5/36, B changes the odds.