Processing math: 100%

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)=δ(zxy)fX(x)fY(y)dxdy=fX(zy)fY(y)dy

2. Z=XY

fZ(z)=δ(zx+y)fX(x)fY(y)dxdy=fX(z+y)fY(y)dy

3. Z=XY

fZ(z)=δ(zxy)fX(x)fY(y)dxdy
Note that
δ(zxy)=δ(y(xzy))=1|y|δ(xzy)
Thus we find
fZ(z)=1|y|fX(z/y)fY(y)dy

4. Z=X/Y

fZ(z)=δ(zxy)fX(x)fY(y)dxdy
Note that
δ(zxy)=δ(1y(xyz))=|y|δ(xyz)
We thus find
fZ(z)=|y|fX(yz)fY(y)dy

5. Z=XY

fZ(z)=δ(zxy)fX(x)fY(y)dxdy Let  g(x)=zxy. Then,  from  g(x)=0,  x=z1/y. From  g(x)=yxy1, g(z1/y)=yz11/y.
We finally find
fZ(z)=1|yz11/y|fX(z1/y)fY(y)dy

For more details, see   PDFs of X + Y, XY, X/Y , and XY