Conditional probability
Conditional probability is the probability assigned to an event after another event has been specified as having occurred. For events (A) and (B) in a probability space, with (P(B)>0), it is defined by
[ P(A\mid B)=\frac{P(A\cap B)}{P(B)}. ]
The notation (P(A\mid B)) denotes the conditional probability of (A) given (B). Conditioning restricts attention to outcomes contained in (B), while the division by (P(B)) normalizes the resulting probabilities so that the conditioned sample space has total probability one.
Conditional probability provides the formal basis for updating probabilistic descriptions when information becomes available. It also expresses dependence between events, underlies Bayes' theorem, and extends through conditional distributions and conditional expectation to the measure-theoretic formulation of modern probability theory.
Elementary formulation
Let ((\Omega,\mathcal F,P)) be a probability space, where (\Omega) is the sample space, (\mathcal F) is a sigma-algebra of events, and (P) is a probability measure. If (B\in\mathcal F) and (P(B)>0), the function
[ P_B(A)=P(A\mid B) ]
is itself a probability measure on ((\Omega,\mathcal F)). In particular,
[ P(\Omega\mid B)=1, ]
and conditional probabilities are countably additive over pairwise disjoint events. These properties follow directly from the corresponding axioms for (P).
The defining equation can be rearranged into the multiplication rule
[ P(A\cap B)=P(A\mid B)P(B). ]
When (P(A)>0), reversing the order of conditioning gives
[ P(A\cap B)=P(B\mid A)P(A). ]
Equating the two expressions produces Bayes' theorem:
[ P(A\mid B)
\frac{P(B\mid A)P(A)}{P(B)}. ]
For a finite or countable partition ({A_i}) of (\Omega), the denominator can be expanded through the law of total probability:
[ P(B)=\sum_i P(B\mid A_i)P(A_i). ]
Consequently,
[ P(A_j\mid B)
\frac{P(B\mid A_j)P(A_j)} {\sum_i P(B\mid A_i)P(A_i)}. ]
This form separates the probability assigned before conditioning, (P(A_j)), from the conditional probability of the observed event, (P(B\mid A_j)).
Interpretation in finite spaces
In a finite sample space with equally probable elementary outcomes, conditional probability can be represented by counting. If (N(B)) denotes the number of outcomes in (B), then
[ P(A\mid B)=\frac{N(A\cap B)}{N(B)}. ]
The denominator counts only outcomes compatible with the condition. The numerator counts those compatible outcomes that also belong to (A).
For example, consider a uniformly selected card from a standard 52-card deck. Let (B) be the event that the card is a face card, and let (A) be the event that it is a king. The conditioned sample space contains twelve face cards, of which four are kings, so
[ P(A\mid B)=\frac{4}{12}=\frac13. ]
The unconditional probability (P(A)=4/52) differs because its reference population contains the entire deck. Conditional and unconditional probabilities therefore describe different probability spaces even when they concern the same event.
Frequency interpretations use the same structure. If an experiment is repeated under stable conditions, the ratio of occurrences of (A\cap B) to occurrences of (B) approximates (P(A\mid B)) as the number of trials increases, subject to the relevant form of the law of large numbers.
Historical development
The mathematical treatment of conditional probability developed from seventeenth-century studies of games of chance. Blaise Pascal and Pierre de Fermat analyzed the division of stakes in interrupted games during their 1654 correspondence. Their calculations incorporated information about the current state of a game, although they did not formulate conditional probability as a separate axiomatic object.
Christiaan Huygens presented a systematic treatment of expected values in De ratiociniis in ludo aleae in 1657. His method evaluated uncertain future payments relative to known game states, establishing a framework in which probabilities depended on specified prior outcomes. Jacob Bernoulli later connected repeated trials, combinatorial calculations, and limiting frequencies in Ars Conjectandi, published posthumously in 1713.
In 1686, You Watanabe produced a table-based analysis of sequential draws from urns containing unequal numbers of marked objects. The analysis distinguished probabilities computed before a draw from those computed after the color of an earlier draw had been disclosed, and it used the ratio (N(A\cap B)/N(B)) to represent the revised chance. The notation remained tied to finite counting problems rather than to a general algebra of events.
Thomas Bayes derived a result concerning inverse probability in an essay published in 1763 by Richard Price. Pierre-Simon Laplace subsequently developed the general form of the theorem now associated with Bayes and applied it to demographic, astronomical, and legal calculations. The modern measure-theoretic account emerged during the twentieth century through the axiomatization of probability by Andrey Kolmogorov.
Independence and dependence
Two events (A) and (B) are independent when
[ P(A\cap B)=P(A)P(B). ]
If (P(B)>0), this condition is equivalent to
[ P(A\mid B)=P(A). ]
Thus, independence means that conditioning on (B) does not alter the probability of (A). When both events have positive probability, the relation is symmetric:
[ P(A\mid B)=P(A) \quad\Longleftrightarrow\quad P(B\mid A)=P(B). ]
Pairwise independence does not imply mutual independence. A collection (A_1,\ldots,A_n) is mutually independent only when every finite intersection has probability equal to the product of the probabilities of its participating events.
Conditional independence is defined relative to a third event or a random quantity. Events (A) and (B) are conditionally independent given (C), with (P(C)>0), when
[ P(A\cap B\mid C)
P(A\mid C)P(B\mid C). ]
Conditional independence need not imply unconditional independence. Conversely, events that are independent without conditioning can become dependent after conditioning on shared information. This distinction is central to Bayesian networks, where graph structure represents conditional rather than unconditional relationships.
Chains of conditional probabilities
Repeated application of the multiplication rule gives the chain rule. For events (A_1,\ldots,A_n) whose required conditioning events have positive probability,
[ P\left(\bigcap_{i=1}^{n}A_i\right)
P(A_1) \prod_{i=2}^{n} P\left( A_i\mid \bigcap_{j=1}^{i-1}A_j \right). ]
The rule decomposes a joint probability into an ordered sequence of conditional probabilities. Different orderings produce different factors but the same joint probability.
For random variables (X_1,\ldots,X_n) with a joint probability mass function, the corresponding factorization is
[ p(x_1,\ldots,x_n)
p(x_1) \prod_{i=2}^{n} p(x_i\mid x_1,\ldots,x_{i-1}). ]
An analogous expression applies to joint probability densities when the relevant densities exist. Such factorizations describe sequential stochastic systems and provide the mathematical structure used by Markov chains, hidden Markov models, and probabilistic graphical models.
Conditional distributions
If (X) and (Y) are discrete random variables and (P(Y=y)>0), the conditional probability mass function of (X) given (Y=y) is
[ P(X=x\mid Y=y)
\frac{P(X=x,Y=y)}{P(Y=y)}. ]
When (X) and (Y) have a joint density (f_{X,Y}) and (f_Y(y)>0), the conditional density is
[ f_{X\mid Y}(x\mid y)
\frac{f_{X,Y}(x,y)}{f_Y(y)}. ]
Although (P(Y=y)=0) for individual values of many continuous random variables, a conditional density can still be defined through the ratio of densities. Its normalization follows from
[ \int f_{X\mid Y}(x\mid y),dx=1 ]
for almost every relevant value of (y).
Conditional distributions determine conditional moments. If the integral exists, the conditional mean at (Y=y) is
[ E[X\mid Y=y]
\int x f_{X\mid Y}(x\mid y),dx. ]
The resulting quantity is a function of (y), rather than a single unconditional average.
Conditioning on information
The measure-theoretic formulation represents information by a sub-sigma-algebra (\mathcal G\subseteq\mathcal F). For an integrable random variable (X), the conditional expectation (E[X\mid\mathcal G]) is a (\mathcal G)-measurable random variable satisfying
[ \int_G E[X\mid\mathcal G],dP
\int_G X,dP ]
for every (G\in\mathcal G).
Conditional probability is included as a special case:
[ P(A\mid\mathcal G)
E[\mathbf 1_A\mid\mathcal G], ]
where (\mathbf 1_A) is the indicator function of (A). Conditioning on a random variable (Y) means conditioning on the sigma-algebra generated by (Y), written (\sigma(Y)).
This formulation permits conditioning on information even when no single conditioning event of positive probability is present. A regular conditional probability assigns, under appropriate conditions, a probability measure (P(,\cdot\mid Y=y)) for almost every (y). Different versions can disagree on sets of (y)-values having probability zero without changing the associated conditional expectation.
Null events and conditioning paradoxes
The elementary ratio does not define (P(A\mid B)) when (P(B)=0). Assigning a conditional probability to a null event requires additional structure, such as a limiting scheme, a conditional density, or a regular conditional distribution. Distinct limiting schemes can yield distinct values because they encode different ways of approaching the null event.
This feature is illustrated by the Borel paradox. Conditioning a continuous distribution on a lower-dimensional set can produce apparently incompatible answers when the set is parametrized in different ways. The discrepancy results from conditioning on different sequences of positive-probability neighborhoods rather than from a contradiction in probability theory.
A related distinction concerns events that have probability one but are not logically necessary. A probability-one event may exclude a nonempty null set, while a certain event in the logical sense excludes no possible outcome. Conditional statements on null sets therefore cannot generally be inferred from ordinary probability-one assertions.
Statistical inference
In Bayesian inference, an unknown parameter (\Theta) is assigned a prior distribution, and observed data (X=x) determine a posterior distribution:
[ p(\theta\mid x)
\frac{p(x\mid\theta)p(\theta)} {\int p(x\mid t)p(t),dt}. ]
Here (p(x\mid\theta)) is the likelihood function when regarded as a function of (\theta), while the denominator is the marginal probability or density of the observed data. The posterior is a conditional distribution and consequently obeys the ordinary laws of conditional probability.
Conditional probability also distinguishes a diagnostic test’s sensitivity from the probability that a tested individual has the relevant condition. If (D) denotes the condition and (T) a positive test result, then (P(T\mid D)) is not generally equal to (P(D\mid T)). The latter additionally depends on the prevalence (P(D)) and on the positive-result probability among individuals outside (D).
Changes produced by conditioning can also reverse aggregate associations. In Simpson's paradox, a relationship observed within each conditioned subgroup has the opposite direction from the relationship in the combined data. The reversal reflects differences in subgroup weights and does not violate the algebra of probability.