Conditioning on a Region
A condition on a pair of random variables need not specify one value of either variable. It may instead restrict the pair to a set: for example, requiring that \(X+Y\leq 1\), or that \(X\) lies in one interval while \(Y\) lies in another. Geometrically, this means retaining only the part of the joint support that falls inside a region. The conditional law is the original law restricted to that part and then normalized.
The key calculations are to find the probability of the region and to integrate over its slices when a marginal conditional distribution is needed. The order of integration and the geometry of the support matter: a rectangle used for conditioning may intersect a triangular support in only part of that rectangle.
Because \(f\) is zero outside its joint support, integrating over \(R\) automatically accounts for the intersection of the region and the support. Values on the boundary do not affect these integrals when the joint law has a density, since a planar boundary of area zero has probability zero. The condition \(P(A_R)>0\) is essential: this formula conditions on an event of positive probability, not on a single continuous value.
Conditional Probabilities and Marginal Densities
Once the probability of the conditioning region is known, probabilities within that region are ratios. If \(C\) is another measurable region, then $$ P\big((X,Y)\in C\mid A_R\big) =\frac{\displaystyle\iint_{C\cap R} f(x,y)\,dx\,dy} {\displaystyle\iint_R f(x,y)\,dx\,dy}, $$ provided the denominator is positive. The numerator uses only the overlap \(C\cap R\): after conditioning on \(A_R\), outcomes outside \(R\) are no longer possible.
To find the conditional distribution of \(X\) alone, integrate the restricted joint density over all allowed \(y\)-values at each fixed \(x\). The corresponding formula for \(Y\) integrates over allowed \(x\)-values.
Proof. For any measurable set \(B\) on the real line, the definition of conditional probability gives $$ P(X\in B\mid A_R)=\frac{1}{P(A_R)}\iint_{\{(x,y):x\in B\}}\mathbf{1}_R(x,y)f(x,y)\,dx\,dy. $$ The integrand is nonnegative and measurable, so Tonelli's theorem permits integration first with respect to \(y\). Thus $$ P(X\in B\mid A_R)=\int_B\left[\frac{1}{P(A_R)}\int_{-\infty}^{\infty}\mathbf{1}_R(x,y)f(x,y)\,dy\right]dx. $$ The bracketed function is therefore a density for \(X\) conditional on \(A_R\). Its integral over the line is 1, because taking \(B\) to be the whole line makes the displayed probability equal to 1. Interchanging the roles of \(x\) and \(y\) proves the second formula. \(\square\)
The integrals in these formulas describe the cross-sections of the region. For a triangular region, the permitted range of \(y\) can shrink as \(x\) changes; for a rectangle, it may remain constant over the relevant interval. If \(X\) and \(Y\) are discrete instead, the same restriction-and-normalization principle applies, with sums of joint mass probabilities in place of integrals.
Worked Example: Conditioning a Uniform Pair on a Triangle
Suppose \((X,Y)\) has density \(f(x,y)=1\) on the unit square \(0<x<1,\ 0<y<1\), and zero elsewhere. Find the probability and conditional joint density for the triangular event \(A=\{X+Y\leq 1\}\). Then find the conditional density of \(X\) and calculate \(P(X\leq 1/2\mid A)\).
The event lies in the unit square and can be described by \(0<x<1\) and \(0<y<1-x\). Its probability is $$ P(A)=\int_0^1\int_0^{1-x}1\,dy\,dx =\int_0^1(1-x)\,dx =\left[x-\frac{x^2}{2}\right]_0^1 =\frac12. $$
The restricted density is the original density divided by this probability, so \(f_{X,Y\mid A}(x,y)=2\) on the triangle and 0 outside it. Integrating over the triangular slice at a fixed \(x\) gives $$ f_{X\mid A}(x)=\int_0^{1-x}2\,dy=2(1-x),\qquad 0<x<1. $$
This is a valid density because \(\int_0^1 2(1-x)\,dx=1\). Its conditional CDF on \(0\leq x\leq 1\) is \(F_{X\mid A}(x)=\int_0^x2(1-t)\,dt=2x-x^2\). In particular, $$ P(X\leq 1/2\mid A)=2\left(\frac12\right)-\left(\frac12\right)^2=\frac34. $$
Rectangular Regions and Nonrectangular Supports
A rectangular conditioning event is specified by two interval restrictions, but the conditional law still depends on the joint support and density. If the original support is triangular, a rectangle may be clipped by its diagonal boundary. If the support is rectangular, the full conditioning rectangle may be available, but the density inside it may still vary. The denominator must always be calculated from the original joint density over the region that is actually possible.
Worked Example: A Rectangle Inside a Triangular Support
Let \((X,Y)\) have density \(f(x,y)=2\) on \(0<x<y<1\), and zero elsewhere. Condition on the rectangle \(R=\{0<X<1/2,\ 1/2<Y<1\}\). Find its probability and the conditional joint and marginal densities.
The stated function is a valid density: its integral over the triangular support is $$ \int_0^1\int_0^y 2\,dx\,dy=\int_0^1 2y\,dy=1. $$ Inside the conditioning rectangle, \(x<1/2<y\), so the triangular constraint \(x<y\) is satisfied throughout, apart from boundaries of probability zero. Therefore $$ P(A_R)=\int_0^{1/2}\int_{1/2}^1 2\,dy\,dx =2\left(\frac12\right)\left(\frac12\right)=\frac12. $$
The conditional joint density is \(2/(1/2)=4\) on \(R\) and zero elsewhere. For \(0<x<1/2\), the permitted \(y\)-interval has length \(1/2\), so $$ f_{X\mid A_R}(x)=\int_{1/2}^1 4\,dy=2,\qquad 0<x<1/2. $$ Similarly, for \(1/2<y<1\), the permitted \(x\)-interval has length \(1/2\), giving $$ f_{Y\mid A_R}(y)=\int_0^{1/2}4\,dx=2,\qquad 1/2<y<1. $$ Each marginal integrates to 1 over its interval. In this example the rectangle lies entirely inside the triangle, but this must be checked rather than assumed.
Worked Example: A Rectangle Under a Varying Density
Suppose \((X,Y)\) has density \(f(x,y)=2x\) on the unit square \(0<x<1,\ 0<y<1\), and zero elsewhere. Condition on \(R=\{0<X<1/2,\ 1/2<Y<1\}\). Find the probability of the event, the restricted joint density, both conditional marginals, and \(P(X\leq 1/4\mid A_R)\).
First verify the original density: \(\int_0^1\int_0^1 2x\,dy\,dx=\int_0^1 2x\,dx=1\). The region probability is $$ P(A_R)=\int_0^{1/2}\int_{1/2}^1 2x\,dy\,dx =\frac12\int_0^{1/2}2x\,dx =\frac12\left[x^2\right]_0^{1/2} =\frac18. $$
Hence the conditional joint density is \(16x\) on \(R\), because \(2x/(1/8)=16x\), and zero elsewhere. Its \(X\)-marginal is $$ f_{X\mid A_R}(x)=\int_{1/2}^1 16x\,dy=8x,\qquad 0<x<1/2, $$ which integrates to \(\left[4x^2\right]_0^{1/2}=1\). Its \(Y\)-marginal is $$ f_{Y\mid A_R}(y)=\int_0^{1/2}16x\,dx=2,\qquad 1/2<y<1, $$ which also integrates to 1. Finally, $$ P(X\leq 1/4\mid A_R)=\int_0^{1/4}8x\,dx =\left[4x^2\right]_0^{1/4} =\frac14. $$
The conditional density is not constant on the rectangle: the original density puts more weight at larger \(x\). Dividing by the event probability changes its scale, not its shape.
Normalization, Geometry, and a Common Pitfall
Two checks help prevent errors. First, compute the probability of the conditioning region from the original density before normalizing. Second, integrate the resulting conditional joint or marginal density over its full conditional support to verify that the result is 1. These checks can reveal a missed geometric constraint or a reversed integration bound.
A frequent mistake is to treat a constant value on a region as automatically being a valid density, or to treat the conditional density as the original density without dividing by the event probability. For example, a function equal to 3 on a region of area \(1/6\) and zero elsewhere integrates to \(3(1/6)=1/2\), so it is not a probability density. It cannot be used as a valid joint density as stated. If it is an unnormalized kernel, it must first be normalized; the constant density on that region would be \(6\), not \(3\). Separately, even when the original density is valid, conditioning on a region of probability \(p\) requires dividing the restricted density by \(p\).
The method matters whenever data or a model imposes joint constraints: a pair may be retained only when its sum is below a threshold, when both coordinates fall in specified intervals, or when it lies in a geometric subset of its support. Writing the event as a region, finding its probability, and integrating over the correct slices turns such restrictions into explicit conditional laws.
Check Your Understanding
For each question, identify the region of integration before evaluating any integral.
- If \((X,Y)\) is uniform on the unit square, what is \(P(X+Y\geq 1)\), and what is the conditional joint density on that event?
- For a joint density supported on \(0<x<y<1\), what restriction must be applied when calculating the probability of the rectangle \(0<x<3/4,\ 1/2<y<1\)?
- State the formula for \(f_{X\mid A_R}(x)\) in terms of the joint density and the conditioning region.
- Why must the probability of the conditioning event be positive for the region-conditioning formula in this tutorial?
- A proposed density is constant at 4 on a region of area \(1/8\) and zero elsewhere. Does it integrate to 1? If not, what constant would make it a density on that region?