Conditional probability and Bayes
PROB · Chapter 112 min readAsked at Jane Street, SIG, Optiver, Citadel
After this lesson you should be able to
- Apply Bayes’ theorem without memorising it, by writing the joint probability two ways.
- Explain why a reliable test for a rare condition still produces mostly false positives.
- Spot the questions that are really about conditioning on the right event.
Bayes is not a formula to recall — it is what you get by writing the probability of two things happening in the two orders available and setting them equal. Every classic trap in this area comes from ignoring the base rate, and every fix comes from counting the cases.
Equation 1.1
Conditional probability
The fraction of the world in which happens that also has in it. Everything else follows from this one definition.
- Both happen.
- The event you are conditioning on; it must have positive probability.
Derivation 1.2
Bayes in two lines
The intersection is symmetric, so expand it both ways and rearrange.
The law of total probability, which is almost always how you get the denominator.
| Term | Name | Usually the easy part? |
|---|---|---|
| Prior | Yes — the base rate | |
| Likelihood | Yes — the stated accuracy | |
| Evidence | No — build it from total probability | |
| Posterior | The answer |
Example 1.4
The taxicab problem
A taxi was involved in a hit-and-run. of the city’s taxis are green and are blue. A witness says the taxi was blue, and tests show they identify a colour correctly of the time. What is the probability the taxi was blue?
Show the worked solutionHide the worked solution
Worked solution
- Formula
- Substitute
- SolveThe witness is right about a blue cab in 12% of cases and wrong about a green one in 17%.
- Answer
Sanity check. Below one half, despite an accurate witness — because green cabs are so much more common that the witness’s mistakes about them outnumber their correct calls on blue ones.
The base rate does the work. Think in counts rather than percentages. Out of a hundred cabs, fifteen are blue and the witness correctly calls twelve of them; eighty-five are green and the witness wrongly calls seventeen of them blue. Twenty-nine "blue" calls, twelve of them right. Nothing about that requires a formula, and expressing it this way is usually the fastest route to the answer under pressure.
The rest of this lesson is in Premium
You have read the opening. 13 more sections follow, including 5 worked examples and 3 quick checks.
Nothing is charged for 7 days, and you can cancel before then. Or read Arithmetic that survives a clock in full, free.