Skip to content

Change-of-variables formula for a density

Question

A random variable XX has density fXf_X, and Y=g(X)Y=g(X) for a given function gg. How do you find the density of YY?

Short answer

For strictly monotone, differentiable gg: fY(y)=fX ⁣(g−1(y))∣ddyg−1(y)∣f_Y(y)=f_X\!\left(g^{-1}(y)\right)\left|\tfrac{d}{dy}g^{-1}(y)\right|. This follows by differentiating P(Y≤y)\mathbb{P}(Y\le y), which equals FX(g−1(y))F_X(g^{-1}(y)) or 1−FX(g−1(y))1-F_X(g^{-1}(y)). If gg is not monotone, sum this expression over every root xx of g(x)=yg(x)=y, i.e. fY(y)=∑fX(x)/∣g′(x)∣f_Y(y)=\sum f_X(x)/|g'(x)|.

Adapted from Joshi, Denson & Downes, Quant Job Interview Questions and Answers, Q3.31, p.83; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question

Start with a free lesson: Normal Distribution is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.

Read it free