From a Joint Density to a New Random Variable
A sum, ratio, or product is a function of a pair of random variables. Its distribution is therefore determined by the joint law of that pair. The main challenge is often not the calculus itself: it is identifying which original values can produce a proposed transformed value. That support calculation determines the correct integration limits.
Assume throughout that \((X,Y)\) has a joint density \(f_{X,Y}(x,y)\) with respect to area, and consider \(S=X+Y\), \(R=X/Y\), and \(P=XY\). For the ratio and product, the line \(y=0\) has probability zero under this assumption, so the transformations can be defined off that line. Independence is not required for the general formulas below. When \(X\) and \(Y\) are independent, the joint density factors as \(f_{X,Y}(x,y)=f_X(x)f_Y(y)\).
Sum: Convolution and Its Support
To find the density of \(S=X+Y\), use the transformation \((x,y)\mapsto(s,y)=(x+y,y)\). Its inverse is \(x=s-y\), \(y=y\), and the absolute Jacobian determinant of the inverse is \(1\). Integrating out the coordinate \(y\) gives the sum density.
The integrand is zero wherever \((s-y,y)\) lies outside the support of \((X,Y)\), so this expression automatically imposes the support constraints. If \(X\) and \(Y\) are independent, the formula becomes the convolution
To justify the formula, the change of variables \((x,y)\mapsto(s,y)\) gives the joint density \(f_{S,Y}(s,y)=f_{X,Y}(s-y,y)\), since its inverse Jacobian has absolute value \(1\). Integrating this joint density over \(y\) gives the marginal density of \(S\). The integrands are nonnegative, so the integration and marginalization are valid by Tonelli’s theorem. The result is a density up to changes on sets of measure zero. \(\square\>
Worked Example: The Sum of Two Uniform Variables
Let \(X\) and \(Y\) be independent Uniform\((0,1)\) random variables. Find the density of \(S=X+Y\), including its support.
The joint density is \(1\) when \(0<x<1\) and \(0<y<1\), and zero elsewhere. For a fixed \(s\), substitute \(x=s-y\). Both \(0<y<1\) and \(0<s-y<1\) must hold. The second pair of inequalities is equivalent to \(s-1<y<s\). Thus the allowed values of \(y\) lie in the intersection of \((0,1)\) and \((s-1,s)\).
If \(0<s<1\), that intersection is \((0,s)\), whose length is \(s\). If \(1\leq s<2\), it is \((s-1,1)\), whose length is \(2-s\). Outside \(0<s<2\), the intersection is empty. Therefore
The density integrates to \(1\): \(\int_0^1 s\,ds+\int_1^2(2-s)\,ds=\tfrac12+\tfrac12=1\). The triangular shape comes directly from the changing length of the overlap, not from an assumption that the sum is uniform.
Ratio and Product: Transform First, Then Restrict
For a ratio, retain \(Y\) as the second transformed coordinate and set \(R=X/Y\). The inverse transformation is \(x=ry,\ y=y\). Its Jacobian determinant is \(y\), so the absolute Jacobian is \(|y|\). For a product, set \(P=XY\) and retain \(Y\). The inverse is \(x=p/y,\ y=y\), with absolute Jacobian \(1/|y|\). These factors are different; each comes from its own inverse map.
Each integral is restricted to values of \(y\) for which the corresponding original pair \((ry,y)\) or \((p/y,y)\) is in the support. For the ratio, the transformed joint density of \((R,Y)\) is \(|y|f_{X,Y}(ry,y)\); integrating out \(y\) gives \(f_R\). For the product, the transformed joint density of \((P,Y)\) is \(f_{X,Y}(p/y,y)/|y|\); integrating out \(y\) gives \(f_P\). In both cases the change of variables is one-to-one on \(y\ne0\), and the nonnegative integrands permit marginalization by Tonelli’s theorem. As with any density formula, values at individual points can be changed without changing the distribution. \(\square\)
When \(X\) and \(Y\) are independent, replace \(f_{X,Y}(x,y)\) by \(f_X(x)f_Y(y)\). The formulas still require the support restrictions: an integral over all nonzero \(y\) is harmless only if the densities themselves make the integrand zero outside the feasible region.
Worked Example: The Ratio of Two Uniform Variables
Let \(X\) and \(Y\) be independent Uniform\((0,1)\) random variables. Find the density of \(R=X/Y\).
Because \(X\) and \(Y\) are positive, \(R>0\). For a fixed \(r>0\), the ratio formula has integrand \(y\) when both \(0<y<1\) and \(0<ry<1\) hold. These conditions give \(0<y<\min(1,1/r)\). Therefore
Equivalently,
The two pieces integrate to \(\int_0^1\tfrac12\,dr=\tfrac12\) and \(\int_1^\infty \tfrac{1}{2r^2}\,dr=\tfrac12\), so the density has total mass \(1\). The unbounded range of the ratio is possible because \(Y\) can be arbitrarily close to zero.
Worked Example: The Product of Two Uniform Variables
Let \(X\) and \(Y\) again be independent Uniform\((0,1)\) random variables. Find the density of \(P=XY\).
Both variables are positive and less than \(1\), so \(0<P<1\). For fixed \(0<p<1\), the product formula has integrand \(1/y\). The original constraints require \(0<y<1\) and \(0<p/y<1\). Since \(y>0\), the latter says \(y>p\). Thus \(p<y<1\), and
The density is zero outside this interval. Its total mass is \(1\), since
At the lower endpoint the expression \(p\log p\) tends to \(0\) as \(p\) decreases to \(0\). The density grows without bound near zero, but its integral remains finite; an unbounded density is not by itself a problem.
Support Checks and a Common Pitfall
A useful way to organize a transformation problem is to solve the inverse map first, write the original support inequalities in the new coordinates, and only then integrate. This prevents the most common error: using the correct Jacobian but the wrong range of integration.
For a sum, use \((s,y)=(x+y,y)\); for a ratio, use \((r,y)=(x/y,y)\); for a product, use \((p,y)=(xy,y)\).
Use the absolute determinant of the inverse derivative: \(1\) for the sum, \(|y|\) for the ratio, and \(1/|y|\) for the product.
Substitute the inverse map into the original support and find the values of the retained coordinate that satisfy all constraints.
Integrate over precisely those feasible values. Check that the resulting density is nonnegative and has total integral \(1\).
For example, a tempting but incorrect ratio calculation for the independent Uniform\((0,1)\) variables is to integrate \(y\) over \((0,1)\) for every \(r>0\). That ignores \(ry<1\), which requires \(y<1/r\) when \(r>1\). The resulting constant density \(1/2\) on all positive \(r\) would have infinite total mass. The correction is to intersect both original constraints, giving \(0<y<\min(1,1/r)\) and the integrable tail \(1/(2r^2)\). Likewise, omitting the Jacobian factor \(|y|\) for the ratio or \(1/|y|\) for the product changes the distribution even if the limits are correct.
Independence is another condition to handle explicitly. The product \(f_X(x)f_Y(y)\) is justified only when \(X\) and \(Y\) are independent. For dependent variables with a joint density, use \(f_{X,Y}(x,y)\) in the same transformation formulas. A formula based only on the marginal densities cannot generally determine the law of a sum, ratio, or product.
Check Your Understanding
For each question, identify the support constraints before attempting the integration.
- For independent Uniform\((0,1)\) variables, what values of \(y\) are feasible in the sum-density calculation when \(s=1.4\)?
- Why does the ratio of two positive Uniform\((0,1)\) variables have no mass on negative values?
- For the ratio transformation, what is the absolute Jacobian factor, and which inverse map produces it?
- For the product of two Uniform\((0,1)\) variables, explain why the product density integrates over \(p<y<1\).
- Which part of the sum, ratio, and product formulas changes when \(X\) and \(Y\) are dependent?