Why a Joint Density Is Not a Conditional Density
A joint density describes two random variables together. To describe the distribution of \(X\) when \(Y\) is observed at a particular value \(y\), we need a density in \(x\) that is appropriate for that fixed \(y\). The joint density alone generally does not have this property: its total mass along a slice of the joint support need not be one.
The adjustment is to divide the joint density by the marginal density of the conditioning variable. This removes the slice’s total mass, leaving a conditional density. The calculation has three linked parts: find the marginal, determine the slice of the joint support, and verify that the resulting function integrates to one.
The denominator is the marginal density of \(Y\), not the marginal density of \(X\). It depends on the value \(y\) being conditioned on. For a fixed admissible \(y\), the conditional density is a function of \(x\); its integral over all \(x\) must be one.
Deriving the Ratio Formula
The marginal density is obtained by integrating out \(X\). Since the joint density is nonnegative, Tonelli’s theorem allows the order of integration used below. For Borel sets \(A\) and \(B\), the joint probability that \(X\) lies in \(A\) and \(Y\) lies in \(B\) is
On values of \(y\) where \(f_Y(y)>0\), write the inner integrand as the marginal density times the ratio:
Thus, with \(f_{X\mid Y}(x\mid y)=f_{X,Y}(x,y)/f_Y(y)\) on those values,
This identity says that the joint law is recovered by weighting the conditional law at each \(y\) by the marginal density of \(Y\). It also shows why the ratio is the appropriate conditional density. The conditional law at a single value \(y\) is not obtained by dividing by \(P(Y=y)\): for a continuous \(Y\), that probability is typically zero.
Proof. Nonnegativity follows from nonnegativity of the joint density and positivity of the denominator. For any \(y\) satisfying the stated conditions,
The marginal-density identity holds for almost every \(y\), as follows from integrating the joint density to obtain the marginal. Where \(f_Y(y)=0\), the ratio is undefined; such values have probability zero under \(Y\), and the conditional density can be specified there arbitrarily without changing the joint law. The integral identity above then gives the required conditional-law representation. \(\square\)
Support: Fix the Conditioning Value First
To find the conditional support, begin with the region where the joint density is positive, then hold \(y\) fixed and identify the allowable \(x\)-values. This is a slice through the joint support. The ratio does not create positive density outside that slice, because its numerator is zero there.
More precisely, for an admissible \(y\), the conditional density is positive wherever \(f_{X,Y}(x,y)>0\), apart from changes on sets of \(x\)-values of measure zero. In practice, support boundaries can be included or excluded without changing probabilities when they have probability zero. The slice can vary with \(y\), so it is important not to assume that the conditional support is the same for every conditioning value.
Worked Example: A Triangular Support
Suppose $$ f_{X,Y}(x,y)= \begin{cases} 2,&0<x<y<1,\\ 0,&\text{otherwise}. \end{cases} $$ Find \(f_Y(y)\), the conditional density of \(X\) given \(Y=y\), its support, and \(P(X<Y/2\mid Y=y)\).
Check the joint density first. The support is a triangle of area \(1/2\), so the integral of the density is \(2(1/2)=1\). It is a properly normalized joint density.
For fixed \(0<y<1\), the allowed \(x\)-values are \(0<x<y\). Therefore $$ f_Y(y)=\int_0^y 2\,dx=2y,\qquad 0<y<1. $$ The marginal integrates to one: \(\int_0^1 2y\,dy=1\). The ratio gives $$ f_{X\mid Y}(x\mid y)=\frac{2}{2y}=\frac{1}{y},\qquad 0<x<y,\quad 0<y<1, $$ and it is zero outside \(0<x<y\). Its normalization is $$ \int_0^y \frac{1}{y}\,dx=1. $$ Finally, $$ P(X<Y/2\mid Y=y)=\int_0^{y/2}\frac{1}{y}\,dx =\frac{y/2}{y} =\frac{1}{2},\qquad 0<y<1. $$ The probability is one-half because the conditional density is uniform on the interval \((0,y)\).
Worked Example: A Conditional Support With a Moving Lower Boundary
Suppose $$ f_{X,Y}(x,y)= \begin{cases} 3x,&0<y<x<1,\\ 0,&\text{otherwise}. \end{cases} $$ Find the marginal density of \(Y\), the conditional density of \(X\) given \(Y=y\), and \(P(X>3/4\mid Y=1/2)\).
Check normalization. Integrating first over \(0<y<x\), $$ \int_0^1\int_0^x 3x\,dy\,dx =\int_0^1 3x^2\,dx =1. $$ For fixed \(y\), the support requires \(y<x<1\). Hence $$ f_Y(y)=\int_y^1 3x\,dx =\frac{3}{2}(1-y^2),\qquad 0<y<1. $$ This is a valid marginal density because $$ \int_0^1 \frac{3}{2}(1-y^2)\,dy =\frac{3}{2}\left(1-\frac{1}{3}\right) =1. $$ The conditional density is therefore $$ f_{X\mid Y}(x\mid y)=\frac{3x}{\frac{3}{2}(1-y^2)} =\frac{2x}{1-y^2},\qquad y<x<1. $$ Its integral over that conditional support is $$ \int_y^1\frac{2x}{1-y^2}\,dx =\frac{1-y^2}{1-y^2} =1. $$ At \(y=1/2\), the density is \(8x/3\) on \(1/2<x<1\). Thus $$ P(X>3/4\mid Y=1/2) =\int_{3/4}^1\frac{8x}{3}\,dx =\frac{4}{3}\left(1-\frac{9}{16}\right) =\frac{4}{3}\cdot\frac{7}{16} =\frac{7}{12}. $$ The lower endpoint of the conditional support is \(1/2\), not zero: fixing \(Y=1/2\) in the joint support forces \(X>1/2\).
Worked Example: A Conditional Density on a Rectangular Support
Suppose \(f_{X,Y}(x,y)=x+y\) for \(0<x<1\) and \(0<y<1\), and is zero elsewhere. Find \(f_{X\mid Y}(x\mid y)\), then calculate \(P(X>1/2\mid Y=1/2)\).
The joint density is normalized: $$ \int_0^1\int_0^1(x+y)\,dx\,dy =\int_0^1\left(\frac{1}{2}+y\right)dy =1. $$ For \(0<y<1\), the marginal density is $$ f_Y(y)=\int_0^1(x+y)\,dx=\frac{1}{2}+y. $$ The slice support is \(0<x<1\), so $$ f_{X\mid Y}(x\mid y)=\frac{x+y}{\frac{1}{2}+y},\qquad 0<x<1. $$ Its integral is $$ \int_0^1\frac{x+y}{\frac{1}{2}+y}\,dx =\frac{\frac{1}{2}+y}{\frac{1}{2}+y} =1. $$ At \(y=1/2\), the conditional density is \(x+1/2\) on \(0<x<1\). Consequently, $$ P(X>1/2\mid Y=1/2) =\int_{1/2}^1\left(x+\frac{1}{2}\right)dx =\left[\frac{x^2}{2}+\frac{x}{2}\right]_{1/2}^1 =1-\frac{3}{8} =\frac{5}{8}. $$
A Reliable Calculation Check
For each fixed \(y\) with positive marginal density, the conditional density must integrate to one over the \(x\)-slice permitted by the joint support. This gives a direct way to catch common errors: a wrong marginal, a missing support boundary, or an incorrect division usually makes the integral differ from one.
Write the allowed values of \(x\) for a fixed \(y\); these determine the limits for the marginal integral.
Compute \(f_Y(y)=\int f_{X,Y}(x,y)\,dx\), using the support slice as the limits.
Form \(f_{X,Y}(x,y)/f_Y(y)\) where \(f_Y(y)>0\), then integrate over the conditional support and confirm the result is one.
For an event restricting \(X\) to a set, integrate the conditional density over that set, intersected with the conditional support.
Common Mistakes and Why the Ratio Matters
- Using an unnormalized joint function as a density. A proposed joint density must integrate to one over its entire support. For example, the constant \(3\) on \(0<x<y<1\) has integral \(3/2\), so it is not a joint density. The constant \(2\) on that triangle is normalized.
- Using the wrong marginal in the denominator. Conditioning on \(Y=y\) requires \(f_Y(y)\), found by integrating the joint density over \(x\).
- Ignoring the slice of the support. In the second example, the conditional support is \(y<x<1\). Integrating from zero would include values impossible under the joint model.
- Assuming the ratio is defined everywhere. If \(f_Y(y)=0\), division is not defined. Such conditioning values have marginal probability zero; the ratio formula applies where the marginal density is positive, with conditional laws understood up to null sets.
- Forgetting to normalize. The joint slice generally has integral \(f_Y(y)\), not one. Dividing by that integral is precisely what produces the conditional density.
Check Your Understanding
Use the joint-density ratio and the conditional support in each calculation.
- For the density \(2\) on \(0<x<y<1\), derive \(f_Y(y)\) and state the support of \(X\) given \(Y=y\).
- Why must a proposed joint density equal to \(3\) on \(0<x<y<1\) be rejected?
- If \(f_{X,Y}(x,y)=x+y\) on the unit square, what is \(f_Y(y)\)?
- For the density \(3x\) on \(0<y<x<1\), explain why the conditional support at \(Y=y\) is not the entire interval \((0,1)\).
- What condition on \(f_Y(y)\) is needed to use the pointwise ratio formula, and why can the conditional law be specified arbitrarily where \(f_Y(y)=0\)?