Tutorials › Statistical Theory I - Probability and Distribution Theory › Signed Products and Multiple Inverse Branches

Many-to-One Transformations · Tutorial 435 of 994

Signed Products and Multiple Inverse Branches

Learn how the inverse branches of multiplication determine the product density, including when the inputs can have either sign.

Intermediate 10 min read

What You'll Learn

  • Derive the product-density formula for independent variables with densities.
  • Separate the contributions from positive and negative factor pairs.
  • Use symmetry to simplify the density and determine the product’s sign probabilities.
  • Calculate product densities for uniform, triangular, and normal inputs.
  • Recognize why a density may diverge at zero yet remain integrable.

Why Signed Products Need Multiple Branches

For a sum, a fixed value \(z=x+y\) can be produced by every real \(x\), with the corresponding \(y=z-x\). For a product \(z=xy\), each nonzero \(x\) instead determines \(y=z/x\). When \(x\) can be positive or negative, those choices represent different kinds of factor pairs: a positive product comes from two factors of the same sign, while a negative product comes from factors of opposite signs. A product-density calculation must include both possibilities.

The relevant change of variables is the many-to-one transformation \((x,y)\mapsto xy\). The product-density formula below makes its inverse branches explicit. It applies when the two inputs are independent and absolutely continuous, and it does not require either input to be positive or symmetric.

The Product-Density Formula

Theorem: Let \(X\) and \(Y\) be independent random variables with densities \(f_X\) and \(f_Y\), and let \(Z=XY\). Then \(Z\) has a density, which can be written for almost every \(z\) as $$ f_Z(z)=\int_{-\infty}^{\infty} f_X(x)f_Y(z/x)\frac{1}{|x|}\,dx, $$ where the integrand at \(x=0\) can be assigned any value. Equivalently, $$ f_Z(z)=\int_0^\infty \left[ f_X(x)f_Y(z/x)+f_X(-x)f_Y(-z/x) \right]\frac{dx}{x}. $$

The factor \(1/|x|\) is the Jacobian factor from scaling \(Y\) by \(x\). The second display separates the contributions with \(X>0\) from those with \(X<0\). For \(z>0\), the first term represents positive-positive factor pairs and the second negative-negative pairs. For \(z<0\), they represent positive-negative and negative-positive pairs, respectively.

1
Condition on \(X\).
Independence gives the conditional distribution of \(XY\) from the distribution of \(Y\) once \(X=x\) is fixed.
2
Transform \(Y\).
For \(x\ne0\), the map \(y\mapsto xy\) is one-to-one and scales lengths by \(|x|\), producing the factor \(1/|x|\).
3
Integrate over both signs of \(X\).
Because \(X\) has a density, \(P(X=0)=0\); the positive and negative values of \(X\) together give the full density.

Proof of the Formula

Let \(A\) be any Borel subset of the real line. Independence and the existence of the two densities give $$ P(XY\in A)=\int_{-\infty}^{\infty} f_X(x) \left(\int_{-\infty}^{\infty}\mathbf{1}_A(xy)f_Y(y)\,dy\right)dx. $$ The inner integrand is nonnegative, so Tonelli’s theorem permits the integrations to be reordered when needed. Since \(X\) has a density, \(P(X=0)=0\), and the value \(x=0\) can be left out of the integral. For each fixed \(x\ne0\), set \(z=xy\), so \(y=z/x\) and \(dy=dz/|x|\). Thus $$ \int_{-\infty}^{\infty}\mathbf{1}_A(xy)f_Y(y)\,dy = \int_{-\infty}^{\infty}\mathbf{1}_A(z)f_Y(z/x)\frac{dz}{|x|}. $$ Substitution into the expression for \(P(XY\in A)\), followed by Tonelli’s theorem for the nonnegative integrand, yields $$ P(XY\in A)= \int_A\left[ \int_{x\ne0}f_X(x)f_Y(z/x)\frac{dx}{|x|} \right]dz. $$ This identifies a density for \(Z\), defined almost everywhere. It integrates to one because its integral over the real line is \(P(XY\in\mathbb{R})=1\). Finally, splitting the inner integral into \(x>0\) and \(x<0\), and substituting \(x=-u\) in the negative part, gives the stated two-term formula. \(\square\)

Symmetric Inputs

A density is symmetric about zero if \(f(-x)=f(x)\) for almost every \(x\). When both input densities are symmetric, the two branch contributions in the formula are equal.

Consequence: If \(X\) and \(Y\) are independent, have densities symmetric about zero, and have no mass at zero, then a density of \(Z=XY\) is $$ f_Z(z)=2\int_0^\infty f_X(x)f_Y(z/x)\frac{dx}{x}. $$ It is symmetric about zero. Also, \(P(Z>0)=P(Z<0)=1/2\).

To verify symmetry of the density, apply the simplified formula to \(z\) and \(-z\). Since \(f_Y\) is symmetric, \(f_Y(-z/x)=f_Y(z/x)\), so \(f_Z(-z)=f_Z(z)\) wherever the integrals define the densities. For the sign probabilities, a continuous symmetric distribution with no mass at zero assigns probability \(1/2\) to each sign. By independence, the two signs agree with probability $$ P(X>0,Y>0)+P(X<0,Y<0) =\frac14+\frac14=\frac12. $$ They disagree with probability \(1/2\) as well. These statements concern the sign; the product’s magnitude still depends on the full input distributions.

Worked Example: Two Uniform Inputs on the Symmetric Interval

Let \(X\) and \(Y\) be independent, each uniform on \((-1,1)\). Their common density is \(f(x)=1/2\) for \(|x|<1\) and zero otherwise. Find the density of \(Z=XY\).

By symmetry, for \(z\ne0\), $$ f_Z(z)=2\int_0^\infty f(x)f(z/x)\frac{dx}{x}. $$ Both density factors are nonzero only when \(0<x<1\) and \(|z|/x<1\). The latter condition is \(x>|z|\). Therefore the integral is nonzero only for \(0<|z|<1\), and $$ f_Z(z)=2\int_{|z|}^1 \frac12\cdot\frac12\frac{dx}{x} =\frac12\int_{|z|}^1\frac{dx}{x} =\frac12\log\left(\frac{1}{|z|}\right),\qquad 0<|z|<1. $$ For \(|z|>1\), the density is zero. The formula diverges as \(z\) approaches zero, so the density may be assigned \(+\infty\) at zero without changing the distribution. Its integral confirms the normalization: $$ \int_{-1}^1 f_Z(z)\,dz =2\int_0^1\frac12\log(1/z)\,dz =\int_0^1\log(1/z)\,dz=1. $$ For the last equality, \(\int_0^1-\log z\,dz=1\), obtained from the antiderivative \(-z\log z+z\) and the limit \(z\log z\to0\) as \(z\downarrow0\).

Worked Example: Symmetric Triangular Inputs

Let \(X\) and \(Y\) be independent with the triangular density $$ f(x)= \begin{cases} 1-|x|,& |x|<1,\\ 0,& \text{otherwise}. \end{cases} $$ This is a density because \(2\int_0^1(1-x)\,dx=1\). Find the product density for \(0<|z|<1\).

Write \(t=|z|\). The input density factors are nonzero only for \(t<x<1\) in the positive-\(x\) integral. Using symmetry, $$ f_Z(z)=2\int_t^1(1-x)\left(1-\frac{t}{x}\right)\frac{dx}{x}. $$ Expand the integrand: $$ (1-x)\left(1-\frac{t}{x}\right)\frac1x =\frac1x-1-\frac{t}{x^2}+\frac{t}{x}. $$ Integrating each term from \(t\) to \(1\) gives $$ \int_t^1\left(\frac1x-1-\frac{t}{x^2}+\frac{t}{x}\right)dx =\log(1/t)-(1-t)-(1-t)+t\log(1/t). $$ Consequently, $$ f_Z(z)=2\left[(1+t)\log(1/t)-2(1-t)\right],\qquad t=|z|,\quad 0<|z|<1. $$ The product density is zero for \(|z|>1\). As in the uniform example, the density grows without bound near zero; this is compatible with a valid density because the singularity is integrable. In particular, the derived density integrates to one: its integral over both signs is $$ 4\int_0^1\left[(1+t)\log(1/t)-2(1-t)\right]dt =4\left(1+\frac14-1\right)=1. $$ Here \(\int_0^1\log(1/t)\,dt=1\), \(\int_0^1t\log(1/t)\,dt=1/4\), and \(\int_0^1 2(1-t)\,dt=1\).

Worked Example: Product of Two Standard Normal Variables

Let \(X\) and \(Y\) be independent \(N(0,1)\) variables, with density \(\phi(x)=(2\pi)^{-1/2}e^{-x^2/2}\). For \(z\ne0\), the general formula gives $$ f_Z(z)=\frac{1}{2\pi}\int_{-\infty}^{\infty} \exp\left[-\frac12\left(x^2+\frac{z^2}{x^2}\right)\right]\frac{dx}{|x|} =\frac1\pi\int_0^\infty \exp\left[-\frac12\left(x^2+\frac{z^2}{x^2}\right)\right]\frac{dx}{x}. $$ The second equality uses the fact that the integrand has the same value at \(x\) and \(-x\). Define the modified Bessel function \(K_0\), for \(a>0\), by its integral representation $$ K_0(a)=\int_0^\infty e^{-a\cosh u}\,du. $$ Set \(t=|z|\) and substitute \(x=\sqrt{t}\,e^{u/2}\) in the positive-\(x\) integral. Then \(dx/x=du/2\), and $$ \frac12\left(x^2+\frac{z^2}{x^2}\right) =\frac{t}{2}(e^u+e^{-u})=t\cosh u. $$ As \(x\) runs from zero to infinity, \(u\) runs from \(-\infty\) to infinity. Hence $$ \int_0^\infty \exp\left[-\frac12\left(x^2+\frac{z^2}{x^2}\right)\right]\frac{dx}{x} =\frac12\int_{-\infty}^{\infty}e^{-t\cosh u}\,du =\int_0^\infty e^{-t\cosh u}\,du=K_0(t). $$ Therefore \(f_Z(z)=K_0(|z|)/\pi\) for \(z\ne0\). This expression is symmetric in \(z\), as expected for symmetric inputs; the product-density theorem ensures it is normalized even though its value grows near zero.

Common Pitfall: Keeping Only One Sign Branch

A tempting calculation is to integrate only over \(x>0\), using \(f_X(x)f_Y(z/x)/x\), and call the result the product density. That counts only outcomes with \(X>0\). For \(z>0\), it misses negative-negative pairs; for \(z<0\), it misses negative-positive pairs. The correction is to integrate over all nonzero \(x\), or to use both terms in the positive-half-line formula. Under symmetry, those two terms are equal, which explains the factor of two in the simplified formula.

A second caution is not to assume that a density must be finite at every point. Products can have integrable singularities at zero, as the uniform and normal examples illustrate. A density is defined up to changes on sets of Lebesgue measure zero; the relevant requirements are nonnegativity and total integral one, not a finite value at every point.

Key takeaway: For a signed product, each nonzero value of one factor determines the other factor through \(y=z/x\), and both signs of \(x\) must be included. The Jacobian is \(1/|x|\); under symmetric input laws, the two branches contribute equally.

Check Your Understanding

Use the signed product formula and identify the relevant inverse branches.

  1. For \(z<0\), which two sign combinations of \(X\) and \(Y\) contribute to the product density?
  2. Why does the change of variables \(z=xy\), with \(x\) fixed and nonzero, produce a factor \(1/|x|\)?
  3. If \(X\) and \(Y\) are independent, continuous, and symmetric about zero, what is \(P(XY>0)\)? Explain using the signs of the two variables.
  4. For independent uniform inputs on \((-1,1)\), why is the product density zero when \(|z|>1\)?
  5. Why can an unbounded density near zero still describe a valid probability distribution?