Mathematics.

multivariate distributions

Conditional Distributions

Probability40 minDifficulty6 out of 10

Overview

A conditional distribution describes the probability distribution of one random variable given that another random variable takes a specific value. It is the multivariate generalisation of conditional probability: just as P(A|B) describes the likelihood of event A given event B, the conditional distribution of Y given X = x describes how Y is distributed when we know X has taken the value x. Conditional distributions are the building blocks of Bayesian inference, hierarchical models, and the theory of regression.

Intuition

Suppose X and Y are the height and weight of a randomly chosen adult. The marginal distribution of weight tells you how weight varies across everyone. The conditional distribution of weight given height = 180 cm tells you how weight varies specifically among people who are 180 cm tall — a different, typically narrower, distribution. Conditioning is like zooming in: you slice through the joint distribution along one dimension and renormalise to obtain a valid probability distribution in the remaining dimension.

Formal Definition

Definition

For jointly distributed random variables X and Y with joint density (or PMF) f_{X,Y}(x,y) and marginal f_X(x) > 0:

fYX(yx)=fX,Y(x,y)fX(x)f_{Y|X}(y \mid x) = \frac{f_{X,Y}(x,\,y)}{f_X(x)}
Conditional density/PMF of Y given X = x
fX(x)=fX,Y(x,y)dy(continuous case)f_X(x) = \int_{-\infty}^{\infty} f_{X,Y}(x,\,y)\, dy \quad \text{(continuous case)}
Marginal density of X
E[YX=x]=yfYX(yx)dyE[Y \mid X = x] = \int_{-\infty}^{\infty} y\,f_{Y|X}(y \mid x)\, dy
Conditional expectation
E[Y]=EX ⁣[E[YX]]E[Y] = E_X\!\bigl[E[Y \mid X]\bigr]
Law of total expectation

Worked Examples

  1. 1

    Find the marginal density of X by integrating out y.

    fX(x)=01x6xydy=6x(1x)22=3x(1x)2f_X(x) = \int_0^{1-x} 6xy\,dy = 6x \cdot \frac{(1-x)^2}{2} = 3x(1-x)^2
  2. 2

    Compute the conditional density.

    fYX(yx)=6xy3x(1x)2=2y(1x)2,0<y<1xf_{Y|X}(y \mid x) = \frac{6xy}{3x(1-x)^2} = \frac{2y}{(1-x)^2}, \quad 0 < y < 1-x

✓ Answer

f_{Y|X}(y|x) = 2y/(1−x)² for 0 < y < 1−x (a scaled Beta-type density).

Practice Problems

Mediumfree response

X and Y have joint density f(x,y) = 2 for 0 < x < y < 1. Find the marginal density of X and the conditional density of Y given X = x.

Mediumfree response

Using the law of total expectation: if E[Y|X=0] = 3 and E[Y|X=1] = 7, and P(X=0) = 0.4, P(X=1) = 0.6, find E[Y].

Quiz

The conditional density f_{Y|X}(y|x) is obtained by:
If X and Y are independent, then f_{Y|X}(y|x) equals:
The law of total expectation states:

Summary

  • The conditional density f_{Y|X}(y|x) = f_{X,Y}(x,y)/f_X(x) gives the distribution of Y for a fixed value of X.
  • For independent variables, conditioning has no effect: f_{Y|X}(y|x) = f_Y(y).
  • The conditional expectation E[Y|X=x] is a function of x; E[Y] = E_X[E[Y|X]] by the law of total expectation.

References