Conditional Probability
View .md

Conditional Probability

Conditional probability measures the likelihood of an event given that another event has occurred.

Definition

The probability of AA given BB:

P(A∣B)=P(A∩B)P(B)P(A | B) = \frac{P(A \cap B)}{P(B)}

Read this as: “out of all the probability that belongs to BB, what fraction also belongs to AA?”

Breaking down the formula:

  • Numerator P(A∩B)P(A \cap B): the probability that both AA and BB happen — the overlap
  • Denominator P(B)P(B): the total probability of BB — the whole region we’re conditioning on
  • The ratio: what share of BB’s probability is also in AA?

The formula is only defined when P(B)>0P(B) > 0 — you can’t condition on an event that never happens.

Venn Diagram Intuition

Events can be visualized as regions inside a rectangle representing the sample space. Two circles AA and BB represent two events — their areas correspond to the probabilities of those events occurring. In the Venn diagram demo, these two circles sit inside the rectangle. The overlap between the circles is A∩BA \cap B.

The demo lets you adjust three values:

  • P(A) — the probability of event AA (controls the size of circle A)
  • P(B) — the probability of event BB (controls the size of circle B)
  • P(A∩B) — the probability of both events occurring (controls how much the circles overlap)

The legend shows the probability of each region: A only, B only, A∩B, and neither.

The formulas at the bottom show two useful calculations:

P(A∪B) — the probability that AA or BB (or both) occurs:

P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)

We subtract P(A∩B)P(A \cap B) because the overlap was counted twice — once in P(A)P(A) and once in P(B)P(B).

P(A|B) — the conditional probability of AA given BB:

P(A∣B)=P(A∩B)P(B)P(A | B) = \frac{P(A \cap B)}{P(B)}

Try it: increase P(A∩B) while keeping P(B) the same. Watch how P(A|B) goes up — because a larger share of BB falls inside AA.

The set BB becomes a reduced sample space — a smaller sample space that contains only the outcomes where BB happened. Conditional probability is just ordinary probability computed inside this reduced sample space.

Special case: set P(A∩B) = P(B). Then P(A|B) = 1 — given that BB occurred, AA is certain (because AA contains all of BB).

Example: Card Drawing

A deck has 52 cards. What’s the probability of drawing a King given that the card is a face card?

P(King∣Face)=4/5212/52=412=13P(\text{King} | \text{Face}) = \frac{4/52}{12/52} = \frac{4}{12} = \frac{1}{3}

We zoom into the 12 face cards — the reduced sample space — and ask: what fraction are Kings? 4 out of 12.

Uniform Shortcut

When all outcomes are equally likely, conditional probability reduces to counting:

P(A∣B)=∣A∩B∣∣B∣P(A | B) = \frac{|A \cap B|}{|B|}

No need to compute probabilities first — just count outcomes within the reduced sample space BB.

Example: Rolling a Die

A fair six-sided die is rolled. What is the probability of getting an even number given that the roll is greater than 3?

  • BB: roll >3> 3 → outcomes {4, 5, 6} → ∣B∣=3|B| = 3
  • AA: even → outcomes {2, 4, 6}
  • A∩BA \cap B: even and >3> 3 → {4, 6} → ∣A∩B∣=2|A \cap B| = 2

P(even∣>3)=∣A∩B∣∣B∣=23P(\text{even} \mid > 3) = \frac{|A \cap B|}{|B|} = \frac{2}{3}

Notice: we never calculated P(A)P(A) or P(B)P(B). We just shrunk the sample space to BB = {4, 5, 6} and counted how many of those are even.

Rules Still Work Inside the “Given” World

Once you condition on BB, you’re working in a smaller sample space — but all the probability rules you already know still apply:

Complement rule: P(not A∣B)=1−P(A∣B)P(\text{not } A \mid B) = 1 - P(A \mid B)

Addition rule: If A1A_1 and A2A_2 can’t both happen, then P(A1 or A2∣B)=P(A1∣B)+P(A2∣B)P(A_1 \text{ or } A_2 \mid B) = P(A_1 \mid B) + P(A_2 \mid B)

Range: 0≤P(A∣B)≤10 \leq P(A \mid B) \leq 1

Example

A jar has 10 marbles: 4 red, 3 blue, 3 green. You draw one at random. Given that it’s not green, what’s the probability it’s red or blue?

  • BB: not green → 7 marbles (4 red + 3 blue)
  • P(red∣not green)=47P(\text{red} \mid \text{not green}) = \frac{4}{7}
  • P(blue∣not green)=37P(\text{blue} \mid \text{not green}) = \frac{3}{7}
  • Red and blue can’t both happen, so: P(red or blue∣not green)=47+37=1P(\text{red or blue} \mid \text{not green}) = \frac{4}{7} + \frac{3}{7} = 1

This makes sense — if it’s not green, it must be red or blue!


Key Terms

Conditional ProbabilityThe probability of an event given that another event has occurred: P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}.
Reduced Sample SpaceWhen conditioning on B, the sample space shrinks from all outcomes to only those in B
Uniform ShortcutWhen all outcomes are equally likely, P(A)=∣A∣ / ∣Ω∣P(A) = |A| \,/\, |\Omega| — count favorable outcomes and divide by total.