Statistics & Probability • Probability Rules

Conditional Probability of A Given B

Understanding how knowing one event occurred reshapes the likelihood of another — the cornerstone of informed decision-making under uncertainty.

Where Conditional Probability Comes From

Long before anyone wrote P(A|B) on a chalkboard, people reasoned about how new information changes expectations. Physicians adjusted diagnoses when symptoms appeared, gamblers recalculated odds as cards were dealt, and merchants revised predictions based on seasonal reports. The formal language we use today grew out of centuries of effort to make that reasoning precise and reliable.

1654
Blaise Pascal and Pierre de Fermat exchanged letters about the "problem of points" — how to divide stakes in an interrupted game of chance. Their correspondence laid the groundwork for probability theory, including the idea that partial information (how many rounds each player has won) changes the fair division of the pot.
1763
Thomas Bayes' essay, published posthumously, introduced what we now call Bayes' Theorem. At its heart sits conditional probability: Bayes showed how to "invert" a conditional — turning P(evidence | hypothesis) into P(hypothesis | evidence) — enabling us to update beliefs as data arrives.
1812
Pierre-Simon Laplace published Théorie analytique des probabilités, rigorously defining conditional probability as a ratio and applying it to astronomy, census analysis, and legal reasoning — proof that this concept matters far beyond card games.
1933
Andrey Kolmogorov's axioms gave probability a rock-solid mathematical foundation. His definition of conditional probability — P(A|B) = P(A ∩ B) / P(B) — is the one you'll use in this lesson.

The big question these thinkers kept circling was: once you learn that some particular condition holds, how should you recalculate the probability of an event? That question leads directly to the formula and the reasoning strategy you're about to learn.

Core Principles & Definitions

Before diving into computation, it helps to nail down four foundational ideas that make conditional probability work. If you're already comfortable with sample spaces, events, and basic probability rules from Algebra 2 or an earlier stats unit, these will feel like natural extensions.

1

Sample Space (S)

The complete set of all possible outcomes for a situation. When you roll a standard die, S = {1, 2, 3, 4, 5, 6}. Every probability calculation lives inside this space.
2

Event

A subset of the sample space — any collection of outcomes you're interested in. Event A might be "roll an even number" = {2, 4, 6}. Events are the things whose probability we measure.
3

Intersection (A ∩ B)

The set of outcomes that belong to both event A and event B at the same time. This overlap is the numerator in the conditional probability formula and captures "how much of A lives inside B."
4

Conditional Probability P(A|B)

The probability that event A occurs given that event B has already occurred. It answers: "Of all the ways B can happen, what fraction of those also make A happen?"

The vertical bar "|" in P(A|B) is read as "given." It signals that we are restricting our attention to only those outcomes inside B. In effect, B becomes our new, reduced sample space, and we ask how much of A survives within that smaller world.

Key Takeaway
Think of conditional probability like a filter on a search engine. If you search "shoes" you get millions of results (the full sample space). Adding the filter "size 10" (event B) shrinks the results dramatically. Conditional probability asks: of the size-10 results, what fraction are also running shoes (event A)? You're not searching the whole internet anymore — you're only scanning what made it through the filter.

Seeing Conditional Probability

A Venn diagram is the most intuitive way to picture what P(A|B) means. In the diagram below, the entire rectangle is the sample space S. Circle A and circle B represent two events, and the shaded overlap is A ∩ B — the outcomes belonging to both events simultaneously.

Venn diagram showing events A and B inside sample space S, with the intersection A ∩ B highlighted.

When you compute P(A|B), imagine erasing everything outside circle B. The purple circle is now your entire universe. The conditional probability is simply the ratio of the highlighted overlap region to all of B. If B contains 20 equally likely outcomes and 8 of those also belong to A, then P(A|B) = 8/20 = 2/5. You can state the interpretation: "Given that B occurred, there is a 2/5 (or 40%) chance that A also occurred."

The Mathematical Framework

Now let's formalize what the Venn diagram showed. The formula for conditional probability comes in two closely related forms, depending on whether you're working with individual outcome counts or with probabilities.

Definition — Outcome-Count Form
P(A|B) = |A ∩ B| / |B|
|A ∩ B| = number of outcomes in both A and B · |B| = total outcomes in B

This is the version the Common Core standard emphasizes: the conditional probability of A given B is the fraction of B's outcomes that also belong to A. It works directly when every outcome in the sample space is equally likely. You simply count how many of B's outcomes are also in A, and divide by the total count of B's outcomes.

Definition — Probability Form
P(A|B) = P(A ∩ B) / P(B), provided P(B) > 0
P(A ∩ B) = probability both A and B occur · P(B) = probability B occurs

This second form is equivalent. Dividing both numerator and denominator of the first form by the total number of outcomes in S converts counts into probabilities. The condition P(B) > 0 is important: you can't condition on an event that is impossible, because dividing by zero is undefined.

Rearranged — The Multiplication Rule
P(A ∩ B) = P(A|B) × P(B)
Useful when you know the conditional probability and want the joint probability.

Rearranging the formula yields the multiplication rule. This is especially handy for multi-step probability problems (like drawing cards without replacement), because it lets you compute the probability of both events happening by chaining a conditional with a standalone probability.

Interpreting the answer in terms of the model: After computing P(A|B), always translate the number back into plain language. If P(A|B) = 3/7, say: "Within the model, once we know B has occurred, roughly 3 out of every 7 equally likely B-outcomes also satisfy A." This interpretation step is essential — a bare fraction is not a complete answer in statistics.

Detailed Breakdown — Reading a Two-Way Table

One of the most common ways conditional probability appears in practice (and on exams) is through a two-way frequency table. These tables cross-classify data by two categorical variables, and each cell count represents an intersection. Learning to navigate these tables makes conditional probability almost mechanical.

Consider a survey of 200 students at a high school. Each student was asked two questions: "Do you play a sport?" and "Do you have an after-school job?" The results:

Plays a Sport (B)Does NOT Play a Sport (B′)Total
Has a Job (A)305080
No Job (A′)6060120
Total90110200

Now suppose someone asks: "Given that a student plays a sport, what is the probability that the student also has a job?" In symbols, we want P(A|B). Here B is "plays a sport" and A is "has a job."

Using the outcome-count form: the total number of outcomes in B is 90 (column total for "Plays a Sport"). The number of outcomes in A ∩ B — students who both play a sport and have a job — is 30 (the cell where the "Has a Job" row meets the "Plays a Sport" column). So P(A|B) = 30/90 = 1/3 ≈ 0.333.

Interpretation: Among students in this survey who play a sport, about one-third also hold an after-school job. Notice we are not talking about all 200 students — only the 90 who play a sport. That restriction to B's column is exactly what "given B" means.

Stacked bar chart comparing the proportion of students with jobs among sport-playing vs. non-sport students.

The stacked-bar chart above makes the comparison vivid. Within the "Plays Sport" bar, the amber segment (has a job) takes up about a third of the bar's height — that's P(A|B). Within the "No Sport" bar, the amber segment is almost half. The conditional probability depends on which group you condition on, and the visual makes that plain.

Worked Example

Let's walk through a full problem from setup to interpretation.

Marble Bag — Conditional Probability
1
ProblemA bag contains 5 red marbles, 3 blue marbles, and 2 green marbles (10 total). A marble is drawn at random. Let event A = "the marble is red" and event B = "the marble is red or blue." Find P(A|B) and interpret the result in terms of this model.
2
Step 1 — Identify the Sample Space and EventsThe sample space S has 10 equally likely outcomes (one per marble). Event A = {red marbles} so |A| = 5. Event B = {red or blue marbles} so |B| = 5 + 3 = 8.
3
Step 2 — Find the Intersection A ∩ BA ∩ B contains outcomes that are both red and (red or blue). Since every red marble is already red-or-blue, the intersection is simply the set of red marbles: |A ∩ B| = 5.
4
Step 3 — Apply the FormulaP(A|B) = |A ∩ B| / |B| = 5 / 8
As a decimal, that is 0.625, or 62.5%.
5
Step 4 — Interpret in Terms of the ModelIn this marble model, once we know the drawn marble is red or blue (event B), the green marbles are ruled out and our effective pool shrinks from 10 to 8. Of those 8 marbles, 5 are red. Therefore, given that the marble is red or blue, there is a 5/8 (62.5%) probability that it is specifically red. The conditioning "zoomed in" on the red-or-blue subset and asked what share is red.

Strengths, Limitations & Common Mistakes

Conditional probability is a powerful tool, but students sometimes trip over a few conceptual pitfalls. The table below highlights where the concept shines and where caution is needed.

StrengthsLimitations / Pitfalls
Works directly with equally likely outcomes — just count and divide.Requires P(B) > 0. You cannot condition on an impossible event.
Naturally handles "partial information" scenarios (medical tests, surveys, card draws).Students often confuse P(A|B) with P(B|A). These are almost always different quantities.
Forms the basis for Bayes' Theorem, decision trees, and advanced inference.When outcomes are not equally likely, you must use the probability form, not raw counts.
Easy to visualize with Venn diagrams and two-way tables.Conditioning does not imply causation — P(A|B) tells you about co-occurrence, not cause and effect.

The single most common mistake is flipping the condition: confusing P(A|B) with P(B|A). For example, P(has a job | plays a sport) ≠ P(plays a sport | has a job). The denominators are different because the "given" group changes. Always ask yourself: "Which event is my universe? Which event am I measuring inside that universe?"

Key Takeaway
Think of "given B" as shrinking the room. If you're at a concert (S) and you move to the VIP section (B), the crowd around you changes. Asking "what fraction of these people have backstage passes (A)?" is a different question than asking "what fraction of backstage-pass holders are in VIP?" Same two events, but the denominator — the room you're standing in — determines the answer. Always identify your room first.

Connection to Advanced Theory

Conditional probability doesn't just live in this chapter — it's the gateway to some of the most important ideas in statistics and data science. Here's a quick comparison of what you've learned versus where the concept leads.

What You Know NowWhere It Leads
P(A|B) = P(A ∩ B) / P(B)Bayes' Theorem: P(A|B) = P(B|A) × P(A) / P(B). Lets you "reverse" a conditional — essential in medical testing, spam filters, and machine learning.
If P(A|B) = P(A), events are independent.Independence tests in statistics use this idea to determine whether two variables in a data set are associated or unrelated.
Multiplication Rule: P(A ∩ B) = P(A|B) × P(B)Probability trees and sequential experiments (drawing cards without replacement, multi-stage clinical trials) chain multiple conditional probabilities together.
Conditioning restricts the sample space.Conditional distributions in AP Statistics and college courses describe an entire probability distribution, not just a single event, after conditioning on a variable.

If you continue into AP Statistics or a college probability course, Bayes' Theorem will become one of your most-used tools. Its foundation is exactly the conditional probability formula you just learned — so mastering the "fraction of B's outcomes that belong to A" perspective now will pay dividends later.

Practice Problems

PROBLEM 1CONCEPTUAL
In your own words, explain why P(A|B) and P(B|A) are generally not equal. Use the idea that conditioning changes the denominator (the "given" group) to support your explanation.
PROBLEM 2BASIC CALCULATION
A standard deck has 52 cards. Let A = "the card is a face card (Jack, Queen, or King)" and B = "the card is a heart." Find P(A|B). Interpret the result.
PROBLEM 3INTERMEDIATE
The two-way table below shows preferences of 150 students for two streaming services. Underclassmen (Fr/So): 35 prefer Service X, 45 prefer Service Y (total 80). Upperclassmen (Jr/Sr): 40 prefer Service X, 30 prefer Service Y (total 70). Column totals: 75 for X, 75 for Y, 150 overall. Find P(Prefers Service X | Upperclassman) and P(Upperclassman | Prefers Service X). Show that they differ.
PROBLEM 4APPLIED / MULTI-STEP
A factory produces widgets on two assembly lines. Line 1 produces 60% of all widgets and Line 2 produces 40%. Quality control reports that 5% of Line 1's widgets are defective and 8% of Line 2's widgets are defective. A widget is selected at random and found to be defective. What is the probability it came from Line 2? (Hint: use the multiplication rule to find the joint probabilities first, then form the conditional.)
PROBLEM 5CRITICAL THINKING
Events A and B are defined in the same sample space. You are told that P(A|B) = P(A). Prove algebraically that this implies P(B|A) = P(B). Then explain in one or two sentences what this result means about the relationship between A and B.

Lesson Summary

Conditional probability answers the question: once we know event B has happened, what is the likelihood that event A also happens? The formula P(A|B) = |A ∩ B| / |B| (or equivalently P(A ∩ B) / P(B)) captures this by treating B as the new, restricted sample space and measuring the fraction of B's outcomes that also belong to A. Visually, you can see this as the overlap region in a Venn diagram divided by the entire area of circle B, or as a column percentage in a two-way frequency table. Always remember to interpret the result in context: state what the probability means within the specific model (deck of cards, survey data, production process, etc.).

Key reminders: P(A|B) ≠ P(B|A) in general — the conditioning group determines the denominator. When P(A|B) = P(A), events A and B are independent, meaning knowledge of one provides no information about the other. The multiplication rule (P(A ∩ B) = P(A|B) × P(B)) lets you chain conditional probabilities in multi-step scenarios, paving the way for decision trees and Bayes' Theorem in future courses.

Varsity Tutors • Statistics & Probability (Common Core) • Conditional Probability of A Given B