Concept 1 of 81 min
Conditioning and Bayes
A test for a rare disease
| People | 10,000 |
|---|---|
| Sick | 1% |
| Detection rate | 99% |
| False positive rate | 5% |
- Sick = 10,000 × 1% = 100, so 9,900 healthy
- Sick and positive = 100 × 99% = 99
- Healthy and positive = 9,900 × 5% = 495
- P(sick | positive) = 99 ÷ (99 + 495) ≈ 16.7%
Only about 1 positive in 6 is really sick, because the healthy are so many more.
Which coin was it?
| Coins | fair + two-headed |
|---|---|
| Flips | 2 |
| Result | 2 heads |
- Each coin is picked with chance 0.5
- Two-headed: 2 heads for sure
- Fair: 0.52 = 0.25
- Equal priors, so P = 1 ÷ (1 + 0.25) = 0.8
2 heads make the two-headed coin 4 times as likely as the fair one.
Bayes' rule turns P(evidence | hypothesis) into P(hypothesis | evidence). The event that at least one die shows a 6 is different from 'the first die shows a 6': list the outcomes that fit the condition and count the favourable ones among them.
Extra detail, such as a boy born on a Tuesday, changes which outcomes fit, which moves the answer. P(B | A) is not P(A | B): forgetting the prior, or the base rate, is the classic error, as in a medical test for a rare disease, where most positives are false.
- Reading 'at least one' as 'this one'.
- Ignoring the prior, or the base rate.
- Confusing P(B | A) with P(A | B).
Why is the probability of A given B not the probability of B given A? Give an example from finance.
A test detects 99% of people with a condition and wrongly flags 1% of the others. The condition affects 1 in 1,000. You test positive: how likely are you to have it?
A test for a rare condition is 99% accurate, and you test positive. How worried should you be?
A complete answer covers
- It depends on how rare the condition is: the base rate.
- Use Bayes: true positives against all positives.
- With a 1% rate and 5% false positives, only about 1 positive in 6 is real.
- A second, independent test changes the picture a lot.
Also in our technical interviews, on camera, with a score.
Concept 2 of 81 min
Counting
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 3 of 81 min
Linearity of expectation
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 4 of 81 min
Dice: maxima, variance and games
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 5 of 81 min
Waiting for coin patterns
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 6 of 81 min
Uniform draws and geometric probability
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 7 of 81 min
Binomial counts and Kelly bets
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 8 of 81 min
AdvancedBayes in odds: each signal multiplies
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inRecap
- Condition on exactly what you are told: 'at least one' is not 'the first one'; Bayes weighs each hypothesis by its prior.
- Linearity of expectation works without independence: count indicators and add their probabilities.
- For a maximum, use P(max ≤ k); for waiting times, set up states and solve.
- Variances add for independent variables; E[X²] is not E[X]².
- Uniform draws become areas in the unit square.
25 questions on Probability and brainteasers
Timed, like the real one, drawn from a bank of 33. Every answer explained.