Why Multiple Inverse Branches Matter
For a one-to-one transformation \(Y=g(X)\), a value \(y\) of \(Y\) identifies one corresponding value of \(X\), namely \(g^{-1}(y)\). If \(g\) is not one-to-one, several different values of \(X\) can produce the same \(y\). Each such value contributes probability near \(y\), so the density of \(Y\) must add the contributions from all of them.
The size of a contribution also depends on how quickly \(g\) changes near the corresponding \(x\). A transformation that stretches an interval spreads its probability over a wider range of \(y\)-values, reducing density there; a transformation that compresses an interval increases density. The derivative accounts for this local change of scale, while the sum accounts for the multiple inverse branches.
Definition and Density Formula
Here is a useful version of the finite-to-one density formula. Suppose the density of \(X\) is supported on a union of finitely many disjoint open intervals \(I_1,\ldots,I_m\), up to a set having probability zero. Suppose \(g\) is continuously differentiable and strictly monotone on each \(I_j\), and \(g'(x)\ne 0\) there. Write \(J_j=g(I_j)\) and let \(h_j:J_j\to I_j\) denote the inverse on that branch. Then a density of \(Y=g(X)\) is
Thus, at a regular value \(y\), the sum has one term for every inverse \(x\) in the support of \(X\) satisfying \(g(x)=y\). Equivalently, the formula can be written as
where the sum is over the relevant inverse roots. A branch contributes only when \(y\) lies in its image. The formula specifies a density almost everywhere; its value at an individual point can be chosen arbitrarily without changing the distribution. In particular, a value where \(g'\) vanishes is not covered by the regular-value expression.
Why the Contributions Add
The proof is a change of variables on each one-to-one interval, followed by addition over the disjoint intervals. Let \(B\) be any Borel subset of the real line. The event \(g(X)\in B\) can be divided according to which interval contains \(X\). The part of the probability contributed by \(I_j\) is
On \(I_j\), \(g\) is continuously differentiable, strictly monotone, and has nonzero derivative. Its inverse is differentiable on \(J_j\), with \(h_j'(y)=1/g'(h_j(y))\). Applying the one-dimensional change-of-variables formula to this branch gives
The absolute value appears because the inverse branch may be decreasing, but probability is nonnegative and an integral over a transformed interval uses the absolute scale factor. Since the intervals are disjoint, their probabilities add. There are finitely many branches, so summing the integrals yields
This is exactly the defining integral property of a density of \(Y\), which proves the formula. Any excluded set of \(X\)-values has probability zero by assumption and therefore contributes nothing. \(\square\)
Worked Examples
Worked Example: A Tent-Shaped Transformation
Let \(X\sim\operatorname{Uniform}(0,2)\), so \(f(x)=1/2\) for \(0<x<2\). Define
The point \(x=1\) has probability zero, so its value does not affect the distribution. Both branches map onto \(0<y<1\). On the first branch, \(g(x)=y\) gives \(x=y\), with \(|g'(x)|=1\). On the second, \(g(x)=y\) gives \(x=2-y\), also with \(|g'(x)|=1\). Therefore, for \(0<y<1\),
Outside \((0,1)\), neither branch has an inverse, so the density is zero. Its total integral is \(\int_0^1 1\,dy=1\), as required. Omitting either inverse branch would give density \(1/2\) and total probability \(1/2\), revealing the error.
Worked Example: The Cosine of a Uniform Angle
Let \(X\sim\operatorname{Uniform}(0,2\pi)\), with density \(f(x)=1/(2\pi)\), and set \(Y=\cos X\). Divide the support at \(x=\pi\), where the derivative vanishes. The two open branches \((0,\pi)\) and \((\pi,2\pi)\) are strictly monotone and both map onto \((-1,1)\). For any \(-1<y<1\), put \(\alpha=\arccos(y)\), so \(0<\alpha<\pi\). The two roots are \(x_1=\alpha\) and \(x_2=2\pi-\alpha\).
Since \(g'(x)=-\sin x\), both roots have derivative magnitude \(\sqrt{1-y^2}\): indeed, \(\sin(\alpha)=\sqrt{1-y^2}\), and \(|\sin(2\pi-\alpha)|=\sin(\alpha)\). Each root contributes \(1/(2\pi\sqrt{1-y^2})\). Thus
To check the normalization, use \(y=\sin t\), for \(-\pi/2<t<\pi/2\), or the standard integral of the arcsine density:
The endpoints \(y=-1\) and \(y=1\) correspond to single \(x\)-values, each having probability zero. The density formula is asserted almost everywhere, so its endpoint values do not affect the result.
Worked Example: Two Positive Roots of \(x+1/x=y\)
Let \(X\) have the exponential density \(f(x)=e^{-x}\) for \(x>0\), and define \(Y=X+1/X\). The derivative \(g'(x)=1-1/x^2\) is nonzero on each of \((0,1)\) and \((1,\infty)\). These branches have image \((2,\infty)\). For \(y>2\), solving \(x+1/x=y\) gives
The roots are positive, and their product is \(1\), so \(0<x_-(y)<1<x_+(y)\): each belongs to a different branch. At either root,
Consequently, the contribution of a root \(x\) is \(e^{-x}x^2/|x^2-1|\). Adding both contributions gives
and \(f_Y(y)=0\) for \(y<2\). At \(y=2\), the roots merge at \(x=1\), where the derivative is zero, so the regular-value formula does not apply at that single value. This causes no probability mass there: \(P(Y=2)=P(X=1)=0\). The total integral of the displayed density is one by the proved change-of-variables result: the two branch integrals sum to \(\int_0^1 e^{-x}\,dx+\int_1^\infty e^{-x}\,dx=1\).
Common Pitfalls and a Practical Check
The most frequent mistake is to solve \(g(x)=y\), select one convenient root, and use only that root in the density. That calculation describes only the probability arriving from one branch. For the tent-shaped example, it produced \(1/2\) instead of the correct density \(1\). The correction is to list every root in the support and add every branch contribution.
- Do not drop the absolute value. A decreasing branch has a negative derivative, but its density contribution is positive: the denominator is \(|g'(x)|\).
- Do not include roots outside the support. An algebraic solution of \(g(x)=y\) contributes only if \(f(x)\) can be nonzero there.
- Check the derivative at the roots. The regular-value formula requires a nonzero derivative on each branch. A value where roots merge or the derivative vanishes needs separate treatment; the formula as stated does not evaluate it.
- Check support and total probability. The density must be zero outside the transformed support, and its integral must equal one.
The formula is useful because it reduces a many-to-one transformation to a collection of familiar one-to-one changes of variables. It also makes the geometry explicit: inverse roots identify the contributing locations, and the derivative at each root measures the local stretching or compression.
Check Your Understanding
For each question, identify the inverse branches before writing a density formula.
- Why must the finite-to-one formula add contributions from every inverse root in the support?
- For a decreasing inverse branch, why does the density formula still use a positive contribution?
- In the tent-shaped example, what incorrect density results if one of the two branches is omitted?
- For the cosine example, how many inverse roots correspond to a regular value \(y\in(-1,1)\), and what is the magnitude of the derivative at each?
- Why does the regular-value formula not apply directly at \(y=2\) for \(g(x)=x+1/x\), and why does that not imply an atom at \(Y=2\)?