T2.3 Conditional probability and independence Start ★ 0
T2.3Playlist 2A, episode 3

Does the rain change it?

Last time you added probabilities. Today a clue arrives first: you already know that B happened. Does that change the probability of A? Guess first.

Builds on: T2.2, T1.3Leads to: T2.4, T3.3
0Last time: the tile floor

Which 100%?

Lina’s 40 Saturday cups from T1.3 (invented). The same 8 cups, students who chose taro, give three different shares. It depends on which crowd you divide by.

Brought back: “Which 100%?” from T1.3, and the tile floor from T2.2.

1Three doors

A clue shrinks the world

Each card gives you a clue. Inside the smaller world where the clue is true, recount.

0 of 3
Some clues change everything, some change nothing. Today’s question is how to tell which.
2The spotlight

Light one row, make it 100%

The tile floor of Lina’s 40 cups. Pick what you already know. Everything else goes dark and the lit tiles stretch until they fill the floor: they are the new 100%.

P(A | B) = P(A ∩ B) ÷ P(B)
read “the probability of A given B”
Conditioning is the spotlight: keep only the cases where B happened, then divide by their total.

3Multiplication law

Width × height

On the floor, a column is as wide as P(flavor), and a tile inside it is as tall as P(student | flavor). So a tile’s area, the joint probability, is width × height. Tap a tile.

P(A ∩ B) = P(B) × P(A | B)
The multiplication law is the spotlight formula turned around. Use it when you know a share and a share-of-that-share.

4Twist

Make the stripes line up

40 days at Lina’s stand (invented): 10 rainy, 30 dry. Each column is split into busy days (more than 30 cups) and quiet ones. Drag the rainy split until it lines up with the dry one.

0.20

5Tree diagram

The floor, as a tree

First the weather, then the sales. Each branch carries a conditional probability. Multiply along a path to get its leaf; add leaves to collect an event. Tap a leaf.

6Real data

Do the stripes line up?

The 244 restaurant tables of T1.3 [2]. Each column is one group; its purple stripe is the share of tables with a smoker in that group.

!Trap

79% one way, 16% the other

From T1.3: 79% of the Friday tables had a smoker. Kai concludes: “So 79% of the smoker tables came on a Friday.”

P(A | B) and P(B | A) share their top, the same 15 tables, but divide by different crowds: 19 Friday tables or 93 smoker tables. Swapping them is a common mistake; it returns in T2.4 and in the p-value of T7.2.
!Trap

Never together, so independent?

The 40 Saturday cups again. Mango and taro never overlap (T2.2). Kai says: “No overlap, no connection. They must be independent.”

Mutually exclusive is not the same as independent. If a cup is mango, it is certainly not taro: the clue moves P(taro) from 0.25 down to 0. Two events that each have a positive chance can’t be both mutually exclusive and independent.
7Name it

Name what you did

Each card is something you already did on this page. Tap a card, then its name.

0 of 7
Independence has three equal faces: P(A | B) = P(A), P(B | A) = P(B), and P(A ∩ B) = P(A) × P(B). When P(A) and P(B) are both positive, if one holds, all three hold.
8Practice

Practice arcade

Five levels, a boss where you paint a floor to order, and a lab for your own 2 × 2 table.

9Remember

Six things to remember, and one trap

Sources and textbook links

Conditional probability, the multiplication law, independence and tree diagrams follow chapter 4 of the course textbook [1]. The 244 restaurant tables are the tips data [2], also used in T1.3 and T2.2; the counts were checked against the copy distributed with the seaborn library [3]. Lina’s cups, days and weather are invented.

  1. Anderson, D. R., Sweeney, D. J., Williams, T. A., Camm, J. D., & Cochran, J. J. (2015). Statistiques pour l’économie et la gestion (5e éd., traduction de la 7e édition américaine d’Essentials of Statistics for Business and Economics par C. Borsenberger). De Boeck Supérieur. Chapitre 4.
  2. Bryant, P. G., & Smith, M. A. (1995). Practical data analysis: Case studies in business statistics. Irwin.
  3. Waskom, M. seaborn-data: tips.csv. https://github.com/mwaskom/seaborn-data