Skip to content

When one event tells you about another: conditional probability and independence

This is lesson 6 of Track 9 (Statistics & Probability for AI) and the second lesson of Phase 2 (The laws of chance). The previous lesson’s multiplication rule worked only for independent events; this lesson handles the dependent ones, which are the events that matter most in AI, where knowing one thing changes the odds of another. You will learn conditional probability, the single most important idea in this phase and the foundation under both Bayes (next lesson) and machine-learning classification. The source curriculum is Khan Academy’s Statistics & Probability course, by Sal Khan and the Khan Academy team, freely available and cited as further study.

The lesson defines P(A given B) and its formula, makes it concrete with a two-way diagnostic table, generalizes the multiplication rule to dependent events, and redefines independence as the special case where conditioning changes nothing. Its centerpiece is the warning that the chance of A given B is not the chance of B given A, shown with a table where a test catches 80% of cases yet a positive means only a 47% chance of the condition. It closes by locating conditional probability inside classifiers and language models.

This is lesson 6 of 14, the middle of Phase 2. It lifts the independence caveat from the previous lesson (Probability foundations) and feeds directly into the next lesson, Updating beliefs with evidence: Bayes’ theorem, which turns the two-way table’s two different conditionals into a formula. The screening table here is the same structure as lesson 1’s base-rate example, now with the machinery to see exactly where the two conditionals diverge.

Prerequisites: the previous lesson (Probability foundations), especially the multiplication rule and independence. Comfort with fractions and reading a small table is all the math required.

The arithmetic is light: filling in and reading a two-way table (counts that add up across rows and columns), and dividing one count by another to get a conditional probability. The one formula, P(A given B) = P(A and B) / P(B), is anchored to the table throughout, and the card example uses two simple fractions. No algebra beyond that.

  • Define conditional probability as the chance of A given B and compute it from a two-way table
  • Apply the general multiplication rule for dependent events, P(A and B) = P(B) times P(A given B)
  • Define independence as P(A given B) equal to P(A), connecting back to the simple multiplication rule
  • Explain why the chance of A given B is generally not the chance of B given A
  • Recognize conditional probability inside AI (classifiers and how a language model predicts the next word)
  • Read time: about 12 minutes
  • Practice time: about 15 minutes (a self-check, a two-way table exercise computing conditionals both directions, a spot-the-flipped-conditional exercise, and flashcards)
  • Difficulty: standard (light table arithmetic; the challenge is conceptual, keeping the direction of the bar straight)