Reasoning from evidence to cause β and the base-rate trap that catches everyone.
π Where this lives: the arithmetic in this topic is why a screening test that is "99% accurate" can be wrong nine times out of ten. That is not a flaw in the test; it is what happens when a rare condition meets an imperfect test, and misunderstanding it has produced real medical harm, wrongful prosecutions and bad security policy. Doctors, lawyers and engineers all get this wrong reliably, which makes it one of the highest-value calculations in the whole syllabus. Search "base rate fallacy medical screening false positive paradox".
Probability, and where logic fails
LOGIC REQUIRES CERTAINTY. Real knowledge does not have it, for
three reasons:
LAZINESS it is too much work to list every antecedent
and consequent β the qualification problem
from the KR issues topic
THEORETICAL there is no complete theory for the domain
IGNORANCE
PRACTICAL even with a complete theory, not all the tests
IGNORANCE have been run on this patient
So instead of asserting a sentence true or false, we assign a
DEGREE OF BELIEF between 0 and 1.
THE BASIC MACHINERY:
P(a) PRIOR or unconditional probability of a
P(a | b) POSTERIOR or conditional probability of a
GIVEN b
P(a, b) JOINT probability of a and b together
RANDOM VARIABLE a variable with a domain of values; a
BOOLEAN variable has domain {true, false}
THE AXIOMS (Kolmogorov):
1. 0 β€ P(a) β€ 1
2. P(true) = 1 and P(false) = 0
3. P(a β¨ b) = P(a) + P(b) β P(a β§ b) INCLUSION-EXCLUSION
THE DEFINITION OF CONDITIONAL PROBABILITY, which everything
else follows from:
P(a | b) = P(a β§ b) / P(b) whenever P(b) > 0
Rearranged, this is the PRODUCT RULE:
P(a β§ b) = P(a | b) P(b) = P(b | a) P(a)
MARGINALISATION β summing out a variable you do not care about:
P(Y) = Ξ£ over z of P(Y, z)
and CONDITIONING:
P(Y) = Ξ£ over z of P(Y | z) P(z)
NORMALISATION β the trick that saves work in practice. Because
the probabilities of an exhaustive set of alternatives must sum
to 1, you can compute unnormalised values and scale at the end:
P(X | e) = Ξ± P(X, e) where Ξ± is whatever makes the
distribution sum to 1
THIS MEANS THE DENOMINATOR P(e) OFTEN NEED NOT BE COMPUTED
DIRECTLY β a practical simplification used constantly.
INDEPENDENCE:
a and b are INDEPENDENT if P(a | b) = P(a), equivalently
P(a β§ b) = P(a) P(b).
CONDITIONAL INDEPENDENCE is the important one:
a and b are conditionally independent GIVEN c if
P(a | b, c) = P(a | c)
"once c is known, b tells you nothing more about a."
CONDITIONAL INDEPENDENCE IS WHAT MAKES PROBABILISTIC
REASONING TRACTABLE, and it is the entire basis of the
Bayesian networks in the next topic.
WHY THE FULL JOINT DISTRIBUTION IS NOT AN OPTION:
with n boolean variables, the joint distribution has 2^n
entries and 2^n β 1 independent numbers:
5 variables β 31
10 variables β 1,023
20 variables β 1,048,575
30 variables β 1,073,741,823
Specifying a billion numbers by hand is impossible, and no
data set would determine them. THE PROBLEM IS THE SAME
COMBINATORIAL EXPLOSION AS EVERYWHERE ELSE, and the solution
is the same: exploit structure.
Bayes' rule
FROM THE PRODUCT RULE, written both ways:
P(a β§ b) = P(a | b) P(b)
P(a β§ b) = P(b | a) P(a)
Equating and rearranging gives BAYES' RULE:
P(b | a) P(a)
P(a | b) = βββββββββββββ
P(b)
IN THE CONDITIONALISED FORM used in diagnosis:
P(effect | cause) P(cause)
P(cause | effect) = ββββββββββββββββββββββββββ
P(effect)
READ WHAT THIS DOES: it converts CAUSAL knowledge β which is
what experts have and what is stable β into DIAGNOSTIC knowledge
β which is what you need and what depends on prevalence.
P(symptom | disease) is a fact about biology. It does not
change when an epidemic arrives.
P(disease | symptom) is what the doctor wants, and it
CHANGES WITH PREVALENCE.
THAT ASYMMETRY IS THE ENTIRE POINT OF BAYES' RULE, and the
reason it is worth memorising.
THE TERMINOLOGY:
P(a) the PRIOR β belief before the evidence
P(b | a) the LIKELIHOOD β how well a explains b
P(b) the EVIDENCE or normalising constant
P(a | b) the POSTERIOR β belief after the evidence
AND P(b) EXPANDED BY THE LAW OF TOTAL PROBABILITY:
P(b) = P(b | a) P(a) + P(b | Β¬a) P(Β¬a)
This is the form to use in calculations, because the two
likelihood terms are usually what you are given.
THE WORKED EXAMPLE THAT MATTERS β a medical screening test.
GIVEN:
a disease with PREVALENCE 0.1% P(D) = 0.001
the test detects it 99% of the time P(+|D) = 0.99
(SENSITIVITY)
it is negative 99% of the time in the
healthy (SPECIFICITY 99%) P(+|Β¬D)= 0.01
A PATIENT TESTS POSITIVE. What is the probability they have
the disease?
STEP 1 β the evidence, by total probability:
P(+) = P(+|D)P(D) + P(+|Β¬D)P(Β¬D)
= 0.99 Γ 0.001 + 0.01 Γ 0.999
= 0.00099 + 0.00999
= 0.01098
STEP 2 β Bayes' rule:
P(D|+) = P(+|D)P(D) / P(+)
= 0.00099 / 0.01098
= 0.0902
THE ANSWER IS 9.02%. A 99%-accurate test, a positive result,
and the patient is over 90% likely to be HEALTHY.
WHY β the intuition, which is worth more than the formula.
Take 100,000 people:
100 have the disease (0.1%). Of these, 99 test positive.
99,900 are healthy. Of these, 1% β that is 999 β test
positive anyway.
TOTAL POSITIVES: 99 + 999 = 1,098
of whom 99 are genuinely ill β 99/1098 = 9.02%
THE FALSE POSITIVES OUTNUMBER THE TRUE POSITIVES TEN TO ONE,
because there are a thousand times more healthy people to
generate them. THE BASE RATE DOMINATES.
HOW THE ANSWER CHANGES β the sensitivity of the result:
prevalence 0.1% β P(D|+) = 9.02%
prevalence 1% β P(D|+) = 50.00%
prevalence 10% β P(D|+) = 91.67%
SAME TEST, THREE COMPLETELY DIFFERENT CONCLUSIONS. This is
why screening the general population differs from testing
someone with symptoms: the symptoms raise the prior.
AND IMPROVING THE TEST:
keep prevalence 0.1%, raise specificity to 99.9%
P(+) = 0.99Γ0.001 + 0.001Γ0.999 = 0.001989
P(D|+) = 0.00099/0.001989 = 49.77%
A TENFOLD REDUCTION IN THE FALSE-POSITIVE RATE took the
answer from 9% to 50%. NOTE THAT SPECIFICITY, NOT
SENSITIVITY, IS WHAT MATTERS FOR A RARE CONDITION β which is
the opposite of most people's instinct, and directly
parallels the fraud-detector precision result from the AI
applications topic.
Combining evidence, and the practical lessons
MULTIPLE PIECES OF EVIDENCE β and why the naive approach needs a
justification.
In general, combining evidence requires the full joint
distribution:
P(cause | eβ, eβ) = Ξ± P(eβ, eβ | cause) P(cause)
and P(eβ, eβ | cause) is a table, not two numbers.
THE NAIVE BAYES ASSUMPTION: the pieces of evidence are
CONDITIONALLY INDEPENDENT GIVEN THE CAUSE:
P(eβ, eβ | cause) = P(eβ | cause) P(eβ | cause)
giving
P(cause | eβ, eβ) = Ξ± P(cause) P(eβ|cause) P(eβ|cause)
and in general
P(Cause | eβ β¦ eβ) = Ξ± P(Cause) Ξ P(eα΅’ | Cause)
THIS IS THE NAIVE BAYES MODEL, and it reduces the parameter
count from exponential to linear:
n binary symptoms, full joint per disease: 2^n β 1 numbers
naive Bayes: n numbers
at n = 20 that is 1,048,575 against 20.
IT IS CALLED "NAIVE" BECAUSE THE ASSUMPTION IS USUALLY FALSE β
symptoms are correlated β and yet the model works remarkably
well in practice, particularly for classification. The reason:
classification needs only the ARGMAX to be right, and the errors
in the individual probabilities often do not change which class
wins. This model returns in the machine learning section.
WORKED, two symptoms:
P(Flu) = 0.05
P(fever | Flu) = 0.90 P(fever | Β¬Flu) = 0.20
P(ache | Flu) = 0.80 P(ache | Β¬Flu) = 0.10
A patient has both. P(Flu | fever, ache)?
numerator for Flu: 0.05 Γ 0.90 Γ 0.80 = 0.0360
numerator for Β¬Flu: 0.95 Γ 0.20 Γ 0.10 = 0.0190
normalise: 0.0360 / (0.0360 + 0.0190) = 0.6545
ANSWER 65.45%. Note how the prior of 5% was pulled up to
65% by two pieces of evidence β and that normalising made
P(fever, ache) unnecessary to compute.
THE PRACTICAL LESSONS β what to take away:
1. ALWAYS ASK FOR THE BASE RATE. A conditional probability
without a prior is uninterpretable. "The test is 99%
accurate" is not enough information to act on.
2. FOR RARE EVENTS, THE FALSE-POSITIVE RATE DOMINATES. Improving
specificity matters more than improving sensitivity, because
the healthy population is so much larger.
3. ACCURACY IS A USELESS SINGLE NUMBER on imbalanced data β the
same conclusion the AI applications topic reached about
fraud detection, arrived at from the probability side.
4. TESTING IN SEQUENCE WORKS. A cheap screening test raises the
prior for a second, more specific test. Starting from 9.02%
rather than 0.1%, a second independent test with the same
characteristics gives
P(+) = 0.99 Γ 0.0902 + 0.01 Γ 0.9098 = 0.09840
P(D | ++) = 0.089298/0.09840 = 90.75%
TWO POSITIVES TAKE IT FROM 9% TO 90.75%. This is why real
diagnostic protocols are staged, and it is Bayes' rule
applied iteratively β each posterior becomes the next
prior.
5. BAYES' RULE IS HOW EVIDENCE UPDATES BELIEF, so it is the
correct model of learning from data. That framing is the
bridge to the rest of the section: a Bayesian network is a
structured way to hold the priors and likelihoods for many
variables at once, and belief propagation is how the update
is computed when there are more than two.
The counter-intuitive practical conclusion: for a rare condition, specificity matters more than sensitivity. Raising the test's detection rate helps the 100 ill people; cutting the false-positive rate helps against the 99,900 healthy ones, and there are a thousand times more of them. Most people's instinct optimises the wrong number.
π Go further: this arithmetic has decided court cases. The prosecutor's fallacy is exactly the confusion Bayes' rule resolves: stating that a DNA match has a one-in-a-million random-match probability and concluding the defendant is a million-to-one likely guilty. That inverts P(evidence | innocent) into P(innocent | evidence) without the prior β and if the match came from a database search over a million profiles, a coincidental match is expected. Several convictions have been overturned on this reasoning, which makes it the most consequential single calculation in the syllabus. Search "prosecutor's fallacy DNA evidence base rate".
π‘ Exam angle: state the axioms of probability, the definition of conditional probability, the product rule, and marginalisation. Write Bayes' rule in both the plain and the cause/effect form, and name the four terms (prior, likelihood, evidence, posterior). The near-certain numerical question is the medical test: compute P(+) by total probability and then P(D|+), and be ready to explain the result with the population-counting intuition. Define independence and conditional independence, and state the naive Bayes assumption with the formula and the parameter saving (2βΏβ1 versus n). Explain why specificity dominates for rare conditions.
Syllabus points
Bayes' theorem (numerical)
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.