Conditional probability distribution

From HandWiki
Short description: Probability theory and statistics concept

In probability theory and statistics, the conditional probability distribution is a probability distribution that describes the probability of an outcome given the occurrence of a particular event. Given two jointly distributed random variables [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math], the conditional probability distribution of [math]\displaystyle{ Y }[/math] given [math]\displaystyle{ X }[/math] is the probability distribution of [math]\displaystyle{ Y }[/math] when [math]\displaystyle{ X }[/math] is known to be a particular value; in some cases the conditional probabilities may be expressed as functions containing the unspecified value [math]\displaystyle{ x }[/math] of [math]\displaystyle{ X }[/math] as a parameter. When both [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] are categorical variables, a conditional probability table is typically used to represent the conditional probability. The conditional distribution contrasts with the marginal distribution of a random variable, which is its distribution without reference to the value of the other variable.

If the conditional distribution of [math]\displaystyle{ Y }[/math] given [math]\displaystyle{ X }[/math] is a continuous distribution, then its probability density function is known as the conditional density function.[1] The properties of a conditional distribution, such as the moments, are often referred to by corresponding names such as the conditional mean and conditional variance.

More generally, one can refer to the conditional distribution of a subset of a set of more than two variables; this conditional distribution is contingent on the values of all the remaining variables, and if more than one variable is included in the subset then this conditional distribution is the conditional joint distribution of the included variables.

Conditional discrete distributions

For discrete random variables, the conditional probability mass function of [math]\displaystyle{ Y }[/math] given [math]\displaystyle{ X=x }[/math] can be written according to its definition as:

[math]\displaystyle{ p_{Y|X}(y \mid x) \triangleq P(Y = y \mid X = x) = \frac{P(\{X=x\} \cap \{Y=y\})}{P(X=x)}\qquad }[/math]

Due to the occurrence of [math]\displaystyle{ P(X=x) }[/math] in the denominator, this is defined only for non-zero (hence strictly positive) [math]\displaystyle{ P(X=x). }[/math]

The relation with the probability distribution of [math]\displaystyle{ X }[/math] given [math]\displaystyle{ Y }[/math] is:

[math]\displaystyle{ P(Y=y \mid X=x) P(X=x) = P(\{X=x\} \cap \{Y=y\}) = P(X=x \mid Y=y)P(Y=y). }[/math]


Consider the roll of a fair die and let [math]\displaystyle{ X=1 }[/math] if the number is even (i.e., 2, 4, or 6) and [math]\displaystyle{ X=0 }[/math] otherwise. Furthermore, let [math]\displaystyle{ Y=1 }[/math] if the number is prime (i.e., 2, 3, or 5) and [math]\displaystyle{ Y=0 }[/math] otherwise.

D 1 2 3 4 5 6
X 0 1 0 1 0 1
Y 0 1 1 0 1 0

Then the unconditional probability that [math]\displaystyle{ X=1 }[/math] is 3/6 = 1/2 (since there are six possible rolls of the dice, of which three are even), whereas the probability that [math]\displaystyle{ X=1 }[/math] conditional on [math]\displaystyle{ Y=1 }[/math] is 1/3 (since there are three possible prime number rolls—2, 3, and 5—of which one is even).

Conditional continuous distributions

Similarly for continuous random variables, the conditional probability density function of [math]\displaystyle{ Y }[/math] given the occurrence of the value [math]\displaystyle{ x }[/math] of [math]\displaystyle{ X }[/math] can be written as[2]:p. 99

[math]\displaystyle{ f_{Y\mid X}(y \mid x) = \frac{f_{X, Y}(x, y)}{f_X(x)}\qquad }[/math]

where [math]\displaystyle{ f_{X,Y}(x,y) }[/math] gives the joint density of [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math], while [math]\displaystyle{ f_X(x) }[/math] gives the marginal density for [math]\displaystyle{ X }[/math]. Also in this case it is necessary that [math]\displaystyle{ f_X(x)\gt 0 }[/math].

The relation with the probability distribution of [math]\displaystyle{ X }[/math] given [math]\displaystyle{ Y }[/math] is given by:

[math]\displaystyle{ f_{Y\mid X}(y \mid x)f_X(x) = f_{X,Y}(x, y) = f_{X|Y}(x \mid y)f_Y(y). }[/math]

The concept of the conditional distribution of a continuous random variable is not as intuitive as it might seem: Borel's paradox shows that conditional probability density functions need not be invariant under coordinate transformations.


Bivariate normal joint density

The graph shows a bivariate normal joint density for random variables [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math]. To see the distribution of [math]\displaystyle{ Y }[/math] conditional on [math]\displaystyle{ X=70 }[/math], one can first visualize the line [math]\displaystyle{ X=70 }[/math] in the [math]\displaystyle{ X,Y }[/math] plane, and then visualize the plane containing that line and perpendicular to the [math]\displaystyle{ X,Y }[/math] plane. The intersection of that plane with the joint normal density, once rescaled to give unit area under the intersection, is the relevant conditional density of [math]\displaystyle{ Y }[/math].

[math]\displaystyle{ Y\mid X=70 \ \sim\ \mathcal{N}\left(\mu_Y+\frac{\sigma_Y}{\sigma_X}\rho( 70 - \mu_X),\, (1-\rho^2)\sigma_Y^2\right). }[/math]

Relation to independence

Random variables [math]\displaystyle{ X }[/math], [math]\displaystyle{ Y }[/math] are independent if and only if the conditional distribution of [math]\displaystyle{ Y }[/math] given [math]\displaystyle{ X }[/math] is, for all possible realizations of [math]\displaystyle{ X }[/math], equal to the unconditional distribution of [math]\displaystyle{ Y }[/math]. For discrete random variables this means [math]\displaystyle{ P(Y=y|X=x) = P(Y=y) }[/math] for all possible [math]\displaystyle{ y }[/math] and [math]\displaystyle{ x }[/math] with [math]\displaystyle{ P(X=x)\gt 0 }[/math]. For continuous random variables [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math], having a joint density function, it means [math]\displaystyle{ f_Y(y|X=x) = f_Y(y) }[/math] for all possible [math]\displaystyle{ y }[/math] and [math]\displaystyle{ x }[/math] with [math]\displaystyle{ f_X(x)\gt 0 }[/math].


Seen as a function of [math]\displaystyle{ y }[/math] for given [math]\displaystyle{ x }[/math], [math]\displaystyle{ P(Y=y|X=x) }[/math] is a probability mass function and so the sum over all [math]\displaystyle{ y }[/math] (or integral if it is a conditional probability density) is 1. Seen as a function of [math]\displaystyle{ x }[/math] for given [math]\displaystyle{ y }[/math], it is a likelihood function, so that the sum (or integral) over all [math]\displaystyle{ x }[/math] need not be 1.

Additionally, a marginal of a joint distribution can be expressed as the expectation of the corresponding conditional distribution. For instance, [math]\displaystyle{ p_X(x) = E_{Y}[p_{X|Y}(x \ |\ Y)] }[/math].

Measure-theoretic formulation

Let [math]\displaystyle{ (\Omega, \mathcal{F}, P) }[/math] be a probability space, [math]\displaystyle{ \mathcal{G} \subseteq \mathcal{F} }[/math] a [math]\displaystyle{ \sigma }[/math]-field in [math]\displaystyle{ \mathcal{F} }[/math]. Given [math]\displaystyle{ A\in \mathcal{F} }[/math], the Radon-Nikodym theorem implies that there is[3] a [math]\displaystyle{ \mathcal{G} }[/math]-measurable random variable [math]\displaystyle{ P(A\mid\mathcal{G}):\Omega\to \mathbb{R} }[/math], called the conditional probability, such that[math]\displaystyle{ \int_G P(A\mid\mathcal{G})(\omega) dP(\omega)=P(A\cap G) }[/math]for every [math]\displaystyle{ G\in \mathcal{G} }[/math], and such a random variable is uniquely defined up to sets of probability zero. A conditional probability is called regular if [math]\displaystyle{ \operatorname{P}(\cdot\mid\mathcal{G})(\omega) }[/math] is a probability measure on [math]\displaystyle{ (\Omega, \mathcal{F}) }[/math] for all [math]\displaystyle{ \omega \in \Omega }[/math] a.e.

Special cases:

  • For the trivial sigma algebra [math]\displaystyle{ \mathcal G= \{\emptyset,\Omega\} }[/math], the conditional probability is the constant function [math]\displaystyle{ \operatorname{P}\!\left( A\mid \{\emptyset,\Omega\} \right) = \operatorname{P}(A). }[/math]
  • If [math]\displaystyle{ A\in \mathcal{G} }[/math], then [math]\displaystyle{ \operatorname{P}(A\mid\mathcal{G})=1_A }[/math], the indicator function (defined below).

Let [math]\displaystyle{ X : \Omega \to E }[/math] be a [math]\displaystyle{ (E, \mathcal{E}) }[/math]-valued random variable. For each [math]\displaystyle{ B \in \mathcal{E} }[/math], define [math]\displaystyle{ \mu_{X \, | \, \mathcal{G}} (B \, |\, \mathcal{G}) = \mathrm{P} (X^{-1}(B) \, | \, \mathcal{G}). }[/math]For any [math]\displaystyle{ \omega \in \Omega }[/math], the function [math]\displaystyle{ \mu_{X \, | \mathcal{G}}(\cdot \, | \mathcal{G}) (\omega) : \mathcal{E} \to \mathbb{R} }[/math] is called the conditional probability distribution of [math]\displaystyle{ X }[/math] given [math]\displaystyle{ \mathcal{G} }[/math]. If it is a probability measure on [math]\displaystyle{ (E, \mathcal{E}) }[/math], then it is called regular.

For a real-valued random variable (with respect to the Borel [math]\displaystyle{ \sigma }[/math]-field [math]\displaystyle{ \mathcal{R}^1 }[/math] on [math]\displaystyle{ \mathbb{R} }[/math]), every conditional probability distribution is regular.[4] In this case,[math]\displaystyle{ E[X \mid \mathcal{G}] = \int_{-\infty}^\infty x \, \mu(d x, \cdot) }[/math] almost surely.

Relation to conditional expectation

For any event [math]\displaystyle{ A \in \mathcal{F} }[/math], define the indicator function:

[math]\displaystyle{ \mathbf{1}_A (\omega) = \begin{cases} 1 \; &\text{if } \omega \in A, \\ 0 \; &\text{if } \omega \notin A, \end{cases} }[/math]

which is a random variable. Note that the expectation of this random variable is equal to the probability of A itself:

[math]\displaystyle{ \operatorname{E}(\mathbf{1}_A) = \operatorname{P}(A). \; }[/math]

Given a [math]\displaystyle{ \sigma }[/math]-field [math]\displaystyle{ \mathcal{G} \subseteq \mathcal{F} }[/math], the conditional probability [math]\displaystyle{ \operatorname{P}(A\mid\mathcal{G}) }[/math] is a version of the conditional expectation of the indicator function for [math]\displaystyle{ A }[/math]:

[math]\displaystyle{ \operatorname{P}(A\mid\mathcal{G}) = \operatorname{E}(\mathbf{1}_A\mid\mathcal{G}) \; }[/math]

An expectation of a random variable with respect to a regular conditional probability is equal to its conditional expectation.

Interpretation of conditioning on a Sigma Field

Consider the probability space [math]\displaystyle{ (\Omega, \mathcal{F}, \mathbb{P}) }[/math] and a sub-sigma field [math]\displaystyle{ \mathcal{A} \subset \mathcal{F} }[/math]. The sub-sigma field [math]\displaystyle{ \mathcal{A} }[/math] can be loosely interpreted as containing a subset of the information in [math]\displaystyle{ \mathcal{F} }[/math]. For example, we might think of [math]\displaystyle{ \mathbb{P}(B|\mathcal{A}) }[/math] as the probability of the event [math]\displaystyle{ B }[/math] given the information in [math]\displaystyle{ \mathcal{A} }[/math].

Also recall that an event [math]\displaystyle{ B }[/math] is independent of a sub-sigma field [math]\displaystyle{ \mathcal{A} }[/math] if [math]\displaystyle{ \mathbb{P}(B | A) = \mathbb{P}(B) }[/math] for all [math]\displaystyle{ A \in \mathcal{A} }[/math]. It is incorrect to conclude in general that the information in [math]\displaystyle{ \mathcal{A} }[/math] does not tell us anything about the probability of event [math]\displaystyle{ B }[/math] occurring. This can be shown with a counter-example:

Consider a probability space on the unit interval, [math]\displaystyle{ \Omega = [0, 1] }[/math]. Let [math]\displaystyle{ \mathcal{G} }[/math] be the sigma-field of all countable sets and sets whose complement is countable. So each set in [math]\displaystyle{ \mathcal{G} }[/math] has measure [math]\displaystyle{ 0 }[/math] or [math]\displaystyle{ 1 }[/math] and so is independent of each event in [math]\displaystyle{ \mathcal{F} }[/math]. However, notice that [math]\displaystyle{ \mathcal{G} }[/math] also contains all the singleton events in [math]\displaystyle{ \mathcal{F} }[/math] (those sets which contain only a single [math]\displaystyle{ \omega \in \Omega }[/math]). So knowing which of the events in [math]\displaystyle{ \mathcal{G} }[/math] occurred is equivalent to knowing exactly which [math]\displaystyle{ \omega \in \Omega }[/math] occurred! So in one sense, [math]\displaystyle{ \mathcal{G} }[/math] contains no information about [math]\displaystyle{ \mathcal{F} }[/math] (it is independent of it), and in another sense it contains all the information in [math]\displaystyle{ \mathcal{F} }[/math].[5]

See also



  1. Ross, Sheldon M. (1993). Introduction to Probability Models (Fifth ed.). San Diego: Academic Press. pp. 88–91. ISBN 0-12-598455-3. 
  2. Park, Kun Il (2018). Fundamentals of Probability and Stochastic Processes with Applications to Communications. Springer. ISBN 978-3-319-68074-3. 
  3. Billingsley (1995), p. 430
  4. Billingsley (1995), p. 439
  5. Billingsley, Patrick (2012-02-28) (in English). Probability and Measure. Hoboken, New Jersey: Wiley. ISBN 978-1-118-12237-2.