Tutorials › Statistical Theory I - Probability and Distribution Theory › Common Errors in Many-To-One Density Calculations

Many-to-One Transformations · Tutorial 444 of 994

Common Errors in Many-To-One Density Calculations

Use a systematic change-of-variables check to derive and verify densities for squares, products, and ratios.

Intermediate 10 min read

What You'll Learn

  • Identify every inverse branch that contributes to a transformed density.
  • Apply the absolute Jacobian factor and track its effect on the density.
  • Determine transformed support from the full set of feasible inputs.
  • Derive square, product, and ratio densities and check their total probability.
  • Distinguish an unbounded density from a point mass at the same value.
  • Diagnose common errors by checking the probability law, not just the algebra.

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.

Definition: For a measurable transformation \(Y=g(X)\), an inverse branch at \(y\) is an input value \(x\) satisfying \(g(x)=y\). When \(g\) is differentiable and has finitely many inverse branches \(x_1(y),\ldots,x_m(y)\) at \(y\), with \(g'(x_j(y))\ne 0\), the density contribution from branch \(j\) is \(f_X(x_j(y))/|g'(x_j(y))|\). The transformed density is the sum of the contributions from all valid branches, for almost every \(y\).

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

$$ f_Y(y)=\sum_j \mathbf{1}_{J_j}(y)\, \frac{f_X(h_j(y))}{|g'(h_j(y))|} \quad\text{for almost every }y. $$

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.

Derivation: For a Borel set \(A\), discard the input set of probability zero and sum the probabilities over the disjoint intervals: $$ P(Y\in A)=\sum_j\int_{I_j}\mathbf{1}_{A}(g(x))f_X(x)\,dx. $$ On interval \(I_j\), change variables \(y=g(x)\). The one-dimensional change-of-variables theorem gives \(dx=|h_j'(y)|\,dy\), and differentiating \(g(h_j(y))=y\) gives \(|h_j'(y)|=1/|g'(h_j(y))|\). Thus $$ P(Y\in A)=\sum_j\int_{J_j}\mathbf{1}_{A}(y) \frac{f_X(h_j(y))}{|g'(h_j(y))|}\,dy. $$ Because the integrands are nonnegative, the sum and integral can be interchanged by Tonelli's theorem. The resulting integral over \(A\) identifies the displayed density. This also shows why omitting a branch or the absolute Jacobian changes the probability law.

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.

Theorem: If \(X\) has density \(f_X\), then for any measurable \(g\) and any real number \(c\), $$ P(g(X)=c)=\int_{\{x:g(x)=c\}}f_X(x)\,dx. $$ Consequently, the transformed variable \(g(X)\) has an atom at \(c\) exactly when this integral is positive. In particular, if the preimage \(\{x:g(x)=c\}\) has Lebesgue measure zero, there is no atom at \(c\).

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.

1
Find every inverse.
For a fixed output value, solve the transformation equation and retain all solutions that lie in the input support.
2
Use the absolute Jacobian.
For each valid branch, divide by the absolute derivative; for a multivariate transformation, use the absolute determinant of the inverse Jacobian.
3
Translate the support constraints.
Substitute the inverse into every input constraint before choosing limits or declaring the output support.
4
Check the resulting law.
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.

Key takeaway: A correct many-to-one density is a sum or integral over every valid inverse contribution, weighted by the absolute Jacobian and restricted to the true transformed support. Check atoms by probabilities of preimages, not by whether a density is bounded.

Check Your Understanding

For each question, identify the relevant branches, support restriction, or probability check before writing a formula.

  1. 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\)?
  2. Why is an absolute value required in the one-dimensional change-of-variables factor, including when a branch is decreasing?
  3. For independent \(\operatorname{Uniform}(0,1)\) variables with \(Z=XY\), explain why the integration limits for the product density are \(z<x<1\).
  4. In the exponential ratio example, what support restrictions follow from \(x>0\) and \(y>0\), and what Jacobian factor appears in the inverse transformation?
  5. State the condition, in terms of the preimage of \(c\), for \(g(X)\) to have an atom at \(c\) when \(X\) has a density.