The Change-of-Variables Method for Continuous Random Variables

A direct formula for the density of Y=g(X)Y = g(X) when gg is strictly monotonic and differentiable, bypassing the CDF step.

Step 1 of 119%

Tutorial

The Change-of-Variables Formula

The distribution function method finds the density of Y=g(X)Y = g(X) by first computing FY(y)=P(Yy)F_Y(y) = P(Y \le y) and then differentiating. When gg is strictly monotonic and differentiable on the support of X,X, we can skip the CDF entirely and write the density of YY directly.

Change-of-variables formula. Let XX be continuous with density fX,f_X, and let gg be strictly monotonic and differentiable on the support of X,X, with inverse g1.g^{-1}. Then Y=g(X)Y = g(X) has density

fY(y)=fX ⁣(g1(y))ddyg1(y)f_Y(y) = f_X\!\left(g^{-1}(y)\right)\left|\dfrac{d}{dy}\,g^{-1}(y)\right|

on the image of the support of XX under g,g, and fY(y)=0f_Y(y) = 0 elsewhere.

For example, let XX have density fX(x)=4x3f_X(x) = 4x^3 on 0<x<1,0 < x < 1, and let Y=5X.Y = 5X. Then g(x)=5x,g(x) = 5x, so g1(y)=y5g^{-1}(y) = \dfrac{y}{5} and ddyg1(y)=15.\dfrac{d}{dy}\,g^{-1}(y) = \dfrac{1}{5}. The support transforms from (0,1)(0,1) to (0,5),(0,5), giving

fY(y)=4(y5) ⁣315=4y3625,0<y<5.f_Y(y) = 4\left(\dfrac{y}{5}\right)^{\!3}\cdot\dfrac{1}{5} = \dfrac{4y^3}{625}, \quad 0 < y < 5.
navigate · Enter open · Esc close · ⌘K/Ctrl K toggle