The PDF of a Function of Two Random Variables
Shoichi Midorikawa
General Formula
Let X and Y be two independent continuous random variables. Suppose Z is a function of X and Y, i.e., z=φ(x,y), then the pdf of z is fZ(z)=∫δ(z−φ(x,y))fX(x)fY(y)dxdy where δ(z−φ(x,y)) is the Dirac delta function.
To evaluate the integral, it is convenient to use the formula δ(g(x))=∑i1|g′(αi)|δ(x−αi) where αi is a solution of g(x)=0, namely, g(αi)=0 .
The following are representative examples.
1. Z=X+Y
fZ(z)=∫δ(z−x−y)fX(x)fY(y)dxdy=∫fX(z−y)fY(y)dy2. Z=X−Y
fZ(z)=∫δ(z−x+y)fX(x)fY(y)dxdy=∫fX(z+y)fY(y)dy3. Z=XY
fZ(z)=∫δ(z−xy)fX(x)fY(y)dxdy4. Z=X/Y
fZ(z)=∫δ(z−xy)fX(x)fY(y)dxdy5. Z=XY
fZ(z)=∫δ(z−xy)fX(x)fY(y)dxdy Let g(x)=z−xy. Then, from g(x)=0, x=z1/y. From g′(x)=−yxy−1, g′(z1/y)=−yz1−1/y.For more details, see PDFs of X + Y, XY, X/Y , and XY