Tutorials › Statistical Theory I - Probability and Distribution Theory › Ratio Densities for Positive Random Variables

Many-to-One Transformations · Tutorial 436 of 994

Ratio Densities for Positive Random Variables

Learn how to transform the joint density to obtain a ratio density and how the supports of the numerator and denominator determine where the ratio can occur.

Intermediate 10 min read

What You'll Learn

  • Derive the ratio-density formula from a change of variables.
  • Identify the Jacobian and the region of integration for the transformed variables.
  • Determine the ratio's support from the supports of the numerator and denominator.
  • Compute ratio densities for exponential and uniform models.
  • Check a derived density by verifying its support, boundary behavior, and total integral.

Why Ratios Need Their Own Transformation

A ratio \(R=X/Y\) is always positive when both \(X\) and \(Y\) are positive, but its density depends on which values of \(X\) and \(Y\) can occur together to produce a given ratio. A single value \(r\) can arise from many pairs: \(X=2,Y=1\) and \(X=10,Y=5\) both give \(r=2\). The density must account for all such pairs, not just evaluate a density at one inverse value.

The useful transformation keeps the denominator as a second coordinate. It maps \((X,Y)\) to \((R,Y)\), so the possible values of \(Y\) can be integrated out after the transformation. This also makes the role of the supports explicit.

The Ratio-Density Formula

Theorem: Suppose \(X\) and \(Y\) are independent continuous random variables with densities \(f_X\) and \(f_Y\), and \(P(X>0)=P(Y>0)=1\). Then \(R=X/Y\) has density $$ f_R(r)=\int_0^\infty y f_X(ry)f_Y(y)\,dy,\qquad r>0, $$ and \(f_R(r)=0\) for \(r\leq 0\). The integral is understood as a nonnegative Lebesgue integral and may be infinite at individual points; a density is specified up to changes on sets of Lebesgue measure zero.

To derive the formula, transform the pair \((X,Y)\) to \((R,Y)\). On the positive quadrant, this is a one-to-one differentiable transformation: $$ r=\frac{x}{y},\qquad s=y, $$ with inverse \(x=rs,\ y=s\), where \(r>0\) and \(s>0\). The absolute Jacobian determinant of the inverse transformation is $$ \left|\frac{\partial(x,y)}{\partial(r,s)}\right| = \left|\begin{matrix}s&r\\0&1\end{matrix}\right| =s. $$ Independence gives the joint density \(f_X(x)f_Y(y)\) for \((X,Y)\). By the change-of-variables formula, the joint density of \((R,Y)\) is therefore $$ f_{R,Y}(r,y)=y f_X(ry)f_Y(y),\qquad r>0,\ y>0. $$ Integrating out \(y\) gives the stated marginal density of \(R\).

Why this is a density: For every Borel set \(A\subseteq\mathbb R\), the change of variables and Tonelli's theorem give $$ P(R\in A) =\int_A\int_0^\infty y f_X(ry)f_Y(y)\,dy\,dr. $$ The integrand is nonnegative and measurable, so the order of integration is valid. Taking \(A=\mathbb R\), another application of the change of variables gives $$ \int_0^\infty f_R(r)\,dr =\int_0^\infty\int_0^\infty y f_X(ry)f_Y(y)\,dy\,dr =\int_0^\infty\int_0^\infty f_X(x)f_Y(y)\,dx\,dy =1. $$ Thus the formula integrates to one.

Support: Which Ratios Can Occur?

The possible ratios depend on the supports, not merely on the fact that \(R>0\). If \(X\) has support \([a,b]\) and \(Y\) has support \([c,d]\), with \(0<c\leq d\) and \(0\leq a\leq b\), then the ratio's support is $$ \left[\frac{a}{d},\frac{b}{c}\right]. $$ The smallest ratio pairs the smallest possible numerator with the largest possible denominator; the largest ratio pairs the largest numerator with the smallest possible denominator. For supports with gaps, the ratio support need not be one interval.

Support result: Let \(\operatorname{supp}(X)\) and \(\operatorname{supp}(Y)\) denote the topological supports of \(X\) and \(Y\). For independent positive \(X\) and \(Y\), the support of \(X/Y\) is the closure of $$ \left\{\frac{x}{y}:x\in\operatorname{supp}(X)\cap(0,\infty),\ y\in\operatorname{supp}(Y)\cap(0,\infty)\right\}. $$

To verify this support statement, write \(Q\) for the set inside the closure. If \(r_0=x_0/y_0\in Q\), continuity of \((x,y)\mapsto x/y\) at \((x_0,y_0)\) implies that, for every open interval \(I\) containing \(r_0\), there are neighborhoods \(U\) of \(x_0\) and \(V\) of \(y_0\) such that \(x/y\in I\) for all \(x\in U,\ y\in V\). The definition of support gives \(P(X\in U)>0\) and \(P(Y\in V)>0\); independence then gives \(P(X/Y\in I)\geq P(X\in U)P(Y\in V)>0\). Thus every point of \(Q\), and hence every point of its closure, belongs to the support of the ratio. Conversely, \(X\) and \(Y\) belong to their respective supports with probability one. Since \(Y>0\) almost surely, \(X/Y\in Q\) almost surely. Any point outside the closure of \(Q\) has a neighborhood disjoint from \(Q\), which therefore has probability zero under the ratio distribution. This proves the claim. \(\square\)

Worked Example: Ratio of Two Exponential Variables

Let \(X\sim\operatorname{Exp}(2)\) and \(Y\sim\operatorname{Exp}(3)\), independently, where the rate-\(\lambda\) density is \(f(t)=\lambda e^{-\lambda t}\) for \(t>0\). Both supports are \([0,\infty)\), so the ratio has support \([0,\infty)\), with \(R>0\) almost surely.

Substitute the densities into the ratio formula: $$ f_R(r)=\int_0^\infty y(2e^{-2ry})(3e^{-3y})\,dy =6\int_0^\infty y e^{-(2r+3)y}\,dy,\qquad r>0. $$ For \(c>0\), integration by parts gives \(\int_0^\infty y e^{-cy}\,dy=1/c^2\). Therefore $$ f_R(r)=\frac{6}{(2r+3)^2},\qquad r>0. $$ As a check, substitute \(u=2r+3\): $$ \int_0^\infty \frac{6}{(2r+3)^2}\,dr =3\int_3^\infty u^{-2}\,du =3\left[-\frac{1}{u}\right]_3^\infty =1. $$ The density is positive for every \(r>0\), as required by the support.

Worked Example: Ratio of Uniform Variables on Different Intervals

Let \(X\sim\operatorname{Uniform}(1,2)\) and \(Y\sim\operatorname{Uniform}(1,3)\), independently. Their densities are \(f_X(x)=1\) on \([1,2]\) and \(f_Y(y)=1/2\) on \([1,3]\). The support of \(R=X/Y\) is \([1/3,2]\).

For a fixed \(r>0\), the integrand is nonzero only when \(1\leq y\leq3\) and \(1\leq ry\leq2\). Equivalently, $$ \max(1,1/r)\leq y\leq\min(3,2/r). $$ The interval is nonempty only for \(1/3\leq r\leq2\). Its endpoints change form at \(r=2/3\) and \(r=1\), giving $$ f_R(r)= \begin{cases} \frac14(9-r^{-2}),&1/3\leq r\leq2/3,\\ \frac{3}{4r^2},&2/3<r\leq1,\\ r^{-2}-\frac14,&1<r\leq2,\\ 0,&\text{otherwise}. \end{cases} $$ For the first interval, for example, the integration limits are \(1/r\) and \(3\), so \(f_R(r)=\frac12\int_{1/r}^3 y\,dy=\frac14(9-r^{-2})\). On the second interval they are \(1/r\) and \(2/r\); on the third they are \(1\) and \(2/r\), producing the other two expressions.

The pieces agree at their breakpoints: at \(r=2/3\), both neighboring values equal \(27/16\), and at \(r=1\), both equal \(3/4\). Their integrals are $$ \int_{1/3}^{2/3}\frac14(9-r^{-2})\,dr=\frac38,\qquad \int_{2/3}^{1}\frac{3}{4r^2}\,dr=\frac38,\qquad \int_1^2(r^{-2}-1/4)\,dr=\frac14. $$ The total is \(3/8+3/8+1/4=1\).

Worked Example: A Uniform Numerator and an Exponential Denominator

Let \(X\sim\operatorname{Uniform}(1,2)\) and let \(Y\sim\operatorname{Exp}(1)\), independently. Every positive ratio is possible, so the support is \([0,\infty)\) as a topological support, although \(R>0\) almost surely.

Here \(f_X(x)=1\) for \(1\leq x\leq2\) and \(f_Y(y)=e^{-y}\) for \(y>0\). The condition \(1\leq ry\leq2\) restricts \(y\) to \([1/r,2/r]\). Thus, for every \(r>0\), $$ f_R(r)=\int_{1/r}^{2/r} y e^{-y}\,dy =\left[-(y+1)e^{-y}\right]_{1/r}^{2/r} =\left(1+\frac1r\right)e^{-1/r} -\left(1+\frac2r\right)e^{-2/r}. $$ The formula is positive because it is the integral of the strictly positive function \(y e^{-y}\) over an interval of positive length. It tends to zero as \(r\) decreases to zero, consistent with the support boundary; its total integral is one by the ratio-density theorem.

Common Mistake: Reversing the Jacobian

A frequent error is to use \(1/y\) in the ratio-density integral. The Jacobian factor depends on which transformation is being used. With coordinates \((r,y)=(x/y,y)\), the inverse map is \(x=ry,\ y=y\), whose Jacobian determinant has absolute value \(y\), not \(1/y\). The reciprocal factor would belong to the forward determinant for this same transformation, and the change-of-variables formula for a density uses the determinant of the inverse map.

Another error is to report the support as all positive values without checking the supports of \(X\) and \(Y\). For example, the ratio of a variable supported on \([1,2]\) to one supported on \([1,3]\) cannot be below \(1/3\) or above \(2\). Restricting the integral to the allowable \(y\)-values is what makes both the density and its support correct.

Key takeaway: For independent positive continuous variables, transform \((X,Y)\) to \((X/Y,Y)\), multiply the joint density by the inverse-map Jacobian \(y\), and integrate over those \(y\)-values for which both \(y\) and \(ry\) lie in their respective supports.

Check Your Understanding

Use the transformation and support ideas to answer the following.

  1. For independent positive continuous \(X\) and \(Y\), what inverse transformation gives the ratio-density formula, and what is its absolute Jacobian determinant?
  2. If \(X\) is supported on \([2,5]\) and \(Y\) on \([1,4]\), what is the support of \(X/Y\)?
  3. For independent \(X\sim\operatorname{Exp}(1)\) and \(Y\sim\operatorname{Exp}(1)\), set up the integral for \(f_{X/Y}(r)\) and evaluate it.
  4. For independent \(X\sim\operatorname{Uniform}(1,3)\) and \(Y\sim\operatorname{Uniform}(2,4)\), find the support of \(X/Y\).
  5. Why does the ratio-density integral include a factor of \(y\), rather than \(1/y\)?