Tutorials › Statistical Theory I - Probability and Distribution Theory › Products and Ratios of Dependent Variables

Many-to-One Transformations · Tutorial 441 of 994

Products and Ratios of Dependent Variables

Learn to calculate product and ratio distributions from a joint density while keeping dependence explicit in the transformation and integration.

Intermediate 10 min read

What You'll Learn

  • Derive product and ratio density formulas for a jointly continuous pair without assuming independence.
  • Track the absolute Jacobian factors for each transformation.
  • Use conditional densities to obtain the same product law by mixing over one variable.
  • Determine integration regions directly from the stated joint density.
  • Compare product distributions under different dependence structures.
  • Identify when replacing a joint density by a product of marginals is invalid.

Why Dependence Matters for Products and Ratios

Knowing the marginal distributions of \(X\) and \(Y\) does not in general determine the distribution of \(XY\) or \(X/Y\). The joint distribution matters: it describes which values of \(X\) tend to occur with which values of \(Y\). For a pair with a joint density, product and ratio laws can be found by transforming that density and integrating over the variable that is not of interest.

The key is to preserve the joint density throughout the calculation. A formula involving \(f_X(x)f_Y(y)\) is appropriate only under independence. Below, \(f_{X,Y}\) denotes the joint density of \((X,Y)\), and \(f_X\) and \(f_Y\) denote its marginal densities.

Definition: Suppose \((X,Y)\) has joint density \(f_{X,Y}\). The product \(U=XY\) and ratio \(R=X/Y\) are transformations of this pair. Their distributions are determined by integrating \(f_{X,Y}\) over the sets of pairs that produce each value of \(U\) or \(R\). If \(P(Y=0)=0\), the ratio is defined almost surely; for a pair with a joint density, this condition holds.

Density Formulas From the Joint Density

For the product, use the coordinates \((x,u)\), where \(u=xy\). Away from \(x=0\), the inverse transformation is \(y=u/x\). Its Jacobian factor is \(1/|x|\). For the ratio, use \((r,y)\), where \(r=x/y\); the inverse is \(x=ry\), with Jacobian factor \(|y|\). The absolute values are essential because a density transformation uses the absolute determinant.

Theorem: If \((X,Y)\) has joint density \(f_{X,Y}\), then versions of the product and ratio densities are $$ f_U(u)=\int_{x\ne 0}\frac{1}{|x|}f_{X,Y}\left(x,\frac{u}{x}\right)\,dx $$ and, when \(P(Y=0)=0\), $$ f_R(r)=\int_{y\ne 0}|y|f_{X,Y}(ry,y)\,dy. $$ The integrals are understood as nonnegative Lebesgue integrals and may be infinite on a set of Lebesgue measure zero. They define densities almost everywhere.

These formulas do not require independence. The joint density itself determines which points contribute: wherever the transformed point lies outside the support of \(f_{X,Y}\), its contribution is zero.

1
Choose the target and a retained coordinate.
For \(U=XY\), retain \(x\) and replace \(y\) by \(u\). For \(R=X/Y\), retain \(y\) and replace \(x\) by \(r\).
2
Invert and compute the Jacobian.
Use \(y=u/x\) with factor \(1/|x|\) for the product, or \(x=ry\) with factor \(|y|\) for the ratio.
3
Integrate only where the joint density is positive.
Translate the support conditions into bounds for the retained coordinate before evaluating the integral.

Here is a justification that also makes the support restriction precise. Since a pair with a joint density assigns probability zero to the lines \(x=0\) and \(y=0\), removing those lines does not change the probabilities being calculated. For any nonnegative measurable function \(h\), the change-of-variables theorem on the two regions \(x>0\) and \(x<0\) gives $$ E[h(XY)]=\int_{\mathbb R}\int_{\mathbb R}h(xy)f_{X,Y}(x,y)\,dy\,dx =\int_{\mathbb R}\int_{\mathbb R}h(u)f_{X,Y}\left(x,\frac{u}{x}\right)\frac{1}{|x|}\,du\,dx. $$ Tonelli's theorem permits reversing these nonnegative integrals. Therefore $$ E[h(U)]=\int_{\mathbb R}h(u)\left\{\int_{x\ne0}\frac{1}{|x|}f_{X,Y}\left(x,\frac{u}{x}\right)\,dx\right\}du, $$ which establishes the product density. For the ratio, change variables from \((x,y)\) to \((r,y)\) separately on \(y>0\) and \(y<0\). The absolute determinant of the inverse map \((r,y)\mapsto(ry,y)\) is \(|y|\). Hence $$ E[h(X/Y)]=\int_{\mathbb R}\int_{\mathbb R}h(r)|y|f_{X,Y}(ry,y)\,dr\,dy =\int_{\mathbb R}h(r)\left\{\int_{y\ne0}|y|f_{X,Y}(ry,y)\,dy\right\}dr. $$ Taking \(h\) to be indicator functions of measurable sets identifies the distributions, and taking \(h=1\) shows that each displayed density integrates to one. \(\square\)

The Conditional-Density Route

For the product, it is also possible to condition on \(X\). Let \(f_X(x)=\int f_{X,Y}(x,y)\,dy\). For \(x\) with \(f_X(x)>0\), a conditional density of \(Y\) given \(X=x\) is \(f_{Y\mid X}(y\mid x)=f_{X,Y}(x,y)/f_X(x)\). Conditional on \(X=x\ne0\), the product \(U=xY\) is a one-to-one scaling of \(Y\), so its conditional density is $$ f_{U\mid X}(u\mid x)=\frac{1}{|x|}f_{Y\mid X}\left(\frac{u}{x}\,\middle|\,x\right). $$ Averaging this conditional density over \(X\) gives $$ f_U(u)=\int_{x\ne0}f_{U\mid X}(u\mid x)f_X(x)\,dx =\int_{x\ne0}\frac{1}{|x|}f_{X,Y}\left(x,\frac{u}{x}\right)\,dx. $$ The identity holds almost everywhere; values assigned to conditional densities on \(x\)-values with \(f_X(x)=0\) do not affect the integral. Thus conditioning and joint-density transformation agree, but conditioning does not remove the dependence: it appears in \(f_{Y\mid X}\).

Worked Example: Product on a Triangular Support

Suppose \(f_{X,Y}(x,y)=2\) for \(0<y<x<1\), and is zero elsewhere. The triangle has area \(1/2\), so the constant \(2\) normalizes the density. Find the density of \(U=XY\).

At a fixed \(u>0\), the transformed point has \(y=u/x\). It must satisfy \(0<u/x<x<1\). Since \(x>0\), the inequality \(u/x<x\) is equivalent to \(x^2>u\), so \(\sqrt{u}<x<1\). Such \(x\) exist only for \(0<u<1\). The product formula therefore gives $$ f_U(u)=\int_{\sqrt{u}}^1\frac{2}{x}\,dx =2\bigl[\log x\bigr]_{\sqrt{u}}^1 =-\log u,\qquad 0<u<1, $$ and \(f_U(u)=0\) otherwise. As a check, $$ \int_0^1-\log u\,du=1. $$

Conditioning gives the same answer. Here \(f_X(x)=\int_0^x2\,dy=2x\) for \(0<x<1\), and \(Y\mid X=x\) is uniform on \((0,x)\). Thus \(U\mid X=x\) is uniform on \((0,x^2)\), with density \(1/x^2\) there. Mixing over \(X\), for \(0<u<1\), $$ f_U(u)=\int_{\sqrt{u}}^1\frac{1}{x^2}(2x)\,dx =\int_{\sqrt{u}}^1\frac{2}{x}\,dx=-\log u. $$ The factor \(1/x^2\) is the conditional scaling density; omitting one factor of \(1/x\) would give an incorrect result.

Worked Example: Ratio on a Triangular Support

Suppose \(f_{X,Y}(x,y)=2\) for \(0<x<y<1\), and zero elsewhere. Again, the support has area \(1/2\), so this is a normalized joint density. Find the density of \(R=X/Y\).

For a proposed ratio \(r\), the transformed point is \((x,y)=(ry,y)\). The support conditions become \(0<ry<y<1\). Since \(y>0\), these require \(0<r<1\) and \(0<y<1\). Therefore $$ f_R(r)=\int_0^1 y\cdot 2\,dy =2\left[\frac{y^2}{2}\right]_0^1=1,\qquad 0<r<1, $$ and \(f_R(r)=0\) elsewhere. The result integrates to one over \((0,1)\). Although the density of the ratio is uniform here, this conclusion follows from this particular joint density and support; it is not a general property of ratios.

Dependence Can Change the Product Law

The next example compares pairs with the same uniform marginals but different dependence. It makes clear why a product formula based only on the marginals cannot generally work.

Worked Example: Uniform Marginals With Dependence

On the unit square, take $$ f_{X,Y}(x,y)=1+\frac{1}{2}(2x-1)(2y-1),\qquad 0<x<1,\quad 0<y<1, $$ and set the density to zero elsewhere. The factor \((2x-1)(2y-1)\) lies between \(-1\) and \(1\), so the density is at least \(1/2\). Integrating over \(y\), the added term vanishes because \(\int_0^1(2y-1)\,dy=0\). Thus \(f_X(x)=1\); similarly \(f_Y(y)=1\). The marginals are both uniform.

The variables are not independent. In fact, since their means are \(1/2\), $$ E[XY]=\int_0^1\int_0^1xyf_{X,Y}(x,y)\,dy\,dx =\frac14+\frac12\left(\int_0^1x(2x-1)\,dx\right)^2 =\frac14+\frac12\left(\frac16\right)^2 =\frac14+\frac{1}{72}. $$ Hence \(\operatorname{Cov}(X,Y)=1/72\ne0\).

For \(U=XY\), a fixed \(0<u<1\) requires \(u<x<1\), with \(y=u/x\). Consequently $$ f_U(u)=\int_u^1\frac{1}{x}\left\{1+\frac12(2x-1)\left(\frac{2u}{x}-1\right)\right\}dx. $$ Put \(L=-\log u\). The contribution from the constant \(1\) is \(L\). Expanding the remaining integrand gives $$ \int_u^1\frac{(2x-1)(2u/x-1)}{x}\,dx =\int_u^1\left(\frac{4u+1}{x}-2-\frac{2u}{x^2}\right)dx =(4u+1)L-4(1-u). $$ Therefore $$ f_U(u)=L+\frac12\left\{(4u+1)L-4(1-u)\right\},\qquad 0<u<1, $$ and the density is zero otherwise. Its integral is one: \(\int_0^1 L\,du=1\), while $$ \int_0^1\{(4u+1)L-4(1-u)\}\,du =4\left(\frac14\right)+1-4\left(\frac12\right)=0. $$ If the variables were independent with these same uniform marginals, the product density would instead be \(-\log u\). The additional term above is the effect of their dependence.

Common Pitfall and Practical Checks

A common error is to use the independent-variable formula \(f_U(u)=\int f_X(x)f_Y(u/x)|x|^{-1}\,dx\) or its ratio counterpart when only the marginal densities are known. Those formulas replace \(f_{X,Y}\) by \(f_Xf_Y\), which is valid only when \(X\) and \(Y\) are independent. For dependent variables, use the specified joint density, or use a conditional density that retains the dependence.

A second error is to integrate over an unrestricted range without checking the support. In the triangular product example, the integral begins at \(\sqrt{u}\), not at zero; in the ratio example, only \(0<r<1\) is possible. A sound calculation should identify the transformed support, include the absolute Jacobian factor, and check that the resulting density is nonnegative and integrates to one. These checks can reveal missing branches, incorrect bounds, or a lost Jacobian.

Key takeaway: For dependent variables, transform the joint density itself. The product formula contributes \(1/|x|\), the ratio formula contributes \(|y|\), and the support of the joint density determines the integration bounds.

Check Your Understanding

Work through each question by keeping the joint density and support explicit.

  1. For a joint density supported on \(0<x<1\), \(0<y<x\), what inequalities determine the range of \(x\) when calculating \(f_{XY}(u)\) for \(u>0\)?
  2. In the ratio transformation \(r=x/y\), which coordinate is retained in the derivation above, and what is the absolute Jacobian factor?
  3. Why is it invalid to calculate a dependent product density using \(f_X(x)f_Y(y)\) in place of \(f_{X,Y}(x,y)\)?
  4. Suppose \(Y\mid X=x\) has a density. What scaling factor appears in the conditional density of \(XY\mid X=x\), for \(x\ne0\)?
  5. For the triangular density \(f_{X,Y}(x,y)=2\) on \(0<x<y<1\), why must the ratio \(X/Y\) lie between zero and one?