From a Joint Density to a Conditional CDF
A joint density describes the probability of ranges of values for two random variables together. To find the conditional distribution of \(X\) at a given value \(y\) of \(Y\), focus on the horizontal slice of that joint density at \(Y=y\). Integrating along this slice up to \(x\) accumulates the conditional probability that \(X\) is no greater than \(x\). The slice must be normalized by the marginal density of \(Y\) at \(y\).
This construction is the CDF counterpart of the conditional-density formula: integrate the conditional density from the lower end of the real line to \(x\). The resulting function is useful both for describing the full conditional distribution and for calculating probabilities over intervals.
The qualifier “almost every” matters. A density is defined only up to changes on sets of Lebesgue measure zero, and conditioning on a particular value of a continuous random variable does not, in general, determine a unique conditional law at every single \(y\). The slice formula gives a version of the conditional distribution for almost every \(y\) where the marginal density is positive and finite. In examples with a natural, explicitly defined density, the formula will usually be used throughout the indicated range of \(y\).
For any fixed \(y\) where the formula applies, its numerator integrates the joint density only over points with second coordinate \(y\), from \(u=-\infty\) through \(u=x\). Dividing by \(f_Y(y)\) turns that accumulated slice into a conditional probability. In particular, integrating the whole slice gives \(f_Y(y)\), so the conditional CDF tends to 1 as \(x\) increases without bound.
Conditional Interval Probabilities
A CDF gives interval probabilities by taking differences. For real numbers \(a<b\),
The second equality follows by subtracting the two integrals defining the CDF; the part from \(-\infty\) to \(a\) cancels. Because the conditional law obtained from a density has no point masses for almost every such \(y\), changing either interval endpoint from open to closed does not change its probability for those \(y\). Stating the interval as \((a,b]\) is convenient because it matches the standard CDF difference exactly.
Proof. Since the joint density is nonnegative and integrates to 1, Tonelli’s theorem gives \(\int_{\mathbb{R}} f_Y(y)\,dy=1\). Thus \(f_Y(y)\) is finite for almost every \(y\). For a \(y\) with \(0<f_Y(y)<\infty\), set \(q_y(C)=\int_C f_{X,Y}(u,y)\,du/f_Y(y)\) for each Borel set \(C\subseteq\mathbb{R}\), whenever the slice integral is defined. The integral over the entire real line is \(f_Y(y)\), so \(q_y(\mathbb{R})=1\); nonnegativity and countable additivity follow from those properties of the integral. Hence \(q_y\) is a probability distribution.
To check that this distribution is conditional, let \(A\) be a Borel set of possible values for \(Y\), and let \(C\) be a Borel set of possible values for \(X\). Fubini’s theorem applies to the nonnegative joint density and gives
This identity is the defining conditional-distribution identity. It holds for all Borel \(C\) and \(A\) after choosing the conditional distribution version outside a single null set of \(y\)'s; this follows first for a countable generating class of intervals and then for Borel sets by the standard uniqueness and extension argument for probability measures. Taking \(C=(-\infty,x]\) gives the stated CDF formula. Taking \(C=(a,b]\) gives the interval formula. \(\square\)
Worked Calculations
Worked Example: A Uniform Density on a Triangle
Suppose \((X,Y)\) has joint density \(f_{X,Y}(x,y)=2\) when \(0<y<x<1\), and 0 otherwise. Find the conditional CDF of \(X\) given \(Y=y\), and calculate \(P(1/2<X\le 3/4\mid Y=1/4)\).
First integrate across the slice to find the marginal density of \(Y\). For \(0<y<1\), the possible \(x\)-values run from \(y\) to 1, so
For this range of \(y\), the CDF is zero when \(x\le y\), since the slice has no density to the left of \(y\). When \(y<x<1\), the accumulated slice integral is \(\int_y^x 2\,du=2(x-y)\). When \(x\ge 1\), the entire slice has been integrated. Therefore
At \(y=1/4\), the interval endpoints lie in the middle case. The requested probability is
As a check, the conditional density on \(y<x<1\) is \(2/[2(1-y)]=1/(1-y)\), whose integral from \(y\) to 1 is 1.
Worked Example: Conditional Intervals in an Exponential Model
Let \(Y\) be uniform on \([1,2]\), and, given \(Y=y\), let \(X\) have an exponential distribution with rate \(y\). Equivalently, the joint density is \(f_{X,Y}(x,y)=y e^{-yx}\) for \(x\ge 0\) and \(1\le y\le 2\), and 0 elsewhere. Find the conditional CDF and calculate \(P(1<X\le 2\mid Y=3/2)\).
The marginal density is
since \(y>0\). Thus the conditional CDF for \(x\ge 0\) is
For \(x<0\), it is 0. Substituting \(y=3/2\) into the interval difference gives
Numerically, this is approximately \(0.2231-0.0498=0.1733\). The density check is immediate: differentiating \(1-e^{-yx}\) with respect to \(x\) gives \(y e^{-yx}\), the conditional density on \(x\ge 0\).
Recovering the Conditional Density
The slice formula also explains how a conditional density can be recovered from its CDF. For a fixed admissible \(y\), the conditional CDF is an integral of the slice density divided by the marginal density. The fundamental theorem of calculus for Lebesgue integrals says that the derivative of an indefinite integral of an integrable function equals that function almost everywhere. Consequently, the conditional density is the normalized slice density almost everywhere in \(x\).
Proof. For any \(r<s\), the CDF formula gives
The integrand is nonnegative and integrable over \(\mathbb{R}\), with integral 1. An indefinite integral of an integrable function is absolutely continuous, and its derivative equals its integrand at almost every point. Applying this fundamental theorem of calculus yields the asserted conditional density. \(\square\)
Worked Example: Differentiating a Conditional CDF
Consider the joint density \(f_{X,Y}(x,y)=\frac{4}{5}(1+xy)\) on \(0<x<1,\ 0<y<1\), and 0 elsewhere. Find the conditional CDF, recover the conditional density, and calculate \(P(1/4<X\le 3/4\mid Y=1/2)\).
For \(0<y<1\), the marginal density is
For \(0<x<1\), divide the accumulated slice by this marginal:
The CDF is 0 for \(x\le 0\) and 1 for \(x\ge 1\). Differentiating the middle expression with respect to \(x\) gives the conditional density
At \(y=1/2\), the numerator of the CDF at \(x=3/4\) is \(3/4+(1/2)(9/16)/2=57/64\), and at \(x=1/4\) it is \(1/4+(1/2)(1/16)/2=17/64\). The common denominator is \(1+1/4=5/4\). Hence
As a normalization check, integrating the conditional density over \((0,1)\) gives \(\bigl(1+y/2\bigr)/\bigl(1+y/2\bigr)=1\).
Common Mistake: Forgetting to Normalize the Slice
A frequent error is to integrate the joint density along a slice and call the result a conditional CDF without dividing by the marginal density. In the triangular example, the unnormalized accumulation for \(y<x<1\) is \(2(x-y)\). At \(x=1\), this equals \(2(1-y)\), not 1; it is the marginal density \(f_Y(y)\), not a conditional probability. Dividing by \(2(1-y)\) produces \((x-y)/(1-y)\), which reaches 1 at the right endpoint, as a CDF must.
A second check is to distinguish an interval probability from a density value. The CDF difference \(F_{X\mid Y}(b\mid y)-F_{X\mid Y}(a\mid y)\) is a probability. A conditional density is instead the derivative of the CDF where that derivative exists; it is not itself the probability of an interval.
Check Your Understanding
Use the slice formula and check both the marginal normalization and the conditional probability calculation.
- In the triangular-density example, what is \(P(X>1/2\mid Y=1/4)\)?
- Why must the slice integral be divided by \(f_Y(y)\) before it can be a conditional CDF?
- For the exponential model, write \(P(a<X\le b\mid Y=y)\) for \(0\le a<b\).
- In the square-support example, differentiate the conditional CDF with respect to \(x\) and verify that the result integrates to 1.
- Why is the slice formula asserted only for almost every conditioning value in general?