Tutorials › Statistical Theory I - Probability and Distribution Theory › Joint CDFs from Densities Over Rectangles

Joint Distribution Representations · Tutorial 214 of 994

Joint CDFs from Densities Over Rectangles

Learn to turn a joint density into a joint CDF by integrating over the part of its support below both thresholds.

Intermediate 12 min read

What You'll Learn

  • Express a joint CDF as an integral over a lower-left rectangle.
  • Set integration limits for rectangular and triangular supports.
  • Derive piecewise CDF formulas when a rectangle crosses a support boundary.
  • Check normalization and limiting values in worked examples.
  • Recognize why integrating over the whole support can give the wrong CDF.

From a Density to a Joint CDF

A joint density describes probability locally across the plane; a joint cumulative distribution function collects that probability up to a pair of thresholds. For a given \((x,y)\), the relevant region is the lower-left rectangle extending from \(-\infty\) to \(x\) in the first coordinate and from \(-\infty\) to \(y\) in the second. If the density is zero outside a smaller support, only the part of that rectangle inside the support contributes.

This distinction is important when the support is not itself a rectangle. As thresholds move across a triangular boundary, the shape being integrated changes. The resulting CDF may therefore have different formulas in different regions of the \((x,y)\)-plane.

Definition: Suppose \((X,Y)\) has a joint density \(f(u,v)\), meaning that \(f\) is nonnegative and measurable, integrates to one over \(\mathbb{R}^2\), and probabilities are given by integrating \(f\) over the relevant regions. Its joint CDF is $$ F(x,y)=P(X\le x,\;Y\le y) =\int_{-\infty}^{x}\int_{-\infty}^{y} f(u,v)\,dv\,du. $$ The variables \(u\) and \(v\) are integration variables; \(x\) and \(y\) are the CDF thresholds.

An equivalent expression integrates in the opposite order: $$ F(x,y)=\int_{-\infty}^{y}\int_{-\infty}^{x} f(u,v)\,du\,dv. $$ Both expressions include exactly the same rectangle, \((-\infty,x]\times(-\infty,y]\). Because \(f\) is nonnegative and measurable, Tonelli's theorem permits either order of integration. The support of the density can make one order much simpler than the other.

Choosing the Bounds From the Support

In a calculation, it is often clearest to write the integral over the support explicitly. For example, if \(f\) is positive only on a set \(S\), then $$ F(x,y)=\iint_{S\cap((-\infty,x]\times(-\infty,y])} f(u,v)\,du\,dv. $$ This form emphasizes that the CDF is not generally the integral over the entire support: the thresholds may cut through it. To evaluate the integral, describe the intersection using bounds that depend on the thresholds and, when necessary, split it into simpler regions.

The choice of order is a geometric convenience, not a change in the probability being calculated. For a support described by \(0<v<u<1\), for instance, fixing \(u\) makes the allowed values of \(v\) easy to state. For a support described by \(u+v<1\), the upper limit on \(v\) depends on \(u\). In either case, the limits must also respect \(u\le x\) and \(v\le y\).

Worked Example: A Uniform Density on a Rectangle

Let \(f(u,v)=1\) for \(0<u<1\) and \(0<v<1\), and let \(f(u,v)=0\) elsewhere. This is a valid density because the area of its support is one. Find \(F(x,y)\) for all real \(x,y\).

The portion of the unit square below the thresholds has coordinate ranges \(0<u<\min(x,1)\) and \(0<v<\min(y,1)\), provided both thresholds are positive. Its area is the product of those side lengths. If either threshold is nonpositive, the rectangle has no positive-area intersection with the support. Thus $$ F(x,y)= \begin{cases} 0, & x\le 0\text{ or }y\le 0,\\ \min(x,1)\min(y,1), & x>0,\ y>0. \end{cases} $$

For example, at \(x=0.4\) and \(y=0.7\), both thresholds lie inside the support, so \(F(0.4,0.7)=0.4(0.7)=0.28\). At \(x=1.3\) and \(y=0.7\), the first threshold includes the entire horizontal extent of the support, giving \(F(1.3,0.7)=1(0.7)=0.7\). At \(x=1.3,y=1.2\), the full support is included and \(F=1\).

Triangular Support: One Coordinate Bounded by the Other

Consider the triangle \(0<v<u<1\), whose sloping edge is \(v=u\). A threshold rectangle may stop before the edge, cross it, or extend beyond the support. These cases produce different formulas even though the density is constant throughout the triangle.

Worked Example: A Density on the Triangle \(0<v<u<1\)

Let \(f(u,v)=2\) on \(0<v<u<1\) and zero elsewhere. The area of this triangle is \(1/2\), so the density integrates to \(2(1/2)=1\). Find the joint CDF.

When \(x\le0\) or \(y\le0\), the intersection has probability zero. If \(0<x<1\) and \(y\ge x\), the \(y\)-threshold lies above the triangle at every \(u\le x\). For each \(u\) from \(0\) to \(x\), the allowed \(v\)-values run from \(0\) to \(u\), so $$ F(x,y)=\int_0^x\int_0^u 2\,dv\,du =\int_0^x 2u\,du=x^2. $$

If \(0<y<x<1\), the threshold \(v=y\) cuts across the triangle. For \(0<u<y\), the triangle imposes \(v<u\); for \(y<u<x\), the CDF threshold imposes \(v<y\). Split at \(u=y\): $$ F(x,y)=\int_0^y\int_0^u 2\,dv\,du +\int_y^x\int_0^y 2\,dv\,du =y^2+2y(x-y)=2xy-y^2. $$

If \(x\ge1\) and \(0<y<1\), the \(x\)-threshold includes the whole horizontal extent, but the \(y\)-threshold still cuts the triangle. The same split, now at \(u=y\) and \(u=1\), gives $$ F(x,y)=\int_0^y 2u\,du+\int_y^1 2y\,du =y^2+2y(1-y)=2y-y^2. $$ If \(x\ge1\) and \(y\ge1\), all the support is included, so \(F(x,y)=1\). Combining the cases, $$ F(x,y)= \begin{cases} 0, & x\le0\text{ or }y\le0,\\ 2xy-y^2, & 0<y<x<1,\\ x^2, & 0<x<1,\ y\ge x,\\ 2y-y^2, & x\ge1,\ 0<y<1,\\ 1, & x\ge1,\ y\ge1. \end{cases} $$

The formulas agree on their shared boundaries. For example, at \(y=x\) with \(0<x<1\), \(2xy-y^2=x^2\); at \(y=1\) with \(x\ge1\), \(2y-y^2=1\). This agreement is a useful check on a piecewise CDF.

Triangular Support: A Sloping Upper Boundary

A different triangle illustrates another common pattern: the amount of support available at a fixed first coordinate can shrink as that coordinate increases. Here the support is \(u>0,\ v>0,\ u+v<1\). Integrating in \(v\) at fixed \(u\) gives the upper limit \(1-u\); the CDF threshold \(y\) may further reduce it.

Worked Example: A Density on the Triangle \(u+v<1\)

Let \(f(u,v)=2\) on \(u>0,\ v>0,\ u+v<1\), and zero elsewhere. The support has area \(1/2\), so this is a normalized density. For \(x\le0\) or \(y\le0\), \(F(x,y)=0\). Now take \(x,y>0\).

If \(x+y\le1\), every point in the rectangle \(0<u\le x,\ 0<v\le y\) satisfies \(u+v\le1\). Its full area is included, and $$ F(x,y)=\int_0^x\int_0^y 2\,dv\,du=2xy. $$

Suppose next that \(0<x<1,\ 0<y<1\), and \(x+y>1\). For \(0<u<1-y\), the upper support boundary \(1-u\) lies above \(y\), so the allowed \(v\)-range ends at \(y\). For \(1-y<u<x\), it ends at \(1-u\). Therefore $$ \begin{aligned} F(x,y) &=\int_0^{1-y}\int_0^y 2\,dv\,du +\int_{1-y}^{x}\int_0^{1-u}2\,dv\,du\\ &=2y(1-y)+2\left[x-\frac{x^2}{2}-\left(\frac12-\frac{y^2}{2}\right)\right]\\ &=2x+2y-1-x^2-y^2. \end{aligned} $$

If \(x\ge1\) and \(0<y<1\), the threshold in \(u\) no longer truncates the support. Split where \(1-u=y\), or \(u=1-y\): $$ F(x,y)=\int_0^{1-y}2y\,du+\int_{1-y}^1 2(1-u)\,du =2y-y^2. $$ By symmetry, \(F(x,y)=2x-x^2\) when \(y\ge1\) and \(0<x<1\); when both thresholds are at least one, \(F=1\). These pieces join correctly: at \(x+y=1\), the formula \(2x+2y-1-x^2-y^2\) equals \(2xy\), since \(x+y=1\).

Why the Rectangle Integral Gives the CDF

Theorem: If \((X,Y)\) has a joint density \(f\), then for every real \(x,y\), $$ P(X\le x,\;Y\le y) =\int_{-\infty}^{x}\int_{-\infty}^{y}f(u,v)\,dv\,du. $$ The iterated integral may be taken in either order.

Proof. By the definition of a joint density, the probability of any measurable set \(A\subseteq\mathbb{R}^2\) is \(\iint_A f(u,v)\,du\,dv\). Take \(A=(-\infty,x]\times(-\infty,y]\), which is measurable. Its indicator restricts the integral to \(u\le x\) and \(v\le y\), giving $$ P(X\le x,\;Y\le y) =\iint_{\mathbb{R}^2}\mathbf{1}_{\{u\le x,\ v\le y\}}f(u,v)\,du\,dv =\int_{-\infty}^{x}\int_{-\infty}^{y}f(u,v)\,dv\,du. $$ The integrand \(\mathbf{1}_{\{u\le x,\ v\le y\}}f(u,v)\) is nonnegative and measurable. Tonelli's theorem therefore allows the order of integration to be reversed. This proves both claims. \(\square\)

Checks and a Common Pitfall

A correctly constructed CDF must stay between zero and one, be nondecreasing in each threshold, and approach one when both thresholds increase without bound. In these examples, the value at thresholds beyond the whole support is the integral of the density over its full support, which is one. Boundary lines do not change the calculations for a density: lines have two-dimensional Lebesgue measure zero, so assigning or omitting their endpoints does not alter the integral.

Common mistake: integrating over the whole support instead of the truncated support. For the density \(2\) on \(0<v<u<1\), the full integral is one. Using that value for every \(x,y\) would incorrectly claim, for example, that \(F(0.4,0.7)=1\). The thresholds include only \(0<u\le0.4\) and \(0<v\le0.7\); because \(0.7\ge0.4\), the relevant triangle has mass $$ \int_0^{0.4}\int_0^u2\,dv\,du=0.4^2=0.16, $$ not one. Always intersect the threshold rectangle with the support before setting the integration limits.

A practical method is to sketch the support and the threshold rectangle, identify which boundary controls each integration limit, and split the integral wherever that controlling boundary changes. Then check the result at the support boundaries and at thresholds large enough to include all the mass.

Check Your Understanding

Use the support and integration-limit ideas to answer these questions.

  1. For the uniform density on the unit square, calculate \(F(0.6,1.4)\).
  2. For the density \(2\) on \(0<v<u<1\), why must an integral for \(0<y<x<1\) be split at \(u=y\)?
  3. For the density \(2\) on \(u>0,\ v>0,\ u+v<1\), which boundary controls the upper limit for \(v\) at a fixed \(u\)?
  4. In the last triangular example, verify the formula at \(x=0.2,\ y=0.3\) using the case \(x+y\le1\).
  5. Explain why changing the inclusion of a straight boundary of a triangular support does not change probabilities computed from a density.