Given two continuous random variables X and Y, use Theorem 4 to express E(X) in terms of
(a) the joint density of X and Y; (b) the marginal density of X.
Theorem 4
If X and Y are discrete random variables and f(x, y) is the value of their joint probability distribution at (x, y), the expected value of g(X, Y) is
Correspondingly, if X and Y are continuous random variables and f(x, y) is the value of their joint probability density at (x, y), the expected value of g(X, Y) is