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.
4. Independence and the multiplication rule
Warm-up
Three quick questions from earlier lessons.
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.8 and 0.7. Find the probability that both fail.
Two independent machines fail with probabilities 0.7 and 0.4. 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 5 red and 3 blue marbles. Two are drawn without replacement. Find P(both red).
A bag has 6 red and 7 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.8 and 0.7. Find the probability that both fail.
Two independent machines fail with probabilities 0.7 and 0.4. Find the probability that both fail.
Two independent machines fail with probabilities 0.3 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.
5. Tree diagrams and reverse conditioning
Warm-up
Three quick questions from earlier lessons.
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
Boss problem. 5% of people have a disease. A test is positive for 90% of people with the disease and for 7% of people without it.
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.
6. Long-run frequency and simulation
Warm-up
Three quick questions from earlier lessons.
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.
Answers: Probability
1. Probability with equally likely outcomes; the complement
A
361
361
B
5011
C
3611
4665631031
D
361
361
365
2. The addition rule and mutually exclusive events
A
3522
1711
3523
B
0
C
10053
D
3522
1711
3523
3. Conditional probability
A
225
3313
B
8147
1811
C
P(positive | disease) = 0.87
D
8147
1811
8657
4. Independence and the multiplication rule
A
2514
257
B
Yes: P(A and B) = P(A)·P(B)
C
145
265
D
2514
257
203
5. Tree diagrams and reverse conditioning
A
51
2500501
B
15199
C
You are still more likely healthy: false positives from the many healthy people outnumber the true positives
D
22390
E
51
2500501
2500917
6. Long-run frequency and simulation
A
1/2: the coin has no memory
B
On many days like tomorrow, it rains on about 70% of them