Conditional Probability

⚡ Key Takeaways

Conditional probability measures the likelihood of an event AA given that another event BB is known to have occurred, written P(A∣B)P(A \mid B). Its defining formula is P(A∣B)=P(A∩B)/P(B)P(A \mid B) = P(A \cap B) / P(B). It applies everywhere uncertainty is updated by new information — medical testing, spam filters, gambling, weather forecasts, and machine learning. Formalized by Thomas Bayes (1763) and Pierre-Simon Laplace (1812), it is the backbone of modern probabilistic reasoning.

💡 The Core Insight

When you learn that BB occurred, you discard every outcome where BB is false and renormalize what remains so the surviving probabilities again sum to 1. Conditional probability is nothing more than restricting attention to the sub-universe of outcomes consistent with your evidence, then asking how much of that sub-universe also satisfies AA. The division by P(B)P(B) is precisely this renormalization.

Formal Statement

DefinitionConditional Probability

Let AA and BB be events in a sample space Ω\Omega with a probability measure PP, and suppose P(B)>0P(B) > 0. The conditional probability of AA given BB is:

1
P(A∣B)=P(A∩B)P(B)\quad P(A \mid B) = \frac{P(A \cap B)}{P(B)}

Derivation hint: Restrict the sample space to BB; the favorable outcomes are those in both AA and BB, namely A∩BA \cap B, and we divide by the "new total" P(B)P(B). Here:

  • Ω\Omega = the sample space (set of all possible outcomes),
  • A,B⊆ΩA, B \subseteq \Omega = events,
  • A∩BA \cap B = the event that both AA and BB occur,
  • P(B)P(B) = the (unconditional) probability of BB, required to be strictly positive,
  • P(A∣B)P(A \mid B) = probability of AA given that BB has occurred.

Rearranging equation [1] gives the multiplication rule, often more useful in practice:

2
P(A∩B)=P(A∣B) P(B)=P(B∣A) P(A)\quad P(A \cap B) = P(A \mid B)\, P(B) = P(B \mid A)\, P(A)

Derivation hint: Multiply both sides of [1] by P(B)P(B); symmetry follows by swapping the roles of AA and BB.

TheoremBayes' Theorem

For events AA and BB with P(A)>0P(A) > 0 and P(B)>0P(B) > 0:

3
P(A∣B)=P(B∣A) P(A)P(B)\quad P(A \mid B) = \frac{P(B \mid A)\, P(A)}{P(B)}

Derivation hint: Set the two expressions for P(A∩B)P(A \cap B) in equation [2] equal and solve for P(A∣B)P(A \mid B). When the denominator must be expanded over a partition {A1,A2,…,An}\{A_1, A_2, \dots, A_n\} of Ω\Omega (the law of total probability):

4
P(B)=∑i=1nP(B∣Ai) P(Ai)\quad P(B) = \sum_{i=1}^{n} P(B \mid A_i)\, P(A_i)

Derivation hint: The events B∩AiB \cap A_i are disjoint and their union is BB; apply the multiplication rule [2] to each term P(B∩Ai)P(B \cap A_i).

TheoremIndependence

Events AA and BB are independent if and only if:

5
P(A∩B)=P(A) P(B)⟺P(A∣B)=P(A)\quad P(A \cap B) = P(A)\, P(B) \quad\Longleftrightarrow\quad P(A \mid B) = P(A)

Derivation hint: Substitute P(A∩B)=P(A)P(B)P(A \cap B) = P(A)P(B) into [1]; the P(B)P(B) cancels, leaving P(A∣B)=P(A)P(A \mid B) = P(A) — knowing BB tells you nothing about AA.

Why It Holds / Derivation

ProofJustifying the Definition via Renormalization

We show that equation [1] is the unique sensible definition for "probability of AA within the world where BB holds." 1. Restrict the universe. Given that BB occurred, only outcomes inside BB remain possible. We seek a new probability measure PBP_B defined on subsets of BB. 2. Proportionality. Within BB, relative likelihoods should be preserved — if outcome xx was twice as likely as yy before, it still is. So PB(A)=c⋅P(A∩B)P_B(A) = c \cdot P(A \cap B) for some constant cc, since only the part of AA inside BB matters. 3. Normalization. A valid probability requires PB(B)=1P_B(B) = 1. Thus 1=c⋅P(B∩B)=c⋅P(B)1 = c \cdot P(B \cap B) = c \cdot P(B), giving c=1/P(B)c = 1/P(B). 4. Conclude. Therefore PB(A)=P(A∩B)P(B)P_B(A) = \dfrac{P(A \cap B)}{P(B)}, which is exactly P(A∣B)P(A \mid B) in equation [1]. ■\blacksquare

∎
ProofThat Conditional Probability Is Itself a Valid Probability

Fix BB with P(B)>0P(B) > 0. We verify P(⋅∣B)P(\cdot \mid B) satisfies the Kolmogorov axioms. 1. Non-negativity: P(A∣B)=P(A∩B)/P(B)≥0P(A \mid B) = P(A\cap B)/P(B) \ge 0 since both factors are non-negative. 2. Total mass: P(Ω∣B)=P(Ω∩B)/P(B)=P(B)/P(B)=1P(\Omega \mid B) = P(\Omega \cap B)/P(B) = P(B)/P(B) = 1. 3. Countable additivity: For disjoint A1,A2,…A_1, A_2, \dots, the sets Ai∩BA_i \cap B are also disjoint, so

P ⁣(⋃iAi | B)=P ⁣(⋃i(Ai∩B))P(B)=∑iP(Ai∩B)P(B)=∑iP(Ai∣B).P\!\left(\bigcup_i A_i \,\middle|\, B\right) = \frac{P\!\left(\bigcup_i (A_i \cap B)\right)}{P(B)} = \frac{\sum_i P(A_i \cap B)}{P(B)} = \sum_i P(A_i \mid B).

Hence P(⋅∣B)P(\cdot \mid B) is a genuine probability measure. ■\blacksquare

∎
mathematician · Thomas Bayes | c. 1701–1761

An English Presbyterian minister and amateur mathematician, Bayes left an unpublished essay solving the "inverse probability" problem: given observed outcomes, how do we infer the probability of an underlying cause? His friend Richard Price edited and published it posthumously in 1763 as An Essay towards solving a Problem in the Doctrine of Chances. Bayes considered a thought experiment of balls rolled on a table — reasoning backward from where later balls land to where an unseen first ball lies. Though he never wrote the theorem in its modern form, the principle of reversing conditionals — turning P(B∣A)P(B \mid A) into P(A∣B)P(A \mid B) — bears his name and underlies an entire school of statistical inference.

Building Intuition

🧠 Intuition

Picture the sample space as a rectangle of total area 1. Event BB is a region inside it; event AA is another region, possibly overlapping. The unconditional P(A)P(A) is the fraction of the whole rectangle covered by AA. But P(A∣B)P(A \mid B) throws away everything outside BB and asks: of the area now remaining (just BB), what fraction is also AA? That fraction is the overlap A∩BA \cap B divided by all of BB. This is why conditioning can raise or lower a probability. If AA overlaps BB heavily, learning BB makes AA more likely. If they barely overlap, BB makes AA less likely. And if AA's share of BB equals its share of the whole space, then BB is irrelevant — that is independence.

Figure
Conditional probability as renormalization: restricting the universe to B
Ω (total area = 1) A B A∩B P(A|B) = area(A∩B) / area(B) — only the gold region B is the "new universe"

Worked Examples

ExampleTwo Dice — The Sum Given a Six

Given: Roll two fair six-sided dice. Let AA = "the sum is 8" and BB = "at least one die shows a 6." Find P(A∣B)P(A \mid B).

Step 1 — Count BB. Outcomes with at least one 6: there are 11 (the six (6,x)(6, x) plus the six (x,6)(x, 6), minus the double-counted (6,6)(6,6)). So P(B)=11/36P(B) = 11/36.

Step 2 — Count A∩BA \cap B. Sum 8 and a six: only (6,2)(6,2) and (2,6)(2,6). So P(A∩B)=2/36P(A \cap B) = 2/36.

Step 3 — Apply equation [1].

P(A∣B)=2/3611/36=211.P(A \mid B) = \frac{2/36}{11/36} = \frac{2}{11}.

Answer:

P(A∣B)=211≈0.182\boxed{P(A \mid B) = \tfrac{2}{11} \approx 0.182}

Note that unconditionally P(A)=5/36≈0.139P(A) = 5/36 \approx 0.139, so learning "at least one six" raised the probability of an 8.

ExampleMedical Test — Bayes in Action

Given: A disease affects 1% of a population: P(D)=0.01P(D) = 0.01. A test has sensitivity P(+∣D)=0.99P(+ \mid D) = 0.99 and false-positive rate P(+∣¬D)=0.05P(+ \mid \neg D) = 0.05. A person tests positive. Find P(D∣+)P(D \mid +).

Step 1 — Total probability of a positive (equation [4]).

P(+)=P(+∣D)P(D)+P(+∣¬D)P(¬D)=(0.99)(0.01)+(0.05)(0.99).P(+) = P(+\mid D)P(D) + P(+\mid \neg D)P(\neg D) = (0.99)(0.01) + (0.05)(0.99).
P(+)=0.0099+0.0495=0.0594.P(+) = 0.0099 + 0.0495 = 0.0594.

Step 2 — Apply Bayes' theorem (equation [3]).

P(D∣+)=P(+∣D) P(D)P(+)=0.00990.0594.P(D \mid +) = \frac{P(+\mid D)\,P(D)}{P(+)} = \frac{0.0099}{0.0594}.

Answer:

P(D∣+)≈0.167=16.7%\boxed{P(D \mid +) \approx 0.167 = 16.7\%}

Despite a 99% sensitive test, a positive result means only a ~17% chance of disease, because the disease is rare. This is the famous base-rate effect.

Common Misconceptions

⚠️ Do Not Confuse P(A∣B)P(A \mid B) with P(B∣A)P(B \mid A)

These are generally not equal. In the medical example, P(+∣D)=0.99P(+ \mid D) = 0.99 but P(D∣+)≈0.17P(D \mid +) \approx 0.17. Swapping them is the prosecutor's fallacy: "the chance of this DNA match if innocent is 1 in a million, therefore the chance the defendant is innocent is 1 in a million" is invalid reasoning that ignores the base rate of innocent people. Equation [3] is precisely the correct way to convert one into the other.

⚠️ Conditioning on a Zero-Probability Event

Equation [1] requires P(B)>0P(B) > 0. If P(B)=0P(B) = 0, the ratio 0/00/0 is undefined and P(A∣B)P(A \mid B) has no meaning from the elementary definition. Handling such cases (e.g., conditioning on a continuous variable taking an exact value) requires the more advanced machinery of conditional densities and measure theory.

CounterexampleIndependence Is Not "Mutual Exclusivity"

A common error is thinking disjoint (mutually exclusive) events are independent. They are nearly the opposite. If AA and BB are disjoint with positive probabilities, then A∩B=∅A \cap B = \varnothing, so P(A∣B)=0≠P(A)P(A \mid B) = 0 \neq P(A). Knowing BB occurred tells you AA cannot have — that is maximal dependence, not independence. For example, "rolling a 2" and "rolling a 5" on one die are mutually exclusive but strongly dependent.

Connections

connection

Conditional probability is the hinge connecting many topics. It generalizes Joint Probability via the multiplication rule [2], and it specializes to ordinary probability when the condition is Ω\Omega. It defines Statistical Independence (equation [5]) and powers Bayes' Theorem for inference. The Law of Total Probability (equation [4]) decomposes events over a partition, and conditional probability underlies Conditional Expectation, Markov Chains (where the future depends only on the present state), and Random Variables through conditional distributions. It is also the foundation of Decision Theory under uncertainty.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1654 — Blaise Pascal and Pierre de Fermat correspond about the "problem of points," laying groundwork for probability and implicitly conditional reasoning.
- 1713 — Jacob Bernoulli's Ars Conjectandi establishes the law of large numbers, framing probability as quantified uncertainty.
- 1763 — Thomas Bayes' essay is published posthumously by Richard Price, introducing inverse probability.
- 1774 & 1812 — Pierre-Simon Laplace independently develops and greatly extends Bayesian ideas in Théorie analytique des probabilités, giving the rule its general form.
- 1837 — Siméon Poisson clarifies conditional reasoning in his work on judgments and probability.
- 1933 — Andrey Kolmogorov's Grundbegriffe der Wahrscheinlichkeitsrechnung axiomatizes probability, defining conditional probability rigorously and extending it to general (measure-theoretic) conditioning.
- 1950s — Conditional probability becomes central to information theory (Shannon) and statistical decision theory (Wald).
- 1980s–1990s — Judea Pearl develops Bayesian networks, making conditional dependence a computational engine for AI.
- 2000s–present — Bayesian methods dominate machine learning, genomics, and data science.

Subtleties & Limits

open-problem

Conditioning on events of probability zero — for example, "given that a randomly chosen point lies exactly on a line" — cannot be handled by equation [1] and leads to the Borel–Kolmogorov paradox, where the answer depends on how one approaches the limiting condition. The measure-theoretic resolution defines conditional expectation as a Radon–Nikodym derivative, but it is only specified "almost everywhere," leaving genuine philosophical ambiguity about conditioning on individual zero-probability outcomes. Foundational debates between frequentist and Bayesian interpretations of what P(A∣B)P(A \mid B) means — a long-run frequency versus a degree of belief — remain unresolved and actively shape statistical practice today.

See Also

Bayes' Theorem · Statistical Independence · Law of Total Probability · Joint Probability · Conditional Expectation · Markov Chains · Probability Axioms · Random Variables