Skip to content

Transformation of a Continuous Random Variable

Theorem

Let XX have a density on an interval II. Suppose g ⁣:I→Jg\colon I\to J is a continuously differentiable bijection with g′(x)≠0g'(x)\ne0 on II. For the transformed variable Y=g(X)Y=g(X) and y∈Jy\in J,

fY(y)=fX(g−1(y))∣ddyg−1(y)∣,f_Y(y)=f_X(g^{-1}(y))\left|\frac{\mathrm{d}}{\mathrm{d}y}g^{-1}(y)\right|,

and the density is zero outside JJ. Density values at endpoints do not affect probabilities. The absolute derivative accounts for interval stretching; non-strict monotonicity alone is insufficient for this formula. For transformations with suitable monotone branches, add the contributions from each inverse branch.


Interpretation

A monotone transformation changes a density by stretching or compressing intervals. The absolute inverse derivative compensates for this change of scale.

Two panels: the flat uniform density on 0 to 1 with a thin strip at x = 0.5, and the density of Y = X squared, which is high near 0, with the corresponding strip of the same area near y = 0.25.

In the illustrated example, fY(y)=fX(g−1(y))∣ddyg−1(y)∣=1⋅12yf_Y(y)=f_X\big(g^{-1}(y)\big)\Big|\dfrac{\mathrm{d}}{\mathrm{d}y}g^{-1}(y)\Big|=1\cdot\dfrac{1}{2\sqrt y} on (0,1](0,1] for g(x)=x2g(x)=x^2. The derivative factor rescales the density so that each strip keeps its probability and the total area stays 11.

A small interval of XX and its image under gg carry the same probability. Where gg stretches intervals, the density of YY drops by the factor ∣ddyg−1(y)∣\left|\frac{\mathrm d}{\mathrm dy}g^{-1}(y)\right|.

A continuous random variable assigns probabilities through a probability density function. Integration by substitution type 1 transfers those probabilities through the change of variable. Derivative and differentiability describes local interval stretching, and the inverse function theorem gives the reciprocal derivative of the inverse when the derivative of gg is nonzero.


Key Results

  • If Y=a+bXY=a+bX with b≠0b\ne0, then fY(y)=fX((y−a)/b)/∣b∣f_Y(y)=f_X((y-a)/b)/|b|.
  • For a suitable finite collection of monotone branches, sum fX(x)/∣g′(x)∣f_X(x)/|g'(x)| over the preimages g(x)=yg(x)=y.

Examples

  • If X∼Unif⁡(0,1)X\sim\operatorname{Unif}(0,1) and Y=2X+1Y=2X+1, then fY(y)=1/2f_Y(y)=1/2 on (1,3)(1,3).
  • If X∼Unif⁡(0,1)X\sim\operatorname{Unif}(0,1) and Y=X2Y=X^2, then fY(y)=1/(2y)f_Y(y)=1/(2\sqrt y) on (0,1)(0,1).

Further Properties

The transformed density integrates to one. In higher-dimensional transformations, a Jacobian determinant provides the corresponding volume adjustment.

Prerequisites

Sources

Aliases: density transformation formula Keywords: change of variables, transformed random variable, distribution transformation, Change of Variables in One Dimension Symbols: element of, square root

Last updated: 17 October 2026 21:53