Conditional Probability

A smoker asks their doctor: "What is my real risk of lung cancer?" The answer is not the risk averaged over an entire population. It is the risk given that they smoke — a different, more useful number. This distinction is between an unconditional probability and one updated by information. It is the subject of conditional probability. Conditional probability formalizes a habit every clinician, ecologist, and geneticist already practices. It means revising a belief once new evidence arrives. Knowing that a patient is exposed to asbestos changes the probability of the outcome we care about. The same is true if a plant carries a particular allele. It is also true if a population lives in a malarial region. Without a rigorous way to update probabilities, epidemiology could not separate risk factors from noise. Diagnostic medicine, too, could not interpret a single test result. The big picture is this: probability is not a fixed property of an event alone. It is a property of an event relative to a state of knowledge. The Multiplication Rule and Independence already hinted at this. Two events are independent exactly when conditioning on one leaves the other's probability unchanged. Conditional probability makes that idea precise and gives it a formula. It turns a qualitative notion ("smoking raises cancer risk") into a quantitative one ("risk given exposure equals this specific number"). This article builds the formal definition from first principles using a labeled sample space. It works through a full disease-and-exposure case with numbers that do not simplify too conveniently. It contrasts conditional probability with the marginal and joint probabilities it is built from. It also previews how it feeds directly into Bayes' Theorem and Diagnostic Testing.

Key takeaways
  • Conditional probability P(A|B) is the probability of A restricted to the world where B has already happened.
  • Formula: P(A|B) = P(A ∩ B) / P(B), valid whenever P(B) > 0.
  • It rescales the sample space: B becomes the new "everything," and we ask what fraction of B also satisfies A.
  • Disease risk given exposure, P(Disease|Exposed), is a conditional probability central to epidemiology (relative risk, odds ratios).
  • P(A|B) ≠ P(B|A) in general — confusing the two is one of the most consequential errors in clinical reasoning.
  • Independence is the special case where conditioning does nothing: P(A|B) = P(A).
The core insight

Conditional probability P(A|B) = P(A ∩ B) / P(B) measures how the probability of an event changes once we restrict attention to a world where some other event is known to be true.

The core idea

Every probability is computed over a sample space, the set of all possible outcomes of a random process. An event is a subset of that sample space — a collection of outcomes we care about. Ordinarily we compute P(A), the probability of event A, as a fraction of the entire sample space. Conditional probability asks a narrower question: if we already know that event B occurred, what fraction of B's outcomes also belong to A? Formally, for events A and B in the same sample space, with P(B) > 0:

P(A | B) = P(A ∩ B) / P(B) Read "P(A given B)." The vertical bar means "restricted to the world where B is true." The numerator, P(A ∩ B), is the joint probability — the chance that both A and B happen. The denominator, P(B), is the marginal probability of B, ignoring A entirely. Dividing by P(B) rescales the picture: B's outcomes now form the whole universe, and we ask what share of that universe also satisfies A. Two quantities that are easy to confuse:

TermMeaningExample
Marginal probabilityP(B) alone, no conditioningP(Exposed)
Joint probabilityP(A ∩ B), both happenP(Disease and Exposed)
Conditional probabilityP(A\B), A restricted to B's worldP(Disease \Exposed)

Conditional probability is not a new kind of probability — it is an ordinary probability computed on a shrunken, relabeled sample space. This is why all the usual laws still apply within the conditioning: conditional probabilities are non-negative, sum to 1 over a partition, and obey their own addition rule for mutually exclusive events, exactly as in The Addition Rule and Mutually Exclusive Events. The multiplication rule from The Multiplication Rule and Independence is in fact just the conditional probability formula rearranged: P(A ∩ B) = P(B) · P(A|B). When A and B are independent, conditioning changes nothing, so P(A|B) collapses to P(A) — independence is the special case where information from B is irrelevant to A.

Mechanism — how conditioning actually works

Step 1: Start with a fully specified sample space. Every individual in a population (or every outcome of a trial) is classified on two axes simultaneously: disease status (D or not-D) and exposure status (E or not-E). This produces a 2×2 contingency table of joint probabilities that must sum to 1.

Step 2: Identify the joint probability. P(D ∩ E) is the probability a randomly chosen individual is both diseased and exposed. This is read directly off the table — it is a single cell, not a row or column total.

Step 3: Identify the marginal probability of the conditioning event. P(E) is the row (or column) total for "exposed," summing across all disease outcomes. This is the new denominator — the "world" we are restricting to.

Step 4: Rescale. Divide the joint cell by the marginal total: P(D|E) = P(D ∩ E)/P(E). Geometrically, this is asking "what fraction of the exposed sub-population is diseased?" — a question entirely internal to the exposed group, blind to the unexposed group's disease rate.

Step 5: Compare conditional probabilities to test for association. If P(D|E) = P(D|not-E), exposure carries no information about disease — the two are independent. If P(D|E) > P(D|not-E), exposure is associated with elevated risk; this comparison, formalized as a ratio, is exactly the relative risk used in epidemiology.

Step 6: Recognize the asymmetry. P(D|E) uses P(E) as the denominator. P(E|D) uses P(D) as the denominator instead — a completely different rescaling of a completely different subset. Nothing forces these two conditional probabilities to be equal, and in realistic disease/exposure scenarios they are almost always very different (this asymmetry is the seed of Bayes' theorem).

Figure
Rescaling the sample space: from population to exposed sub-population
Whole population (sample space) Exposed (E) Disease (D) D ∩ E joint prob. P(D | E) = P(D ∩ E) / P(E) restrict attention to the blue circle, then ask what fraction is also red new "whole world" = E
Figure
2×2 contingency table view: joint vs. marginal vs. conditional
Disease status by exposure status Exposed (E) Not exposed Row total Disease (D) P(D∩E) = 0.024 P(D∩Ē) = 0.006 P(D)=0.030 No disease 0.176 0.794 0.970 Column total P(E)=0.200 P(Ē)=0.800 1.000 P(D | E) = 0.024 / 0.200 = 0.12 P(D | Ē) = 0.006 / 0.800 = 0.0075

The evidence — the studies that made conditional risk rigorous

Conditional probability itself is a mathematical definition, not an empirical discovery — but its power in biology was demonstrated decisively by the studies that first used it to establish that a real exposure changes real disease risk, rather than merely coinciding with it.

Doll and Hill's British doctors study (1950–1956). Richard Doll and Austin Bradford Hill sent questionnaires on smoking habits to essentially all British doctors, then tracked mortality in this cohort for years. The key computation was not merely "what fraction of lung cancer patients smoke" (a joint-probability-flavored question, and the one earlier retrospective studies had emphasized) but rather the prospective conditional probability: P(death from lung cancer | smoker) versus P(death from lung cancer | non-smoker). By following defined exposure groups forward in time and computing outcome rates within each group, Doll and Hill obtained a clean estimate of risk conditional on exposure, uncontaminated by the reverse and much harder question of exposure conditional on disease. Their 1956 report found death rates from lung cancer roughly 20 times higher in heavy smokers than in nonsmokers among doctors followed prospectively — a huge, and repeatable, conditional-probability gap that case-control studies alone could not have pinned down with the same confidence, because case-control designs estimate P(Exposed|Disease), not P(Disease|Exposed), directly.

Why the direction of conditioning mattered enormously here. Early retrospective (case-control) studies compared smoking rates in lung cancer patients versus healthy controls — effectively estimating P(smoker | cancer). Critics (including the statistician Ronald Fisher, who remained skeptical for years) pointed out that this does not by itself establish P(cancer | smoker), the quantity that matters for personal risk and public health policy, because the two conditional probabilities need not move together in magnitude even when both indicate an association. The prospective cohort design directly targeted P(cancer | smoker) by fixing exposure groups first and observing outcomes after, which is precisely what conditional probability, correctly set up, requires. This resolved the debate: the forward conditional probability was large and consistent across multiple cohorts (British doctors, U.S. veterans, and others), and it became one of the founding successes of modern epidemiology and a template for how conditional probability, not raw correlation, should be used to quantify exposure-outcome relationships.

What it proved. It established, with numbers, that conditioning on a genuine causal exposure produces a conditional probability sharply different from the marginal (population-wide) probability — turning "smoking might be linked to cancer" into "P(lung cancer death | heavy smoker) is roughly 20-fold P(lung cancer death | nonsmoker)," a statement precise enough to drive the 1964 U.S. Surgeon General's report and decades of public health policy.

Worked examples

Example 1 — Disease risk given exposure, with asymmetric numbers. A population of 100,000 people is surveyed for exposure to a contaminated water source and for a resulting gastrointestinal illness.

Exposed (E)Not exposed (Ē)Total
Illness (D)1,2003001,500
No illness8,80089,70098,500
Total10,00090,000100,000

Convert counts to probabilities by dividing by 100,000: ``` P(D ∩ E) = 1,200 / 100,000 = 0.012 P(E) = 10,000 / 100,000 = 0.10 P(D ∩ Ē) = 300 / 100,000 = 0.003 P(Ē) = 90,000 / 100,000 = 0.90 ``` Now compute the two conditional probabilities: ``` P(D | E) = P(D ∩ E) / P(E) = 0.012 / 0.10 = 0.12 (12%) P(D | Ē) = P(D ∩ Ē) / P(Ē) = 0.003 / 0.90 = 0.00333 (0.33%) ``` The relative risk is P(D|E) / P(D|Ē) = 0.12 / 0.00333 ≈ 36. Exposed individuals are about 36 times as likely to fall ill as unexposed individuals — a large, biologically meaningful effect that would be invisible if we only looked at the unconditional (marginal) illness rate, P(D) = 1,500/100,000 = 1.5%, which blends the two very different sub-populations together and masks the exposure effect. Notice also the asymmetry: P(E | D), the probability an ill person was exposed, is a different number: ``` P(E | D) = P(D ∩ E) / P(D) = 0.012 / 0.015 = 0.80 (80%) ``` Eighty percent of ill people were exposed — a striking figure, but a different question from "what fraction of exposed people get ill" (12%). Mixing these two up is the single most common conceptual error in interpreting exposure-disease data, and it is exactly what Bayes' Theorem and Diagnostic Testing exists to convert correctly between.

Example 2 — Genetic cross with conditioning on phenotype (non-trivial ratios). Consider a plant species where flower color follows a two-gene model: gene A (A = purple-permitting dominant, a = recessive) and gene B, a modifier that is epistatic — only individuals with at least one dominant A allele express color at all; among those, genotype B_ (at least one B) gives dark purple and bb gives pale purple. A dihybrid cross AaBb × AaBb gives the classic 9:3:3:1 genotypic-class ratio: ``` 9/16 A_B_ → dark purple 3/16 A_bb → pale purple 3/16 aaB_ → white (epistasis masks B) 1/16 aabb → white ``` So P(white) = 3/16 + 1/16 = 4/16 = 0.25, and P(colored) = 12/16 = 0.75.

Question: given that a randomly chosen offspring is colored (not white), what is the conditional probability it is dark purple rather than pale purple? Let D = "dark purple," P = "pale purple," C = "colored" = D ∪ P (mutually exclusive, so this uses The Addition Rule and Mutually Exclusive Events). ``` P(C) = P(D) + P(P) = 9/16 + 3/16 = 12/16 = 0.75 P(D | C) = P(D ∩ C) / P(C) = P(D) / P(C) [since D ⊆ C, D ∩ C = D] = (9/16) / (12/16) = 9/12 = 0.75 P(P | C) = 3/12 = 0.25 ``` So conditioning on "colored" converts the raw 9:3:3:1 genotypic ratio into a clean 3:1 dark-to-pale ratio among colored offspring — the white classes have simply been rescaled out of the picture, exactly as the mechanism section describes: B (colored) becomes the new "whole world," and we ask what fraction of it is dark purple. This is precisely how a breeder interpreting only the colored offspring in a greenhouse (unable to see or count the white ones, say, because they were culled before scoring) would correctly reconstruct the underlying 3:1 modifier ratio.

Common misconceptions & traps

MisconceptionWhy it's wrongCorrect view
P(A\B) = P(B\A)Conditioning direction changes the denominator entirelyThese are related by Bayes' theorem but generally unequal (Example 1: 12% vs. 80%)
A rare disease with a "high-risk" exposure must mean most exposed people get sickConfuses relative risk with absolute conditional probabilityP(D\E) can be small in absolute terms (0.12 above) yet huge relative to P(D\Ē)
Conditioning on B always increases P(A)Only true if B is positively associated with AConditioning can decrease, increase, or leave P(A) unchanged (the independent case)
P(A\B) is a joint probabilityIt is a rescaled probability, not P(A∩B) itselfAlways divide by P(B); never report the joint number as if it were conditional
If P(A\B) is high, B causes AConditional probability is purely descriptive of associationCausation requires experimental design (e.g., randomization), not conditioning alone

The scientist behind it

Conditional probability as a formal object traces to the foundational work of Andrey Kolmogorov, who in 1933 gave probability theory its modern axiomatic footing and defined P(A|B) precisely as P(A∩B)/P(B) within that system. Its biological application, however, was sharpened enormously by Sir Austin Bradford Hill, a British medical statistician who — together with Richard Doll — insisted on the conditional, exposure-first framing that let epidemiology distinguish P(disease|exposure) from the far easier but less useful P(exposure|disease). Hill had no medical degree; trained as a statistician after tuberculosis ended his own plans to become a doctor, he brought rigorous probabilistic reasoning to clinical research, co-developing the modern randomized controlled trial and, with Doll, the cohort methodology that made conditional disease risk a measurable, defensible number rather than an impression.

Origins · 1 minSir Austin Bradford Hill and how this was discovered
SA
Sir Austin Bradford Hill
1897–1991 · British medical statistician, architect of the Doll–Hill smoking studies and modern clinical trial design

History
- 1933 — Andrey Kolmogorov formalizes conditional probability, P(A\|B) = P(A∩B)/P(B), within his probability axioms.
- 1948 — Hill designs the first modern randomized controlled trial (streptomycin for tuberculosis), establishing conditioning-by-design as a research standard.
- 1950 — Doll and Hill publish a retrospective case-control study linking smoking and lung cancer.
- 1954–1956 — The British doctors prospective cohort study directly estimates P(lung cancer death \| smoking status), finding roughly a 20-fold conditional risk gap.
- 1965 — Hill formalizes criteria (the "Bradford Hill criteria") for moving from strong conditional association toward causal inference.

Where this matters today

Conditional probability underlies nearly every quantitative claim in modern biomedical and biological science. In clinical epidemiology, relative risk and odds ratios reported in journal articles are ratios of conditional probabilities, P(outcome|exposed) versus P(outcome|unexposed), and every "risk factor" headline is a claim about conditioning. In diagnostic testing, P(disease|positive test result) is the number a patient actually needs, and it differs sharply from the test's advertised sensitivity, P(positive|disease) — the gap between them is closed by Bayes' Theorem and Diagnostic Testing. In genetics and genomics, conditional probability governs recombination-based linkage analysis, carrier-risk counseling (P(affected offspring|both parents carriers)), and interpreting genome-wide association results conditional on ancestry or covariates. In ecology and conservation, extinction-risk models compute P(population decline|habitat loss of a given magnitude), and disease ecologists compute P(spillover|contact rate) for zoonotic pathogens. In agriculture, plant and animal breeders use conditional probabilities exactly as in the flower-color example to predict trait ratios among surviving or selected offspring, informing breeding-program design. In public health surveillance, contact tracing computes P(infected|contact with a case) to prioritize testing resources, a direct descendant of the same 2×2-table logic used above.

Ask the tutor: How does conditioning on a positive diagnostic test result differ from conditioning on true disease status, and why does that gap matter for interpreting a patient's actual risk?

What is the difference between P(A and B) and P(A|B)?

P(A ∩ B), the joint probability, is the chance both events happen, measured against the entire original sample space. P(A|B) is the chance A happens measured against the smaller world where B is already known to be true — it rescales by dividing out P(B). Numerically, P(A|B) is usually larger than P(A ∩ B) because the denominator shrinks from 1 (implicitly, for the whole space) down to P(B), which is less than 1. They answer different questions: "what fraction of everyone has both traits" versus "of those with trait B, what fraction also has trait A."

Why isn't P(Disease | Exposed) the same as P(Exposed | Disease)?

Because each conditions on a different event, and therefore divides by a different denominator: P(D\|E) divides the joint probability by P(E), while P(E\|D) divides it by P(D). Unless P(E) happens to equal P(D), these fractions differ, sometimes dramatically. In the water-contamination example, P(D\|E) was 12% while P(E\|D) was 80% — both true statements about the same table, but answering entirely different questions (personal risk from exposure versus retrospective likelihood of exposure among the sick).

Can conditional probability prove that an exposure causes a disease?

No. Conditional probability quantifies association, not causation. A high P(disease|exposed) could arise from genuine causation, from a shared confounding factor (e.g., both exposure and disease linked to age or socioeconomic status), or from reverse causation in poorly designed studies. Establishing causation additionally requires study design tools such as randomization, controlling for confounders, temporal ordering (exposure preceding outcome), dose-response relationships, and biological plausibility — the kind of criteria Austin Bradford Hill later codified.

How does conditional probability relate to independence?

Two events A and B are defined as independent precisely when conditioning on one does not change the probability of the other: P(A|B) = P(A) (equivalently P(B|A) = P(B)). This is the same independence introduced in The Multiplication Rule and Independence, now expressed through conditioning rather than through the multiplication shortcut P(A∩B) = P(A)·P(B). If P(A|B) ≠ P(A), the events are dependent, and B carries real information about A.

Why do epidemiologists prefer prospective cohort studies over retrospective case-control studies when possible?

Cohort studies fix the conditioning event (exposure status) at the start and measure outcomes afterward, directly yielding P(disease|exposed) versus P(disease|unexposed) — the quantity relevant to personal and public health risk. Case-control studies instead select on outcome (disease status) and look backward at exposure history, directly yielding P(exposed|diseased), a different and less directly useful conditional probability, though it can be converted using the odds ratio and Bayes' theorem under certain assumptions. Cohort studies are more expensive and slower but avoid this direction-of-conditioning ambiguity.

What happens to the conditional probability formula if P(B) = 0?

It is undefined — you cannot divide by zero, so P(A|B) is simply not defined when B is an impossible or probability-zero event. Biologically, this corresponds to conditioning on an exposure or genotype that never occurs in the population being studied; there is no sensible "risk given that exposure" to compute because there is no sub-population to restrict attention to. In continuous settings (rare in intro biostatistics but common in quantitative genetics), this technical issue is handled with more advanced tools, but the basic warning — P(B) must be strictly positive — always applies.

Does a large relative risk always mean a large absolute risk?

No, and this is a frequent source of confusion in reading health news. Relative risk compares P(D|E) to P(D|Ē) as a ratio; it can be large (say, 36-fold, as in Example 1) even when both absolute conditional probabilities are small in everyday terms (0.12 and 0.0033). Public health decisions need both numbers: the relative risk tells you how much exposure matters proportionally, while the absolute conditional probability, P(D|E) itself, tells you how likely any individual exposed person actually is to be affected.

Before this

Where this leads