Expected value of a function of several random variables

Summary

Discrete random variables

  • \(X,Y\) are two discrete random variables . The range of \(X\) is \({x_1,…,x_n}\) and the range of \(Y\) is \({y_1,…,y_m}\) . They have joint pmf \(f\left( x,y \right)\) and \(Z=g(X,Y)\) for some function \(g\) . Then

\[E\left( Z \right)=\sum_{i=1}^{n}{ \sum_{j=1}^{m}{ g\left( x_i,y_j \right)f\left( x_i,y_j \right) } }\]

Example

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

\[E\left( Z \right)=\sum_{i=1}^{2}{ \sum_{j=1}^{2}{ x_iy_jf\left( x_i,y_j \right) } }=1⋅1⋅0.4+1⋅2⋅0.1+2⋅1⋅0.1+2⋅2⋅0.4=1.4\]

Continuous random variable

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

\[E\left( Z \right)=\int_{-∞}^{∞}{ \int_{-∞}^{∞}{ g\left( x,y \right)f\left( x,y \right)dxdy } }\]

Example

  • \(f\left( x,y \right)=4xy\) for \(0≤x≤ 1\) and \(0≤y≤ 1\) and \(Z=XY\) . Then

\[E\left( Z \right)=\int_{0}^{1}{ \int_{0}^{1}{ xy⋅4xy dxdy } }= \frac{4}{9}\]