Tutorials › VEE Mathematical Statistics › Checking Transformed Densities

VEE Mathematical Statistics · Functions of a Random Variable · Tutorial 260 of 880

Checking Transformed Densities

Use support, branch, Jacobian, and mass checks to find errors in transformed distributions, including cases with endpoint atoms.

Intermediate 12 min read

What You'll Learn

  • Identify the image of the original support before specifying a transformed density.
  • Count valid inverse branches separately on each part of the transformed support.
  • Apply the absolute Jacobian factor on every inverse branch.
  • Distinguish continuous density mass from atoms created by flat portions of a transformation.
  • Check that the density integrates to the probability assigned to the continuous part.
  • Diagnose common errors by comparing a proposed density with its support and total mass.

Why Transformed Densities Need to Be Checked

A formula for a transformed density can look plausible and still be wrong. A missing inverse branch can leave out probability; a missing absolute value can produce a negative expression; and an incorrect support can assign positive density where the transformed variable cannot occur. Even a correctly calculated density may integrate to less than one when the transformation creates point masses. A reliable solution therefore includes checks, not just a change-of-variables calculation.

The central checks are: identify the image of the original support, list every valid inverse branch, include its Jacobian factor, account for any atoms, and integrate the resulting density. These checks are aligned with the SOA VEE Mathematical Statistics syllabus.

Definition: Let \(X\) have density \(f_X\) on a support \(S_X\), and let \(Y=g(X)\). The image support is the set \(g(S_X)=\{g(x):x\in S_X\}\), with any probability-zero boundary distinctions handled as appropriate. An inverse branch at \(y\) is a solution \(x_j(y)\in S_X\) to \(g(x_j(y))=y\). At values where there are finitely many such solutions and \(g'(x_j(y))\ne 0\), the continuous density is $$ f_Y(y)=\sum_{x_j(y)\in S_X}\frac{f_X(x_j(y))}{|g'(x_j(y))|}. $$ The sum is over all valid inverse branches, not just one chosen inverse.

This formula applies on regions where the inverse branches are differentiable and the transformation is locally one-to-one on each branch. A derivative of zero at an isolated point can make the density unbounded nearby, but does not by itself create an atom. If \(g\) is constant on an interval with positive probability under \(X\), however, all probability on that interval becomes an atom at the constant value. In a piecewise-smooth transformation with such flat portions, the density describes the continuous part and the atoms must be reported separately.

A Practical Audit

Before accepting a proposed density, check each item below. The sequence is useful for both deriving a density and diagnosing a formula supplied in a problem.

1
Map the support.
Determine which values \(g(x)\) can take for \(x\in S_X\). Do not assume the transformed support is the same interval as the original one.
2
Find every inverse branch.
For a given \(y\), solve \(g(x)=y\) and retain only solutions that lie in the original support. The number of valid roots can change across the transformed support.
3
Apply the Jacobian on each branch.
For each valid root, multiply \(f_X(x_j(y))\) by \(1/|g'(x_j(y))|\). Add the contributions; do not cancel branches because their derivatives have different signs.
4
Check for atoms.
Find any sets of positive probability that map to one value. Include their probabilities as point masses, rather than trying to represent them with an ordinary density.
5
Check total mass.
Integrate the density over its support. It must equal the probability represented by the continuous component. Add atom probabilities, and any other component if present, to check that the full distribution has mass one.

Why the Inverse-Branch Formula Works

The Jacobian formula follows by splitting the original support into intervals on which \(g\) is one-to-one. On one such interval, let \(x(y)\) be its inverse. For a small interval of transformed values from \(y\) to \(y+dy\), the corresponding original interval has length approximately \(|dx/dy|\,dy\). Its probability is therefore approximately \(f_X(x(y))|dx/dy|\,dy\). Since \(dx/dy=1/g'(x(y))\), the density contribution from this branch is \(f_X(x(y))/|g'(x(y))|\). When several original intervals map to the same transformed values, their probabilities add.

The same reasoning verifies mass. On a single branch with transformed range \(J\), substitute \(y=g(x)\):

$$ \int_J \frac{f_X(x(y))}{|g'(x(y))|}\,dy =\int_I f_X(x)\,dx, $$

where \(I\) is the corresponding original interval. Summing over branches recovers the probability of the original support covered by those intervals. This is why a density that integrates to twice the expected mass often signals a duplicated branch, while an integral that is too small can signal a missing branch or omitted atom.

Worked Example: Squaring a Uniform Variable

Let \(X\) be uniform on \((-2,2)\), so \(f_X(x)=1/4\) there, and let \(Y=X^2\). Find and check the density of \(Y\). The method is the inverse-branch formula; the main trap is using only one square-root branch.

Step 1: Support. Since \(-2<x<2\), the square satisfies \(0\leq x^2<4\). Thus \(Y\) has support from 0 to 4 (the endpoint distinction has probability zero).

Step 2: Inverse branches. For \(0<y<4\), solving \(y=x^2\) gives \(x_1(y)=\sqrt y\) and \(x_2(y)=-\sqrt y\). Both roots lie in \((-2,2)\). The derivative of \(g(x)=x^2\) is \(g'(x)=2x\), so the absolute derivative at either root is \(2\sqrt y\).

Step 3: Add both contributions.

$$ f_Y(y) =\frac{1/4}{2\sqrt y}+\frac{1/4}{2\sqrt y} =\frac{1}{4\sqrt y},\qquad 0<y<4. $$

Outside this interval the density is zero. There is no atom at zero: \(Y=0\) only when \(X=0\), and a continuous random variable assigns probability zero to that single point.

Step 4: Check the continuous mass.

$$ \int_0^4 \frac{1}{4\sqrt y}\,dy =\frac14[2\sqrt y]_0^4 =\frac14(4)=1. $$

The density integrates to one, as it should because there are no atoms. If only one branch were included, the answer would be \(1/(8\sqrt y)\), which integrates to \(1/2\): exactly half the probability would be missing.

Support Changes Can Change the Number of Branches

A transformation need not have the same number of valid inverse branches throughout its image. The original support can exclude one root for part of the transformed range. A useful audit marks where a candidate root enters or leaves the original support, then writes the density separately on the resulting intervals.

Worked Example: A Root Leaves the Original Support

Let \(X\) be uniform on \((0,3)\), with density \(1/3\), and define \(Y=(X-1)^2\). Find the density and verify its mass. The key method is to check each algebraic root against the original support rather than counting roots from the equation alone.

Step 1: Image support. The value \(X=1\) gives \(Y=0\), while values of \(X\) near 3 give \(Y\) near 4. Thus the image support is \([0,4)\), up to probability-zero endpoint distinctions.

Step 2: Roots and their validity. Solving \(y=(x-1)^2\) gives \(x=1-\sqrt y\) and \(x=1+\sqrt y\). The positive root \(1+\sqrt y\) is in \((0,3)\) when \(0<y<4\). The negative-root branch \(1-\sqrt y\) is in \((0,3)\) only when \(0<y<1\). Therefore there are two branches below 1 and one above 1.

The derivative is \(g'(x)=2(x-1)\). At either root, \(|g'(x)|=2\sqrt y\). Consequently,

$$ f_Y(y)= \begin{cases} \dfrac{1/3}{2\sqrt y}+\dfrac{1/3}{2\sqrt y} =\dfrac{1}{3\sqrt y}, & 0<y<1,\\[6pt] \dfrac{1/3}{2\sqrt y} =\dfrac{1}{6\sqrt y}, & 1<y<4,\\[6pt] 0, & \text{otherwise}. \end{cases} $$

The value at \(y=1\) does not affect probabilities, since changing a density at a single point does not change its integrals. There is no atom at \(y=0\): the preimage is the single point \(X=1\).

Step 3: Integrate each piece.

$$ \int_0^1 \frac{1}{3\sqrt y}\,dy =\frac23,\qquad \int_1^4 \frac{1}{6\sqrt y}\,dy =\frac16[2\sqrt y]_1^4 =\frac{2-1}{3} =\frac13. $$

The total is \(2/3+1/3=1\), matching the fact that all of \(X\)'s probability is represented by the continuous density. Extending the two-branch formula above 1 would incorrectly count values \(x<0\), which are outside the model.

Endpoint Atoms and Continuous Mass

An ordinary density assigns probabilities through integration; it cannot by itself assign positive probability to a single point. For a transformation that clips values to a fixed interval, however, a whole tail of the original distribution can be mapped to an endpoint. The resulting law has both a continuous part and atoms. Its density should integrate to less than one by exactly the total atom probability.

Worked Example: Clipping Creates Two Atoms

Suppose \(X\) is uniform on \((-1,3)\), so \(f_X(x)=1/4\). Define \(Y=0\) if \(X\leq0\), \(Y=X\) if \(0<X<2\), and \(Y=2\) if \(X\geq2\). Find the atoms and continuous density, then check the full probability. The method is to separate constant portions from the one-to-one portion.

Atom at zero. The event \(Y=0\) is \(X\leq0\), with probability equal to the interval length from \(-1\) to 0 divided by 4:

$$ P(Y=0)=\frac{0-(-1)}{4}=\frac14. $$

Atom at two. The event \(Y=2\) is \(X\geq2\), so

$$ P(Y=2)=\frac{3-2}{4}=\frac14. $$

Continuous part. For \(0<y<2\), the only inverse is \(x=y\), and the derivative of this transformation is 1. Thus \(f_Y(y)=1/4\) on \((0,2)\), and zero elsewhere for the continuous component. Its integral is

$$ \int_0^2 \frac14\,dy=\frac12. $$

The continuous mass \(1/2\), the atom at zero \(1/4\), and the atom at two \(1/4\) sum to 1. The density does not integrate to one because it represents only the continuous component; the missing half is precisely the two endpoint atoms.

Common Mistakes and a Reliable Final Check

The most frequent error in a many-to-one transformation is to write one Jacobian contribution when several original values produce the same \(y\). Here is the incorrect calculation for the first example, followed immediately by the correction.

$$ \text{Incorrect: }\quad f_Y(y)=\frac{1/4}{2\sqrt y} =\frac{1}{8\sqrt y} \quad\Longrightarrow\quad \int_0^4 f_Y(y)\,dy=\frac12. $$

This omits the branch \(x=-\sqrt y\). The correction is to add the contribution from both valid roots:

$$ \text{Correct: }\quad f_Y(y)=\frac{1/4}{2\sqrt y}+\frac{1/4}{2\sqrt y} =\frac{1}{4\sqrt y}, \qquad \int_0^4 f_Y(y)\,dy=1. $$

A different incorrect answer, \(1/(2\sqrt y)\), also fails the mass check: its integral from 0 to 4 is 2, not 1. This usually results from losing the original density factor \(f_X(x)=1/4\) while adding branches. The density must include both the original density and the Jacobian factor on every branch.

  • Do not confuse image support with original support. For \(Y=X^2\), negative values of \(Y\) are impossible, even if \(X\) takes negative values.
  • Do not count algebraic roots outside \(S_X\). The equation \(g(x)=y\) may have roots that are not possible values of \(X\).
  • Use the absolute derivative. A decreasing branch contributes positive probability, so its Jacobian factor is \(1/|g'(x)|\), not \(1/g'(x)\).
  • Do not force a density to integrate to one when atoms exist. Integrate the continuous part, then add the point masses separately.
  • Do not infer an atom from an unbounded density. For example, a density proportional to \(1/\sqrt y\) near zero can still have a finite integral and no point mass at zero.

A final audit can be stated compactly: every density contribution must come from a valid preimage, every valid preimage must be counted, and the continuous density integral plus all atom probabilities must equal one. If this fails, revisit the support and branch list before changing constants to force normalization.

Check Your Understanding

For each problem, identify the transformed support and relevant branches or atoms, then check the resulting probability mass.

  1. Let \(X\) be uniform on \((-3,3)\) and \(Y=X^2\). Find \(f_Y(y)\) on its support and verify its integral. (Answer: \(f_Y(y)=1/(6\sqrt y)\) for \(0<y<9\), zero otherwise; its integral is 1, with no atom at zero.)
  2. Let \(X\) be uniform on \((0,4)\) and \(Y=(X-1)^2\). Give the density on each interval where the number of valid roots is constant, and check its total mass. (Answer: \(f_Y(y)=1/(4\sqrt y)\) for \(0<y<1\), \(f_Y(y)=1/(8\sqrt y)\) for \(1<y<9\), zero otherwise; the two integrals are \(1/2\) and \(1/2\), with no atom.)
  3. Let \(X\) be uniform on \((-2,4)\), and let \(Y\) equal 0 for \(X\leq0\), \(X\) for \(0<X<3\), and 3 for \(X\geq3\). Find the two endpoint atoms and the continuous density, then check total mass. (Answer: \(P(Y=0)=1/3\), \(P(Y=3)=1/6\), and \(f_Y(y)=1/6\) for \(0<y<3\); the continuous mass is \(1/2\), so total mass is 1.)
  4. Let \(X\) be uniform on \((1,5)\) and \(Y=1/X\). Find the transformed support and density, and verify the density integrates to one. (Answer: support \(1/5<y<1\), \(f_Y(y)=1/(4y^2)\); \(\int_{1/5}^{1}1/(4y^2)\,dy=1\).)
  5. A candidate claims that if \(X\) is uniform on \((-1,1)\) and \(Y=X^2\), then \(f_Y(y)=1/(4\sqrt y)\) for \(0<y<1\). Diagnose the error and give the correct density and mass check. (Answer: the proposed formula omits the correct total contribution; each of the two branches contributes \(1/(4\sqrt y)\), so \(f_Y(y)=1/(2\sqrt y)\) for \(0<y<1\), and its integral is 1.)
Clinical Biostats