Why Many-To-One Calculations Need an Audit
A transformation can send several different input values to the same output. A density calculation must account for every such inverse branch, include the correct change-of-variables factor, and restrict the result to outputs that the input can actually produce. A calculation can look plausible while failing one of these checks.
Two additional issues deserve care. First, an unbounded density near a point need not assign positive probability to that point. Second, a transformed variable can have an atom if a set of inputs with positive probability is mapped to one value. The worked examples below show how to distinguish these situations.
A Change-of-Variables Rule and Its Checks
Here is a precise version of the rule. Suppose the region where \(X\) can lie, apart from a set having probability zero, is a union of countably many disjoint open intervals \(I_j\). Assume \(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\) be the inverse on that branch. Then a density of \(Y=g(X)\) is
The indicator \(\mathbf{1}_{J_j}(y)\) ensures that a branch contributes only on its actual output range. The absolute value is essential: a decreasing branch has a negative derivative, but a density contribution must be nonnegative.
The rule is applied branch by branch, not by assuming that \(g\) has one global inverse. Its hypotheses also make clear what to check: exceptional inputs must have probability zero, the inverse must be valid on the stated output range, and the derivative factor must be evaluated at that inverse input.
Worked Example: Squaring a Uniform Variable
Let \(X\sim\operatorname{Uniform}(-1,1)\), so \(f_X(x)=1/2\) for \(-1<x<1\), and set \(Y=X^2\). Find the density and check whether \(Y\) has an atom at zero.
For \(0<y<1\), the equation \(x^2=y\) has two inverse branches: \(x_1(y)=\sqrt y\) and \(x_2(y)=-\sqrt y\). Both lie in the input interval. Since \(|g'(x)|=|2x|\), each branch contributes $$ \frac{1/2}{2\sqrt y}=\frac{1}{4\sqrt y}. $$ Adding both contributions gives $$ f_Y(y)=\frac{1}{2\sqrt y},\qquad 0<y<1. $$ There is no output below zero or above one. Squaring maps \((-1,1)\setminus\{0\}\) into \((0,1)\); \(x=0\) maps to \(0\), and \(P(X=0)=0\).
The density integrates to one: $$ \int_0^1 \frac{1}{2\sqrt y}\,dy =\left[\sqrt y\right]_0^1=1. $$ Also, \(P(Y=0)=P(X=0)=0\). In fact, for \(0\le t\le1\), \(P(Y\le t)=P(-\sqrt t\le X\le\sqrt t)=\sqrt t\). Its derivative on \(0<t<1\) agrees with the density. The density grows without bound as \(y\) approaches zero, but that does not create a point mass there.
Support and Jacobians in Product Calculations
For products, the main support error is often choosing integration limits from the output value alone rather than from all input constraints. A transformed variable may have a simple-looking range, while the permitted values of the integration variable still depend on the output.
Worked Example: Product of Two Uniform Variables
Let \(X\) and \(Y\) be independent \(\operatorname{Uniform}(0,1)\) variables, and define \(Z=XY\). Derive its density using the transformation \((x,y)\mapsto(x,z)=(x,xy)\).
The inverse transformation is \(y=z/x\), which requires \(x>0\). The absolute Jacobian determinant of the inverse map is $$ \left|\frac{\partial(x,y)}{\partial(x,z)}\right| = \left|\begin{vmatrix}1&0\\-z/x^2&1/x\end{vmatrix}\right| =\frac1x. $$ The original support requires \(0<x<1\) and \(0<y<1\). After substituting \(y=z/x\), these conditions become \(0<z<x<1\). Thus, for \(0<z<1\), $$ f_Z(z)=\int_z^1 1\cdot 1\cdot\frac1x\,dx =\int_z^1\frac{dx}{x} =-\ln z. $$ Outside \(0<z<1\), the density is zero. The lower integration limit is \(z\), not zero: values \(x\le z\) would require \(y=z/x\ge1\), outside the input support.
A probability check gives $$ \int_0^1-\ln z\,dz =\left[-z\ln z+z\right]_0^1=1, $$ where \(\lim_{z\downarrow0}z\ln z=0\). An independent check uses the CDF. For \(0<t<1\), integrate over \(x\): when \(0<x\le t\), every \(y\in(0,1)\) has \(xy\le t\); when \(t<x<1\), the condition is \(y\le t/x\). Therefore $$ P(Z\le t)=t+\int_t^1\frac{t}{x}\,dx=t(1-\ln t), $$ whose derivative is \(-\ln t\). Since \(X,Y>0\) with probability one, \(Z>0\) with probability one; in particular, there is no atom at zero.
Ratios: The Denominator and the Support Both Matter
For a ratio, it is not enough to transform the numerator while leaving the denominator out of the Jacobian. The transformation must include both variables, and the inverse must be checked on the full support. The following example keeps the denominator positive, making the range especially clear.
Worked Example: Ratio of Independent Exponential Variables
Let \(X\) and \(Y\) be independent with density \(e^{-x}\) for \(x>0\), and let \(R=X/Y\). Use \(r=x/y\) and \(v=y\), so the inverse transformation is \(x=rv,\ y=v\). Its Jacobian determinant is $$ \left|\frac{\partial(x,y)}{\partial(r,v)}\right| = \left|\begin{vmatrix}v&r\\0&1\end{vmatrix}\right|=v. $$ The input conditions \(x>0,y>0\) become \(r>0,v>0\). Independence gives the joint density \(e^{-x-y}\), and hence $$ f_{R,V}(r,v)=v e^{-(1+r)v},\qquad r>0,\ v>0. $$ Integrating out \(v\), $$ f_R(r)=\int_0^\infty v e^{-(1+r)v}\,dv =\frac{1}{(1+r)^2},\qquad r>0. $$ For the integral, put \(a=1+r>0\) and \(u=av\); then it equals \(a^{-2}\int_0^\infty u e^{-u}\,du=a^{-2}\). Integration by parts gives \(\int_0^\infty u e^{-u}\,du=1\).
The density has total integral \(\int_0^\infty(1+r)^{-2}\,dr=1\), and \(R\) is positive with probability one. Although the original denominator can be arbitrarily close to zero, \(P(Y=0)=0\); there is no undefined ratio with positive probability and no atom at any particular ratio value.
Atoms, Singularities, and Diagnostic Checks
An atom is probability concentrated at a single value. A density that becomes arbitrarily large near a value is a different phenomenon: its integral over a shrinking interval may still tend to zero. The following fact makes the distinction precise when the input has a density.
Proof. The event \(\{g(X)=c\}\) is the event \(\{X\in\{x:g(x)=c\}\}\). Since \(X\) has density \(f_X\), the probability of this event is the integral of \(f_X\) over that preimage. This equals the atom mass at \(c\), proving the formula and its consequences. \(\square\)
For squaring, the preimage of zero is the singleton \(\{0\}\), so it has probability zero under a continuous input density. Yet the density of the square is unbounded near zero. Thus a singularity in the density formula is not itself an atom. Conversely, if \(g\) is constant on an interval that has positive input probability, all that probability is sent to one value, producing an atom.
A Practical Error-Checking Routine
Before accepting a many-to-one density calculation, check its branches, Jacobians, and support in that order. Then verify that the resulting law has the claimed total probability and any claimed point masses.
For a fixed output value, solve the transformation equation and retain all solutions that lie in the input support.
For each valid branch, divide by the absolute derivative; for a multivariate transformation, use the absolute determinant of the inverse Jacobian.
Substitute the inverse into every input constraint before choosing limits or declaring the output support.
Integrate the density, check whether excluded boundary values can carry mass, and use a CDF or direct probability calculation when it provides an independent check.
Common errors include keeping only the positive square-root branch, using \(1/g'(x)\) instead of \(1/|g'(x)|\), integrating over input values that violate the transformed support, and interpreting a density that diverges as a point mass. Each error can be exposed by asking what input values actually produce a given output and whether the final probabilities add up correctly.
Check Your Understanding
For each question, identify the relevant branches, support restriction, or probability check before writing a formula.
- If \(X\) has a density on \((-2,2)\) and \(Y=X^2\), how many inverse branches contribute for \(0<y<4\)? What happens at \(y=0\)?
- Why is an absolute value required in the one-dimensional change-of-variables factor, including when a branch is decreasing?
- For independent \(\operatorname{Uniform}(0,1)\) variables with \(Z=XY\), explain why the integration limits for the product density are \(z<x<1\).
- In the exponential ratio example, what support restrictions follow from \(x>0\) and \(y>0\), and what Jacobian factor appears in the inverse transformation?
- State the condition, in terms of the preimage of \(c\), for \(g(X)\) to have an atom at \(c\) when \(X\) has a density.