Transformations of Random Variables
How a function changes a random variable's distribution, and why a density needs a scale correction.
Draft — not yet reviewed by the site owner.
Prerequisites: Random Variables.
A transformation of a random variable makes a new random quantity by applying a rule to an old one: if is a waiting time, is that time in another unit. The challenge is to find the distribution of when we know the distribution of .
Start with an event, not a formula
The safest first step is to ask which values of produce :
This CDF method works even when folds several values of onto the same value of . It also forces us to identify the new support before writing a density.
For example, let be uniform on and let . Then . For ,
Differentiating gives for , and zero elsewhere. The density rises steeply near zero because a short interval near zero in collects values of from both sides of zero. The density becomes unbounded at zero, but its total area is still 1.
The one-to-one shortcut
Suppose is differentiable and strictly monotone on the support of a continuous . Write for its inverse. Where is differentiable, the density of is
on the transformed support. The factor corrects for stretching or squeezing: probability in a short interval must stay the same even when the interval’s width changes. For , for example, and , so the density is half as tall over a range twice as wide.
The shortcut needs care when is not one-to-one. For , the positive and negative branches both contribute. The CDF calculation above handles them automatically.
Several variables and the Jacobian
The same idea extends to two dimensions. When a one-to-one differentiable transformation maps to , a small area may be stretched or squeezed. A Jacobian determinant measures that local change of area. The new joint density is the old density evaluated at the inverse map, multiplied by the absolute determinant of the inverse’s derivative matrix.
For instance, if and , then and . The inverse changes area by a factor of 1, so
on the transformed support. If instead and , the inverse changes area by , and the density gains that factor. The formula is useful only after checking which values are possible.
Common misunderstandings
A density need not stay below 1. Its area must be 1; the height changes when the coordinate scale changes.
The inverse formula is a shortcut, not the starting point. With a many-to-one transformation, split into branches or use the CDF method. Always state the support and say the density is zero elsewhere.
Further reading
- MIT OpenCourseWare, “Derived Distributions”. Lecture 12 covers functions of random variables and multivariate transformations.