Conditional Probability: Watch the Denominator Change
A conditional probability is an ordinary probability computed inside a smaller world. Every time you say “given…” you throw away part of the population — and the number you divide by shrinks. Set up a screening test, then condition on different branches of the tree and watch the denominator move.
The probability tree — 10,000 people
Numbers on the branches are already conditional probabilities — each one is measured inside the node it leaves. Numbers in the boxes are joint probabilities: multiply along the path.
Where the denominator went
The same test at every prevalence
Sensitivity and specificity are held fixed, so the branch probabilities never move. Only the sizes of the two groups feeding the “test +” denominator change — and that alone can swing the answer across almost the entire range. A test is not “accurate” or “inaccurate” on its own; the question you ask of it has to name a denominator.
Conditional probabilitypick a condition below
Build the world
Ready-made worlds
Condition on…
The rule: P(A | B) = P(A and B) ÷ P(B). The event after the bar is the new denominator; the joint probability is the numerator. Conditioning never invents probability — it re-scales what survives so it adds to 100% again.
P(A | B) is not P(B | A). “Almost every sick person tests positive” and “almost every positive person is sick” are different sentences with different denominators. The two tiles above show them side by side.
Or stop calculating and just count
Simulate people one at a time from this exact tree, then count them the way a clinic would — numerator over denominator, no formula. The draws use a fixed seed, so the same world always gives the same run.