Expected value of a function of several random variables

Summary

Discrete random variables

  • X,YX,Y are two discrete random variables . The range of XX is x1,,xnx1,,xn and the range of YY is y1,,ymy1,,ym . They have joint pmf f(x,y)f(x,y) and Z=g(X,Y)Z=g(X,Y) for some function gg . Then

E(Z)=ni=1mj=1g(xi,yj)f(xi,yj)E(Z)=ni=1mj=1g(xi,yj)f(xi,yj)

Example

  • Z=XYZ=XY and f(x,y)f(x,y) is defined by the following table:

E(Z)=2i=12j=1xiyjf(xi,yj)=110.4+120.1+210.1+220.4=1.4E(Z)=2i=12j=1xiyjf(xi,yj)=110.4+120.1+210.1+220.4=1.4

Continuous random variable

  • X,YX,Y are two continuous random variables with joint pdf f(x,y)f(x,y) and Z=g(X,Y)Z=g(X,Y) for some function gg . Then

E(Z)=g(x,y)f(x,y)dxdyE(Z)=g(x,y)f(x,y)dxdy

Example

  • f(x,y)=4xyf(x,y)=4xy for 0x10x1 and 0y10y1 and Z=XYZ=XY . Then

E(Z)=1010xy4xydxdy=49E(Z)=1010xy4xydxdy=49