Bayes’ rule, for quant interviews
Everyone can recite . The interview is testing whether you can resist the reflex that makes a “90% accurate” test feel like 90% — whether you reach for the base rate before you reach for the formula.
For candidates practicing base rates, likelihoods, and posterior updates · Updated July 21, 2026
What the interviewer is actually testing
Bayes questions look like arithmetic and are actually a trap for one specific instinct: confusing the test’s accuracy with the answer you want. The interviewer hands you a “90% accurate” test and a rare condition and waits to see whether you blurt out a number near 90% — the classic base-rate neglect.
Say the two quantities out loud so you can’t conflate them. The test’s sensitivity is — the chance a sick person tests positive. What the question asks for is — the chance a positive person is sick. These are different conditionals, and Bayes’ rule is exactly the machine that swaps one for the other. The gap between them is the base rate, and in a rare-disease problem that gap is enormous.
The formula, and the version you should actually use
Written formally, for hypothesis and evidence :
The denominator is the whole population of the evidence — every way can happen, weighted by how likely it was. Most candidates lose the plot in that denominator. So don’t compute it in probabilities; compute it in people. Pick a round population, push it through the tree as counts, and read the answer off the leaves. Interviewers respect the natural-frequency move because it is exactly how you avoid the mistake they set for you: you literally see the false positives pile up.
A worked example, in people
Standard setup: a disease with a 1% base rate, a test with 90% sensitivity () and a 9% false-positive rate (, i.e. 91% specificity). You test positive. What’s the chance you’re sick?
Take 10,000 people so everything stays an integer:
- 1% are sick: 100 sick, 9,900 healthy.
- Of the 100 sick, 90% test positive → 90 true positives (10 missed).
- Of the 9,900 healthy, 9% test positive → 891 false positives.
- Everyone who tests positive: 981 positives.
- Of those, only 90 are actually sick: 9.2%.
A positive result on this “90% accurate” test moves you from a 1% chance of being sick to about a 9% chance. It multiplied your risk roughly ninefold — and still left you more than 90% likely to be fine.
Deriving it with the odds form
The count table is the answer; the odds form is the elegant version, and it’s what to reach for when the interviewer says “now second-guess the result with another test.” Bayes in odds form is just:
The likelihood ratio of a positive is . Prior odds of being sick are . So the posterior odds after one positive are , and the posterior probability is — the same 9.2%, in one line. The virtue shows up on a second, independent positive: just multiply by 10 again. Posterior odds become , so the probability jumps to , about 50%. Evidence accumulates by multiplying likelihood ratios — that is the whole trick.
Base rates are the whole game
The reason the answer felt wrong is that it barely depends on the test and almost entirely on the base rate. Hold the test fixed at and slide the prevalence: the posterior is for base rate .
At a 1% base rate the posterior is 9.2%; at 10% it is ; at 50% it is . Same test, wildly different answers. This is the punchline to carry into every Bayes question and, more importantly, into trading: your prior is not a formality you set once and forget — it dominates the update whenever the evidence is anything short of overwhelming.
Variants that change the answer
- The base rate moves. If the disease is ten times more common (10% prevalence), the identical positive test now means 52.6%, not 9.2%. Always ask for — or state your assumption about — the prior before touching the likelihood.
- A second, independent test. Two positives on independent tests multiply the likelihood ratios: , taking you to ~50%. But independence is a real assumption; if the tests share a failure mode (same reagent, same operator error) the second positive carries far less than another factor of 10, and blindly multiplying overstates your confidence.
- The prosecutor’s fallacy. “There’s a 1-in-a-million chance the DNA matches by chance, so there’s a 1-in-a-million chance he’s innocent” swaps for . In a city of a million, that tiny per-person rate still expects ~1 innocent match, and ignoring that base rate is the exact error the disease problem drills.
- Unknown base rate. If the interviewer refuses to give a prior, that’s the question: the answer is a function of , not a number. Give the formula and note it’s near-useless when is tiny.
Common mistakes
- Answering ~90%. Reporting the sensitivity as if it were the posterior — reading when asked for . This is the entire trap.
- Dropping the false-positive term. Forgetting the 891 healthy-but-positive people, i.e. computing instead of . The denominator is everyone who tests positive, not everyone who is sick.
- Ignoring the base rate entirely. Treating the test’s accuracy as the answer and never asking how rare the condition is. When the prior is extreme, it dominates the update.
- Multiplying dependent evidence. Stacking likelihood ratios for tests that aren’t actually independent, and manufacturing false confidence.
Practice the pattern
Bayes is one instance of a reflex quant interviews test relentlessly: the answer lives in the base rate and how the evidence was generated, not in the headline accuracy number. Drill conditional-probability and base-rate questions in the LeetQuidity curriculum, or take the free calibration to see where your updates break under time.