Tutorials › Statistical Theory I - Probability and Distribution Theory › Triangular-Support Density Calculations

Joint Distribution Representations · Tutorial 218 of 994

Triangular-Support Density Calculations

Learn to normalize and marginalize a density on a triangle, then set up and evaluate probabilities for regions bounded by sloping lines.

Intermediate 10 min read

What You'll Learn

  • Set the integration limits for a right-triangular support.
  • Normalize a nonconstant joint density on that support.
  • Derive each marginal density by integrating over the other coordinate.
  • Calculate probabilities below a sloping line, including when the limits must be split.
  • Check probability calculations against the support and total probability.

Why the Shape of the Support Matters

For a joint density, the support determines which pairs of values are possible and, just as importantly, the limits of integration. On a triangular support, one coordinate’s range depends on the value of the other. Using rectangular limits without checking that dependence can include points outside the support or omit points inside it.

We will work with the triangle bounded by the coordinate axes and the line \(x+y=1\). The calculations illustrate a general method: describe the support with inequalities, normalize by integrating over the whole triangle, and then integrate over the part of the triangle that corresponds to the event of interest.

Definition: Let \(T=\{(x,y):x\geq 0,\ y\geq 0,\ x+y\leq 1\}\). A joint density supported on \(T\) is a nonnegative function \(f_{X,Y}(x,y)\) that is zero outside \(T\) and satisfies \(\int_0^1\int_0^{1-x} f_{X,Y}(x,y)\,dy\,dx=1\). The boundary may be included or excluded without changing probabilities for a density, since the boundary has area zero.

The limits \(0\leq x\leq 1\) and \(0\leq y\leq 1-x\) describe the triangle using vertical slices. Equivalently, horizontal slices give \(0\leq y\leq 1\) and \(0\leq x\leq 1-y\). Either order is valid when the integrand is integrable; choose the one that makes the event and calculations simplest.

Normalize the Density and Find Its Marginals

Consider a density proportional to \(x+y\) on \(T\). This function is nonnegative on the triangle, but it is not yet a density until its integral is one. The normalizing constant must account for the entire triangular region, not for the enclosing unit square.

Worked Example: Normalize and Marginalize a Triangular Density

Suppose \(f_{X,Y}(x,y)=c(x+y)\) on \(T\), and \(f_{X,Y}(x,y)=0\) elsewhere. Find \(c\), then derive the two marginal densities.

Normalize. Integrate first with respect to \(y\), whose upper limit is \(1-x\):

$$ \begin{aligned} 1 &=c\int_0^1\int_0^{1-x}(x+y)\,dy\,dx\\ &=c\int_0^1\left[x(1-x)+\frac{(1-x)^2}{2}\right]dx\\ &=c\int_0^1\frac{1-x^2}{2}\,dx =c\left[\frac{x}{2}-\frac{x^3}{6}\right]_0^1 =\frac{c}{3}. \end{aligned} $$

Thus \(c=3\). The normalized joint density is \(f_{X,Y}(x,y)=3(x+y)\) on \(T\).

Marginal of \(X\). For a fixed \(x\) between zero and one, the possible \(y\)-values run from zero to \(1-x\). Therefore,

$$ f_X(x)=\int_0^{1-x}3(x+y)\,dy =\frac{3}{2}(1-x^2),\qquad 0\leq x\leq 1. $$

Outside this interval \(f_X(x)=0\). By symmetry of the joint density and support, the other marginal is

$$ f_Y(y)=\int_0^{1-y}3(x+y)\,dx =\frac{3}{2}(1-y^2),\qquad 0\leq y\leq 1, $$

and \(f_Y(y)=0\) otherwise. As a check, each marginal integrates to \(\frac{3}{2}(1-\frac{1}{3})=1\).

Theorem: If \(f_{X,Y}\) is a joint density, then its marginal density for \(X\) is \(f_X(x)=\int_{-\infty}^{\infty} f_{X,Y}(x,y)\,dy\) for almost every \(x\); the corresponding formula for \(Y\) integrates over \(x\). On \(T\), these integrals reduce to \(f_X(x)=\int_0^{1-x} f_{X,Y}(x,y)\,dy\) and \(f_Y(y)=\int_0^{1-y} f_{X,Y}(x,y)\,dx\) on the unit interval.

To justify the marginal formula, let \(A\) be any Borel set of possible \(X\)-values. By the definition of a joint density and Tonelli’s theorem, which permits changing the order of integration for a nonnegative measurable integrand,

$$ \begin{aligned} P(X\in A) &=\int_A\int_{-\infty}^{\infty}f_{X,Y}(x,y)\,dy\,dx\\ &=\int_A f_X(x)\,dx. \end{aligned} $$

Thus \(f_X\) gives the probabilities of all measurable sets of \(X\)-values, as required of a marginal density. The same argument, integrating first over \(x\), proves the formula for \(f_Y\). On \(T\), the support makes the integrand zero except for \(0\leq y\leq 1-x\) or, in the other order, \(0\leq x\leq 1-y\). This gives the stated limits. \(\square\)

Probabilities Below Sloping Boundaries

For a region \(R\) contained in the support, its probability is the integral of the joint density over that region:

$$ P\big((X,Y)\in R\big)=\iint_R f_{X,Y}(x,y)\,dA. $$

When vertical slices are convenient, write this as an integral in \(y\) first, with the lower and upper \(y\)-limits determined by both the triangle and the event. If the line bounding the event crosses a boundary of the triangle, the appropriate limits may change at the crossing and the integral must be split.

Worked Example: Probability Below a Parallel Sloping Line

For the density \(3(x+y)\) on \(T\), find \(P(X+Y\leq \frac{1}{2})\). The event cuts out a smaller triangle with vertices \((0,0)\), \((\frac{1}{2},0)\), and \((0,\frac{1}{2})\). Its vertical limits are \(0\leq x\leq\frac{1}{2}\) and \(0\leq y\leq\frac{1}{2}-x\).

More generally, for \(0\leq a\leq1\), the inner integral for \(X+Y\leq a\) is

$$ \int_0^{a-x}3(x+y)\,dy =3\left[x(a-x)+\frac{(a-x)^2}{2}\right] =\frac{3}{2}(a^2-x^2). $$

Integrating over \(0\leq x\leq a\) gives

$$ P(X+Y\leq a) =\int_0^a\frac{3}{2}(a^2-x^2)\,dx =\frac{3}{2}\left[a^3-\frac{a^3}{3}\right] =a^3. $$

Setting \(a=\frac{1}{2}\), the requested probability is \((\frac{1}{2})^3=\frac{1}{8}\). The calculation uses the density on the smaller triangle, not the area alone, because the density varies with \(x+y\).

Worked Example: Split the Integral Where a Line Crosses the Triangle

Find \(P(Y\leq X)\) under the same joint density. At a fixed \(x\), the upper \(y\)-limit is the smaller of \(x\) and \(1-x\). These two limits are equal at \(x=\frac{1}{2}\), so the integration must be split there.

$$ \begin{aligned} P(Y\leq X) &=\int_0^{1/2}\int_0^x3(x+y)\,dy\,dx +\int_{1/2}^{1}\int_0^{1-x}3(x+y)\,dy\,dx\\ &=\int_0^{1/2}\frac{9}{2}x^2\,dx +\int_{1/2}^{1}\frac{3}{2}(1-x^2)\,dx\\ &=\frac{3}{16}+\frac{5}{16} =\frac{1}{2}. \end{aligned} $$

The result is also consistent with the symmetry of the density and triangle under exchanging \(x\) and \(y\). The boundary \(x=y\) has probability zero, so the two regions \(Y<X\) and \(Y>X\) have equal probability.

Worked Example: A Sloping Line That Stays Inside the Triangle

Find the probability that \(Y\leq (1-X)/2\). For every \(x\) in \([0,1]\), the line’s height \((1-x)/2\) is between zero and the top of the triangle \(1-x\). Thus the event has the single set of limits \(0\leq x\leq1\), \(0\leq y\leq(1-x)/2\).

$$ \begin{aligned} P\left(Y\leq\frac{1-X}{2}\right) &=\int_0^1\int_0^{(1-x)/2}3(x+y)\,dy\,dx\\ &=3\int_0^1\left[\frac{x(1-x)}{2} +\frac{(1-x)^2}{8}\right]dx\\ &=\frac{3}{8}\int_0^1(1+2x-3x^2)\,dx\\ &=\frac{3}{8}\left[ x+x^2-x^3\right]_0^1 =\frac{3}{8}. \end{aligned} $$

The complement has probability \(1-\frac{3}{8}=\frac{5}{8}\). This check also confirms that the line and its two sides partition the support, apart from a boundary of probability zero.

A Reliable Setup and a Common Pitfall

Before integrating, translate the support and event into inequalities. For vertical slices, fix \(x\), find the allowable \(y\)-values from the support, then intersect those values with the event. In symbols, the actual limits are the overlap of \(0\leq y\leq1-x\) and the event’s \(y\)-constraint. If that overlap changes as \(x\) varies, split the outer integral at the change point.

1
Write the support.
For this triangle, \(0\leq x\leq1\) and \(0\leq y\leq1-x\).
2
Add the event constraint.
For example, \(Y\leq X\) imposes \(y\leq x\) in addition to the support constraint.
3
Find any crossing points.
Here \(x=1-x\) at \(x=\frac{1}{2}\), where the active upper limit changes.
4
Integrate and check.
Use the joint density over the resulting region; verify that the probability is between zero and one and respects any symmetry.

A common mistake is to use \(0\leq y\leq1\) for every \(x\) just because both coordinates individually lie between zero and one. Those rectangular limits describe the unit square, not \(T\). For example, they include \((x,y)=(0.8,0.8)\), where \(x+y=1.6>1\), outside the support. The correction is to retain \(y\leq1-x\) and then impose the event’s boundary as well. Another mistake is to use \(y\leq x\) as the only upper-limit condition: in the part \(x>\frac{1}{2}\), the triangle’s edge \(y\leq1-x\) is more restrictive.

Key takeaway: On a triangular support, the limits depend on the slice. Normalize over the whole triangle, integrate out the other coordinate to obtain a marginal, and intersect every event’s limits with the support before calculating its probability.

Check Your Understanding

For each question, identify the relevant limits before evaluating any integral.

  1. For the density \(3(x+y)\) on \(T\), what are the vertical integration limits for the event \(X+Y\leq\frac{3}{4}\)?
  2. Why does the marginal integral for \(f_X(x)\) stop at \(1-x\), rather than at \(1\)?
  3. For the event \(Y\leq 2X\) on \(T\), at what value of \(x\) does the active upper limit change?
  4. Explain why the probability of the line \(X+Y=1\) is zero for a density supported on \(T\).
  5. How can symmetry be used to check the calculated value of \(P(Y\leq X)\) in this example?