Skip to content

Conditional Probability Density Function

Definition

Let XX and YY have joint density fX,Yf_{X,Y}, and let yy satisfy 0<fY(y)<∞0<f_Y(y)<\infty. The conditional PDF of XX given Y=yY=y is

fX∣Y(x∣y)=fX,Y(x,y)fY(y).\begin{aligned} f_{X\mid Y}(x\mid y)=\frac{f_{X,Y}(x,y)}{f_Y(y)}. \end{aligned}

The denominator is the density fY(y)f_Y(y), not P(Y=y)=0\mathbb{P}(Y=y)=0. On a set of conditioning values yy of probability zero, for example finitely many points, conditional laws may be chosen arbitrarily.

The Marginal Probability Density Function in the denominator is obtained by integrating the joint density over the other coordinate. Dividing by it makes the conditional density integrate to one.


Interpretation

A conditional density describes one variable after a continuous value of another is observed. It uses a ratio of densities, rather than dividing by the probability of a zero-probability event: the slice of the joint density at Y=yY=y is rescaled by fY(y)f_Y(y) so that it has total area 11.

The triangle 0 less than x less than y less than 1 with joint density 2, and a horizontal slice at Y = y; rescaled, the slice gives the conditional density 1/y, uniform on 0 to y.

The joint density equals 22 on the triangle 0<x<y<10<x<y<1. Along the horizontal slice at height yy it equals 22 on 0<x<y0<x<y, a segment of length yy, so the marginal density is fY(y)=2yf_Y(y)=2y. Dividing gives fX∣Y(x∣y)=2/(2y)=1/yf_{X\mid Y}(x\mid y)=2/(2y)=1/y on (0,y)(0,y): given Y=yY=y, XX is uniform on (0,y)(0,y).

The formula mirrors the conditional PMF pX,Y(x,y)/pY(y)p_{X,Y}(x,y)/p_Y(y), with densities in place of masses. Heuristically, conditioning on a thin strip y<Y≤y+hy<Y\le y+h, which has positive probability, produces a factor hh in both the joint and the marginal probability; it cancels, leaving the ratio of densities. Like any density, fX∣Y(x∣y)f_{X\mid Y}(x\mid y) is not a probability and can exceed 11: in the triangle it equals 44 when y=14y=\tfrac{1}{4}. Changing the conditional density for a set of yy-values of probability zero changes no probability, which is why the definition allows arbitrary choices there.

Multiplying back, fX,Y=fX∣YfYf_{X,Y}=f_{X\mid Y}f_Y builds a joint model in two stages, and integrating over yy gives the continuous law of total probability. For independent XX and YY the conditional density is simply fXf_X, and integrating fX∣Yf_{X\mid Y} up to xx gives the conditional CDF.


Key Results

  • For every yy with 0<fY(y)<∞0<f_Y(y)<\infty, ∫fX∣Y(x∣y) dx=1\int f_{X\mid Y}(x\mid y)\,\mathrm{d}x=1.
  • fX,Y(x,y)=fX∣Y(x∣y)fY(y)f_{X,Y}(x,y)=f_{X\mid Y}(x\mid y)f_Y(y) except possibly on a set of zero area.

Examples

  • For joint density 22 on 0<x<y<10<x<y<1, fX∣Y(x∣y)=1/yf_{X\mid Y}(x\mid y)=1/y on 0<x<y0<x<y: a uniform conditional law.
  • For independent X∼Exp⁡(2)X\sim\operatorname{Exp}(2) and Y∼Exp⁡(3)Y\sim\operatorname{Exp}(3), fX∣Y(x∣y)=2e−2xf_{X\mid Y}(x\mid y)=2\mathrm{e}^{-2x} for x>0x>0.

Prerequisites

Sources

Aliases: conditional PDF, conditional density, conditional density function Symbols: infinity, integral

Last updated: 20 October 2026 03:02