From a Curved Event to an Integral
A probability such as \(P(Y\ge X^2)\) is not yet an integral: the event describes a region in the plane, and the limits must describe that region without omitting or counting any part twice. With a joint density, probability is the integral of the density over the event. The main work is therefore geometric: describe the region using one coordinate as the outer variable and the other as the inner variable.
The same region can often be described in two ways. Vertical slices fix \(x\) and let \(y\) vary between bounds; horizontal slices fix \(y\) and let \(x\) vary between bounds. Either description is valid if it covers the region precisely. Choosing the more convenient one can make an integral substantially simpler.
The density is zero outside its support, so the integral may be taken over the part of \(A\) in the support, or over all of \(A\) while retaining the zero values of \(f\). Limits should still describe the event region accurately; relying on a zero density to conceal incorrectly chosen limits can make a setup difficult to check.
The Slice Formula and Boundary Curves
Here is the precise reason coordinate-wise limits work. The integrand can be written as \(f(x,y)\mathbf{1}_A(x,y)\), where \(\mathbf{1}_A\) equals 1 on \(A\) and 0 elsewhere. This function is nonnegative and measurable. Tonelli's theorem therefore permits iterated integration, including when the integral is infinite; for a probability density the result is finite.
Proof. By the definition of probability from a joint density, \(P((X,Y)\in A)=\iint_{\mathbb R^2}\mathbf{1}_A(x,y)f(x,y)\,dx\,dy\). The integrand is nonnegative and measurable, so Tonelli's theorem gives \(\int_{\mathbb R}\int_{\mathbb R}\mathbf{1}_A(x,y)f(x,y)\,dy\,dx\). For fixed \(x\), the indicator is 1 exactly for \(y\) in the vertical slice of \(A\). The inner integral is consequently the integral over that slice. Reversing the integration order gives the horizontal-slice expression by the same theorem. \(\square\)
For a density, changing whether a smooth boundary curve is included does not change the probability. This is useful when translating a strict inequality into integral limits: the curve itself can generally be included or excluded without changing the answer.
Proof. The graph is measurable because \(g\) is continuous. For each fixed \(x\), its vertical section contains just the single point \(g(x)\), which has one-dimensional Lebesgue measure zero. Tonelli's theorem applied to the indicator of the graph says its area is the integral, over \(x\), of these section lengths. That integral is zero. Integrating a density over a set of area zero also gives zero: the integral of any nonnegative measurable function over a measure-zero set is zero. \(\square\)
Choosing and Checking the Limits
Write the inequalities defining the event, then restrict attention to where the joint density can be nonzero.
Ask whether fixing \(x\) or fixing \(y\) gives the simpler slices. Sketching the region helps reveal intersections and changes in the bounds.
For vertical slices, express the allowed \(y\)-values in terms of \(x\); for horizontal slices, express the allowed \(x\)-values in terms of \(y\).
Every point of the region should appear in one slice. If a boundary changes role or the slice splits into disjoint intervals, use separate integrals.
Worked Example: Above a Parabola in the Unit Square
Suppose \((X,Y)\) is uniform on the unit square, so \(f(x,y)=1\) for \(0\le x\le1\) and \(0\le y\le1\), and zero otherwise. Find \(P(Y\ge X^2)\).
For each \(x\) between 0 and 1, the event permits \(y\) from \(x^2\) to 1. The vertical-slice integral is
As a check, solve the inequality for \(x\): for \(0\le y\le1\), \(y\ge x^2\) means \(0\le x\le\sqrt y\). Integrating horizontally gives
Both descriptions cover the same part of the square, and their agreement checks the limits as well as the calculation.
Worked Example: Between Two Curves
Again let \((X,Y)\) be uniform on the unit square. Find the probability of the region \(X^2\le Y\le\sqrt X\).
For \(0\le x\le1\), the lower curve \(x^2\) is no higher than the upper curve \(\sqrt x\). Thus vertical slices give
For horizontal slices, \(x^2\le y\) implies \(x\le\sqrt y\), while \(y\le\sqrt x\) implies \(y^2\le x\). Therefore \(y^2\le x\le\sqrt y\), for \(0\le y\le1\), and the reversed integral is
The inequalities must be solved in the correct direction: in particular, \(y\le\sqrt x\) is equivalent to \(y^2\le x\) here because both coordinates are nonnegative.
When the Limits Must Be Split
A single pair of inner limits may not describe every slice. This happens, for example, when two boundary curves intersect and exchange which one is the upper or lower bound. The intersection values determine where to split the integral. The same issue arises when horizontal slices change their endpoint formula.
Worked Example: A Region Between Curves That Intersect
For a uniform distribution on the unit square, find the probability of \(X^2\le Y\le1-X\). The lower curve and upper line meet when \(x^2=1-x\). The root in \([0,1]\) is \(a=(\sqrt5-1)/2\); the other root is negative. Thus the region exists only for \(0\le x\le a\).
Vertical slices give
To reverse the order, the horizontal range changes where the two candidate right endpoints, \(\sqrt y\) and \(1-y\), cross. This occurs at \(y=c=a^2=1-a\). For \(0\le y\le c\), \(\sqrt y\le1-y\), so \(0\le x\le\sqrt y\). For \(c\le y\le1\), \(1-y\le\sqrt y\), so \(0\le x\le1-y\). Hence
These expressions agree. Since \(a^2=1-a\) and \(a^3=2a-1\), the vertical expression is \((5a-1)/6\), and the horizontal expression is also \((5a-1)/6\). The split is essential: using \(x\le\sqrt y\) for all \(y\) would extend some horizontal slices beyond the line \(x=1-y\).
Common Pitfall: Bounds That Miss or Repeat Part of the Region
A frequent error is to identify the curves correctly but choose limits that do not describe their intersection. In the last example, using \(0\le x\le\sqrt y\) for every \(y\) ignores the constraint \(x\le1-y\) at larger \(y\). That integral counts points outside the event. Conversely, a region whose horizontal slice has two disjoint pieces cannot be represented by one interval without including the gap; it must be split into separate intervals or separate regions.
A reliable check is to test a point in a typical slice against the original event inequalities. Also check the extreme slices and the boundary intersections. If reversing the order gives a dramatically different answer, first inspect the limits before suspecting the integration arithmetic.
Check Your Understanding
Use sketches or the defining inequalities to justify each set of limits.
- For a uniform distribution on the unit square, set up a vertical-slice integral for \(P(Y\le X^3)\). Then reverse the order.
- For the same distribution, describe the horizontal slices of \(X\le Y^2\) in the unit square. What are the outer and inner limits?
- Why does including the curve \(y=g(x)\) rather than excluding it not change a probability under a joint density, when \(g\) is continuous on a bounded interval?
- For \(0\le X,Y\le1\), the region is \(Y\ge X^2\) and \(Y\le 1-X\). Find the \(x\)-range by locating the intersection of the curves.
- Explain why a horizontal slice consisting of two disjoint intervals cannot be represented by a single inner integral over an interval without further splitting.