Conditional probability
Chances that change once you know something.
Pen and paper is fine · no calculator needed why?
Opens at level 29.
the lesson
Read the lesson
The idea
A conditional probability is a chance once you know something. "Given they bought online" shrinks the world to the online buyers, and the answer is a share of that smaller group. Direction matters: "returned, given online" and "online, given returned" are different questions.
A test that catches 90% of a rare condition can still give mostly false alarms, because the healthy group is so much bigger.
Techniques
Shrink to the given group
- The group named after "given" is your new total.
- Count the ones in it who also have the outcome.
- Divide and reduce.
worked example
Of 100 shoppers, 30 bought online and returned something, 20 bought online and returned nothing, and 50 bought in store. What is the probability a shopper returned something, given they bought online?
- Online buyers: 30 + 20 = 50.
- Of those, 30 returned something: 30/50 = 3/5.
Answer: 3/5
Weight each branch
- Each box: the chance of picking it × the chance of the outcome from it.
- Add the results for the boxes.
worked example
You pick Box A or Box B with equal chance and draw one ball. A holds 1 red of 2 balls; B holds 3 red of 4. What is the probability it is red?
- Box A: 1/2 × 1/2 = 1/4.
- Box B: 1/2 × 3/4 = 3/8.
- 1/4 + 3/8 = 2/8 + 3/8 = 5/8.
Answer: 5/8
Picture 1,000 people
- Split the crowd by the base rate.
- Apply the hit rate to those who have it and the false-alarm rate to the rest.
- Divide the real positives by all the positives.
worked example
2% of people have a condition. A test catches 90% of people who have it, and wrongly flags 10% of people who don’t. You test positive. What is the probability you have it? Answer as a fraction.
- Of 1,000 people, 20 have it and 18 of those test positive.
- Of the other 980, 98 test positive.
- 18 real out of 116 positives: 18/116 = 9/58.
Answer: 9/58
Tips by skill
- TipFrom a table: Find the group after "given". Its total goes on the bottom; the ones in it with the outcome go on top.
- TipTwo-stage chance: Multiply along each branch, box chance × outcome chance, then add the branches.
- TipTest results (Bayes): Picture 1,000 or 10,000 people. Count real positives and false alarms, then real ÷ all positives.
Watch out for
- Dividing by everyone instead of the given group.
- Pooling the balls from two boxes as if they were in one box.
- Reading "catches 90% of people who have it" as "a positive is 90% likely to be real".
skills · practice stats
-
From a table not tried yet
worked example
Of 241 customers, 14 bought online and returned something, 37 bought online and returned nothing, 72 bought in store and returned something, and 118 bought in store and returned nothing. What is the probability a customer returned something, given they bought online? Give the answer as a fraction in lowest terms.
Answer: 14/51
- Only look at the customers who bought online: 14 + 37 = 51.
- Of those, 14 returned something: 14/51.
-
Two-stage chance not tried yet
worked example
You pick Box A with probability 1/3 and Box B with probability 2/3, then draw one ball at random from that box. Box A holds 3 white balls and 5 yellow balls; Box B holds 5 white balls and 1 yellow ball. What is the probability the ball is white? Give the answer as a fraction in lowest terms.
Answer: 49/72
- Weight each box’s chance of white by the chance of picking that box:
- 1/3 × 3/8 + 2/3 × 5/6 = 1/8 + 5/9
- = 9/72 + 40/72 = 49/72.
-
Test results (Bayes) not tried yet
worked example
1% of transactions are fraudulent. A filter flags 95% of fraudulent transactions, and also wrongly flags 5% of legitimate ones. A transaction is flagged. What is the probability it is fraudulent? Give the answer as a fraction in lowest terms.
Answer: 19/118
- Picture 10,000 transactions: 100 are fraudulent, and 95 of them are flagged.
- Of the 9,900 legitimate ones, 495 are flagged.
- So 95 of the 590 flagged transactions are fraudulent: 95/590 = 19/118.
rest ladder
- 1 day
- 3 days
- 7 days
- 14 days
- 30 days
- 60 days
- mastered · every 90 days