Conditional Probability

Conditional probability is the probability of an event occurring given that another event is already known to have occurred — the probability of rain given that it's cloudy, written formally as P(rain | cloudy), which is read "the probability of rain given cloudy." It's a fundamentally different quantity from the plain, unconditional probability of rain on an arbitrary day, because conditioning on additional information narrows the space of possibilities being considered: once it's known to be cloudy, the relevant question is no longer "what fraction of all days does it rain" but "what fraction of cloudy days does it rain," a meaningfully smaller and more specific reference group.

Conditional probability is formally defined as the probability of both events occurring together, divided by the probability of the conditioning event alone — P(A given B) equals P(A and B) divided by P(B) — and this formula is the mathematical foundation nearly every more advanced concept in applied probability and statistics is eventually built on top of, including Bayes' theorem, which is derived directly from rearranging this same basic definition. The formula also makes explicit why conditional probability requires the conditioning event to have nonzero probability in the first place — dividing by a probability of zero is undefined, meaning "the probability of rain given an impossible event" isn't a meaningful question to even ask.

P(rain) = probability across all days
the unconditional baseline
Condition on new information: it's cloudy
Narrow the reference group
from all days to cloudy days only
P(rain | cloudy) = P(rain and cloudy) / P(cloudy)
a meaningfully different, usually larger, number
Confusing P(A|B) with P(B|A) is a common, serious reasoning error
the prosecutor's fallacy, among other documented real-world consequences

Confusing a conditional probability with its reverse — treating P(A given B) as if it were the same as P(B given A) — is a common and well-documented reasoning error with serious real-world consequences, most notably the "prosecutor's fallacy": the probability of observing a given piece of forensic evidence if a defendant is innocent is not the same quantity as the probability that a defendant is innocent given that piece of evidence, and conflating the two has been directly implicated in a number of well-documented wrongful conviction cases, because the two conditional probabilities can differ enormously depending on the base rate of the underlying event — a distinction Bayes' theorem exists specifically to correctly relate. This same confusion, sometimes called the base rate fallacy, shows up constantly in medical testing interpretation: the probability of testing positive given that a disease is present is a different number from the probability of actually having the disease given a positive test result, and for a sufficiently rare disease, the second probability can be surprisingly low even with a highly accurate test, purely because of how few people in the tested population actually have the disease to begin with.

Independence is the special case where conditioning makes no difference at all: two events are independent precisely when P(A given B) equals the plain, unconditional P(A), meaning knowing that B occurred provides no information whatsoever about whether A occurred — a condition that must be checked, not assumed, before applying any formula or method that depends on independence, since treating dependent events as independent (or the reverse) is one of the more common and consequential statistical errors made in practice.

In machine learning, conditional probability underlies the entire framing of a predictive classification model: a spam classifier's output is fundamentally an estimate of the conditional probability that an email is spam, given its observed features (sender, word content, formatting) — P(spam | features) — and naive Bayes classifiers, a specific and still widely used family of models, compute this directly via Bayes' theorem applied to conditional probability, making conditional probability not just a theoretical concept but the literal mathematical object many real, deployed prediction systems are built to estimate.

Read conditional probability as probability recalculated after new information narrows the space of possibilities being considered, and recognize that its direction matters critically: P(A given B) and P(B given A) are generally different numbers, and confusing the two — the prosecutor's fallacy and the base rate fallacy being the most consequential documented examples — has led to real, serious misjudgments in legal and medical contexts, which is exactly the gap Bayes' theorem was formalized to correctly and rigorously navigate.

Take conditional probability further

Ask the copilot about this term, or have our engineers assess it against your process.