Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.
Your turn: P(A and B) = 0.1, P(B) = 0.4. Find P(A | B).
0.25
0.1 ÷ 0.4.
Practice ★
P(A) = 0.60, P(B) = 0.22 and P(A and B) = 0.5. Find P(A | B).
P(A) = 0.55, P(B) = 0.33 and P(A and B) = 0.13. Find P(A | B).
A screening test was given to 316 people: 47 had the disease and tested positive, 8 had the disease and tested negative, 34 did not have it and tested positive, 227 did not have it and tested negative. Find P(disease | positive).
A screening test was given to 256 people: 33 had the disease and tested positive, 7 had the disease and tested negative, 21 did not have it and tested positive, 195 did not have it and tested negative. Find P(disease | positive).
Watch out!
Practice ★★
A test detects a disease in 87% of people who have it. Which statement says the same thing?
P(positive | disease) = 0.87
P(disease | positive) = 0.87
P(disease and positive) = 0.87
Exit ticket
Three questions to check you have got it.
A screening test was given to 316 people: 47 had the disease and tested positive, 8 had the disease and tested negative, 34 did not have it and tested positive, 227 did not have it and tested negative. Find P(disease | positive).
A screening test was given to 256 people: 33 had the disease and tested positive, 7 had the disease and tested negative, 21 did not have it and tested positive, 195 did not have it and tested negative. Find P(disease | positive).
A screening test was given to 239 people: 57 had the disease and tested positive, 3 had the disease and tested negative, 29 did not have it and tested positive, 150 did not have it and tested negative. Find P(disease | positive).
Summary card
Conditional probability
P(A∣B)=P(A and B)/P(B).
Watch out: P(A∣B) and P(B∣A) are different.
One more step is optional: a challenge. Try it, or finish the lesson now.
Challenge ★★★
P(A)=0.5, P(B∣A)=0.8 and P(B)=0.6. Find P(A∣B).
4. Independence and the multiplication rule
Warm-up
Three quick questions from earlier lessons.
A screening test was given to 316 people: 47 had the disease and tested positive, 8 had the disease and tested negative, 34 did not have it and tested positive, 227 did not have it and tested negative. Find P(disease | positive).
P(A) = 0.60, P(B) = 0.22 and P(A and B) = 0.5. Find P(A | B).
A test detects a disease in 87% of people who have it. Which statement says the same thing?
P(positive | disease) = 0.87
P(disease | positive) = 0.87
P(disease and positive) = 0.87
Discover
A card is drawn from a deck. Does knowing it is a heart change the probability that it is a king?
No
Yes
Key idea
Independent events do not influence each other.
A and B are independent if P(A∣B)=P(A), equivalently P(A and B)=P(A)P(B). In general P(A and B)=P(A)P(B∣A). Draws without replacement are dependent.
Worked example
Two cards drawn without replacement: P(both aces).
P(ace)=524
First draw.
P(ace∣ace)=513
3 aces left of 51.
524⋅513=2211
Multiply.
Your turn, guided
Your turn: two independent events with probabilities 0.5 and 0.3. P(both).
0.15
0.5 × 0.3.
Practice ★
Two independent machines fail with probabilities 0.2 and 0.2. Find the probability that both fail.
Two independent machines fail with probabilities 0.9 and 0.2. Find the probability that both fail.
P(A) = 3/10, P(B) = 6/10 and P(A and B) = 18/100. Are A and B independent?
Yes: P(A and B) = P(A)·P(B)
No, because P(A and B) > 0
It cannot be decided
Watch out!
Practice ★★
A bag has 3 red and 3 blue marbles. Two are drawn without replacement. Find P(both red).
A bag has 16 red and 19 blue marbles. Two are drawn without replacement. Find P(both red).
Exit ticket
Three questions to check you have got it.
Two independent machines fail with probabilities 0.2 and 0.2. Find the probability that both fail.
Two independent machines fail with probabilities 0.9 and 0.2. Find the probability that both fail.
Two independent machines fail with probabilities 0.5 and 0.5. Find the probability that both fail.
Summary card
Independence
Independent: P(A and B)=P(A)P(B).
In general: P(A)P(B∣A).
Watch out: without replacement, update the second probability.
One more step is optional: a challenge. Try it, or finish the lesson now.
Challenge ★★★
Three independent machines each fail with probability 0.2. Find the probability that at least one fails.
5. Tree diagrams and reverse conditioning
Warm-up
Three quick questions from earlier lessons.
Two independent machines fail with probabilities 0.2 and 0.2. Find the probability that both fail.
P(A) = 3/10, P(B) = 6/10 and P(A and B) = 18/100. Are A and B independent?
Yes: P(A and B) = P(A)·P(B)
No, because P(A and B) > 0
It cannot be decided
A bag has 3 red and 3 blue marbles. Two are drawn without replacement. Find P(both red).
Discover
1% of people have a condition. A test is positive for 95% of them, and for 5% of healthy people. Of 10,000 people, about how many test positive in total?
About 590
About 5,000
Key idea
A tree organizes conditional probabilities.
First branches: P(A) and P(not A); second branches: conditional probabilities. Multiply along a path; add the paths that end in B to get P(B). Then P(A∣B)=P(B)P(A and B) (reverse conditioning, Bayes' rule).
Worked example
With the numbers above: P(condition | positive).
0.01×0.95=0.0095
Path: condition, positive.
P(+)=0.0095+0.99×0.05=0.059
Both paths to positive.
P(condition∣+)=0.0590.0095≈0.16
Divide.
Your turn, guided
Your turn: P(A) = 0.2, P(B | A) = 0.5, P(B | not A) = 0.25. Find P(B).
0.3
0.2 × 0.5 + 0.8 × 0.25.
Practice ★
12% of a population has a condition. A test is positive for 86% of people with the condition and for 11% of people without it. Find P(positive).
14% of a population has a condition. A test is positive for 94% of people with the condition and for 8% of people without it. Find P(positive).
22% of a population has a condition. A test is positive for 81% of people with the condition and for 12% of people without it. Find P(condition | positive).
Watch out!
Practice ★★
A disease affects 1 in 1,000 people. A test is 93% accurate for both sick and healthy people. Your test is positive. What is most likely?
You are still more likely healthy: false positives from the many healthy people outnumber the true positives
You are about 93% likely to be sick
You are certainly sick
Exit ticket
Three questions to check you have got it.
12% of a population has a condition. A test is positive for 86% of people with the condition and for 11% of people without it. Find P(positive).
14% of a population has a condition. A test is positive for 94% of people with the condition and for 8% of people without it. Find P(positive).
28% of a population has a condition. A test is positive for 95% of people with the condition and for 14% of people without it. Find P(positive).
Summary card
Trees
Multiply along paths; add paths to the same end.
P(A∣B)=P(A and B)/P(B).
Watch out: with rare events, most positives can be false.
One more step is optional: a challenge. Try it, or finish the lesson now.
Challenge ★★★
16% of a population has a condition. A test is positive for 93% of people with it and for 13% of people without it. Your test is negative. Find the probability that you do not have the condition.
6. Long-run frequency and simulation
Warm-up
Three quick questions from earlier lessons.
Two fair dice are rolled. Find the probability that the sum is 2.
A fair die is rolled 2 times. Find the probability of at least one six.
The probability that a flight is late is 0.78. Find the probability that it is not late.
Discover
A fair coin gave 7 heads in 10 tosses. If you toss it 10,000 times, what do you expect?
A proportion of heads close to 0.5
More tails than heads, to make up for the 7 heads
Run 10 tosses a few times, then 1,000. What happens to the proportion of heads?
It gets close to 0.5
It swings further from 0.5 to make up for streaks
Key idea
Probability is a long-run relative frequency.
Law of large numbers: as a random process is repeated many times, the proportion of times an event occurs gets close to its probability. Independent trials have no memory. A simulation imitates a random process with random numbers to estimate probabilities.
Worked example
Simulate a 30% chance with random digits.
Let 0, 1, 2 mean "success"
Each digit has probability 0.1.
Read 1,000 random digits; count successes
Repeat many times.
About 300 successes expected
Relative frequency.
Your turn, guided
Your turn: how many digits for a 60% chance?
6
0.6 ÷ 0.1.
Practice ★
A fair coin lands heads 7 times in a row. What is the probability of heads on the next toss?
1/2: the coin has no memory
Less than 1/2: tails is due
More than 1/2: heads is on a streak
What does it mean that the probability of rain tomorrow is 0.7?
On many days like tomorrow, it rains on about 70% of them
It will rain for 70% of the day
It will rain if the probability is above 0.5
Watch out!
Practice ★★
To simulate a free throw made with probability 0.6 using random digits 0–9, how many of the ten digits should stand for 'made'?
To simulate a free throw made with probability 0.4 using random digits 0–9, how many of the ten digits should stand for 'made'?
Exit ticket
Three questions to check you have got it.
A fair coin lands heads 7 times in a row. What is the probability of heads on the next toss?
1/2: the coin has no memory
Less than 1/2: tails is due
More than 1/2: heads is on a streak
A fair coin lands heads 5 times in a row. What is the probability of heads on the next toss?
1/2: the coin has no memory
Less than 1/2: tails is due
More than 1/2: heads is on a streak
A fair coin lands heads 10 times in a row. What is the probability of heads on the next toss?
1/2: the coin has no memory
Less than 1/2: tails is due
More than 1/2: heads is on a streak
Summary card
Long run
Probability = long-run relative frequency.
Simulate with random numbers.
Watch out: no memory, no "due" outcomes.
One more step is optional: a challenge. Try it, or finish the lesson now.
Challenge ★★★
A fair die is rolled 228 times. About how many sixes do you expect?
7. The birthday problem
Discover
In a class of 23 students, is it likely that two share a birthday?
Yes, slightly more than 50 %
No, you would need about 183 people
Key idea
The birthday problem.
Count the opposite event, all different: with d equally likely days and n people,
P(all different)=dd×dd−1×⋯×dd−n+1, so P(a shared day)=1−P(all different).
Worked example
3 people: what is the chance that at least two share a birth month (12 equally likely months)?
1212×1211×1210=7255
All different: the second avoids 1 month, the third avoids 2.
1−7255=7217≈24%
Opposite event.
Your turn, guided
Your turn: 2 people: what is the chance they share a birth month?
121
1−1211.
Practice ★
3 people each have one of 12 equally likely birth months. What is the probability that at least two share a month?
5 people each have one of 12 equally likely birth months. What is the probability that at least two share a month?
2 people each have one of 12 equally likely birth months. What is the probability that at least two share a month?
Practice ★★
With 12 equally likely birth months, what is the smallest group in which the chance of a shared month is more than one half?
Exit ticket
Two questions to check.
3 people each have one of 12 equally likely birth months. What is the probability that at least two share a month?
5 people each have one of 12 equally likely birth months. What is the probability that at least two share a month?
Summary card
Shared birthdays
'At least two the same' is the opposite of 'all different'.
Multiply the chances for each new person.
The same idea checks how often two files get the same short code in computing.
8. History of probability: Pascal, Fermat and the problem of points
Discover
Two players stop a game of chance before the end. One is ahead. How should they share the stakes fairly? In the summer of 1654, Blaise Pascal and Pierre de Fermat answered this in five letters. What was new in their answer?
Share by each player's chance of winning if the game had gone on
Share by the points already won
Key idea
From games of chance to a theory.
Step 1Gerolamo Cardano1501–1576R. Cooper. Wellcome Collection (V0001004). CC BY 4.0About 1563: Cardano finishes his book on games of chance. It is printed only in 1663.
Step 2Blaise Pascal1623–1662Gérard Edelinck, about 1691. Clermont Auvergne Métropole, Bibliothèque du patrimoine, GRA 6025. CC BY-SA 4.0Pierre de Fermatc. 1607 – 1665Rolland Lefebvre. Public domainSummer 1654: five letters between Pascal and Fermat solve the problem of points and study the dice problem.
Step 3Christiaan Huygens1629–1695Bernard Vaillant, 1686. Public domain1657: Huygens prints the first book on the calculation of chances.
Cardano wrote a book on games of chance (finished by about 1563, printed in 1663). Pascal and Fermat solved the problem of points in 1654. In 1657 Huygens printed the first book on probability.
Source
I see that the truth is the same in Toulouse and in Paris.
Blaise Pascal, letter to Pierre de Fermat, 29 July 1654 (our translation from French)
Why does Pascal write this?
Fermat (in Toulouse) and he (in Paris) found the same result by two methods
To say that games of chance are the same everywhere
Worked example
The problem of points, our way: first to win 3 rounds wins; each round is 50–50. A has 2 wins, B has 1.
P(B wins)=21×21=41
B must win the next 2 rounds.
P(A wins)=43
So A should get 3 quarters of the stakes.
Practice ★
Who printed the first book on probability, in 1657?
Christiaan Huygens
Girolamo Cardano
Blaise Pascal
The problem of points: each round is 50–50. A needs 1 more win, B needs 5 more wins. What is A's chance of winning, which fixes A's fair share?
The problem of points: each round is 50–50. A needs 1 more win, B needs 4 more wins. What is A's chance of winning, which fixes A's fair share?
The dice problem of 1654: a pair of dice is thrown 19 times. What is the probability of at least one double six?
Summary card
Probability today
Weather forecasts give chances of rain.
Insurance prices come from probabilities of accidents and illness.
Medicine tests drugs and reads test results with probability.
Sources: MacTutor biographies of Cardano, Pascal and Huygens (see "Sources and credits").
Answers: Probability
1. Probability with equally likely outcomes; the complement
A
Eye color · ZIP code · Takes the bus to school (yes/no)
No: it is categorical, a label that only looks like a number
The 29 runners
B
361
361
C
0.22
D
3611
4665631031
E
361
361
365
F
41
2. The addition rule and mutually exclusive events
A
361
3611
0.22
B
3522
1711
3523
C
0
D
0.3
E
3522
1711
3523
F
103
3. Conditional probability
A
3522
0
0.3
B
225
3313
C
8147
1811
D
P(positive | disease) = 0.87
E
8147
1811
8657
F
32
4. Independence and the multiplication rule
A
8147
225
P(positive | disease) = 0.87
B
0.04
0.18
C
Yes: P(A and B) = P(A)·P(B)
D
0.2
11924
E
0.04
0.18
0.25
F
0.488
5. Tree diagrams and reverse conditioning
A
0.04
Yes: P(A and B) = P(A)·P(B)
0.2
B
0.2
0.2004
C
15199
D
You are still more likely healthy: false positives from the many healthy people outnumber the true positives
E
0.2
0.2004
0.3668
F
265261
6. Long-run frequency and simulation
A
361
3611
0.22
B
1/2: the coin has no memory
C
On many days like tomorrow, it rains on about 70% of them
D
6
4
E
1/2: the coin has no memory
1/2: the coin has no memory
1/2: the coin has no memory
F
38
7. The birthday problem
A
7217
14489
121
B
5
C
7217
14489
8. History of probability: Pascal, Fermat and the problem of points