2.7.9 · D5Statistics & Probability — Intermediate
Question bank — Bayes' theorem — derivation and applications
Before the traps, let us earn every symbol used below so nothing appears unexplained.
Now the core object under fire — the flip, with the partition already defined above: The sum runs over the partition : it adds the probability of the evidence arriving through each separate cause. Every item below pokes at one symbol in that line — the prior , the likelihood , the evidence , or the direction of the bar .
True or false — justify
A test that is sensitive (i.e. ) means a positive result implies a chance of disease.
False. Sensitivity is , the test's behaviour given the truth; the patient wants the flipped , which also depends on the prior — a rare disease drags it far below . In the area picture, the left strip is thin, so most shaded area sits on the right.
Saying a test is " accurate" is the same as saying its sensitivity is .
False. "Accuracy" is the overall correct-rate, blending sensitivity and specificity weighted by prevalence; a test can be sensitive yet poorly specific, so its accuracy differs. The words are not interchangeable — always ask which quality number is meant.
whenever and are equally common.
True (as a special case). They differ by the factor , so when the two conditionals coincide — but this is a coincidence of base rates, not a general law.
If , then seeing made more believable.
True. The posterior rose above the prior, so evidence supported ; equivalently , meaning is "more expected" when holds.
For independent events, Bayes' theorem still holds but tells you nothing new.
True. If are independent then : the posterior equals the prior, so evidence leaves belief in unchanged — the two vertical strips shade to the same height.
The denominator can be omitted because it cancels out.
False. is what normalises posteriors to sum to across all causes; drop it and you get relative weights, not probabilities. It only "cancels" when you compare two hypotheses as a ratio.
A posterior of from a positive test means the test is useless.
False. It still lifted belief from the prior to — a roughly -fold jump. "Useless" would be the posterior staying at .
If the prior is , no amount of evidence can produce a nonzero posterior.
True. makes the numerator ; Bayes can update beliefs but cannot resurrect a hypothesis you assigned literally impossible.
Swapping the roles of "cause" and "evidence" in Bayes gives an equally valid theorem.
True. Bayes is symmetric in construction — you may compute from just as easily; "cause" and "evidence" are our interpretive labels, not fixed algebraic roles.
Spot the error
" and , so ."
Error: that product is the joint — the area of the tall sliver inside the left strip — not the posterior. You still must divide by the total shaded area , giving .
"The disease is rare, so I'll ignore the healthy group when computing ."
Error: the healthy group (the right strip) is exactly where the false positives live. The short band there, , is five times the true-positive sliver — ignoring it discards most of the shaded area.
"Factory Y makes fewer bulbs, so a defective bulb is more likely from X."
Error: conditioning on "defective" reweights by defect rate. Y's vs X's flips the balance to .
"My causes are ='sick', ='healthy', ='tired'; sum their likelihoods for ."
Error: the causes must form a partition (mutually exclusive and exhaustive). "Tired" overlaps both "sick" and "healthy", so the slices double-count — will not normalise correctly.
"The court found in a million, so in a million."
Error: the prosecutor's fallacy — the bar was silently flipped. The true posterior depends on the prior number of possible matches (the base rate of the population), often making guilt far from certain.
", since and its complement cover everything."
Error: what sums to is (over the left argument for a fixed right event). Conditioning on different events and gives probabilities from two separate shrunken worlds that need not add up.
Why questions
Why does a higher disease prevalence make the same test more trustworthy?
A larger prior widens the left strip, enlarging the true-positive sliver relative to the fixed false-positive band, so the posterior fraction climbs (from at to at ).
Why do we write conditional probability "both ways" as the first derivation step?
Both directions share the same joint — the same overlap region of the two events; writing both lets us eliminate that common term and solve for the flipped conditional.
Why must the causes form a partition before applying the full formula?
So that can occur through exactly one cause with no gaps or overlaps, making an exact accounting of every path to — the strips tile the whole square with no double-shading.
Why is Bayes called an "updating" rule rather than just an "identity"?
You feed it a prior belief and a fresh datum and it returns a revised belief; yesterday's posterior becomes today's prior, so repeated evidence updates iteratively — the engine behind continuous prior-and-posterior distributions.
Why does the "naive" independence assumption still give useful classifications?
It assumes features are conditionally independent given the class, which is often false; but for ranking classes the shared evidence term cancels, and small dependency errors rarely change which class wins.
Why can two people update to different posteriors from the same evidence?
Because they started from different priors — different strip widths; Bayes multiplies the shared likelihood by each person's own prior, so honest disagreement about starting beliefs propagates to the answer.
Edge cases
What is when ?
Undefined. Division by zero — you cannot condition on an event that never occurs, so the definition has no meaning there.
What happens to the posterior when the likelihood ?
The numerator vanishes, so : if never produces the observed evidence, then observing it rules out entirely.
What if a test is perfectly specific, ?
Then no false positives exist — the right strip's shaded band has zero height — so the evidence term reduces to , the whole numerator, and any positive gives : a positive is now conclusive.
What does Bayes give when prior and likelihood point in opposite directions (rare cause, strong evidence)?
A tug-of-war: a tiny prior can be overpowered by a very large likelihood ratio, or can survive it — the outcome is literally their product, which is why both numbers must be quoted, never one alone.
What is the posterior if the evidence is equally likely under every cause, all equal?
The evidence is uninformative; the likelihoods cancel in the normalisation and each posterior equals its prior, — no update occurs.
What happens as you apply Bayes repeatedly with overwhelming consistent evidence?
The posterior converges toward for the true cause (unless its prior was exactly ), because each update multiplies by a likelihood ratio favouring it, drowning out the initial prior.
Recall One-line self-test
If you can answer "given which event?" for every conditional you write, you have already dodged the two deadliest traps here.
Connections
- Bayes' theorem — derivation and applications — the parent this bank interrogates.
- Conditional Probability — where the direction-of-bar confusions originate.
- Law of Total Probability — the machinery behind the partition sum .
- Independent Events — formalises the "no update" edge case.
- Prior and Posterior Distributions — the continuous version of iterated updating.
- Naive Bayes Classifier — the applied "why it still works" question.
- Tree Diagrams — an alternative to the area model for the same bookkeeping.