Computing Expected Values From Joint Distributions

Apply the law of the unconscious statistician to compute E[g(X,Y)]E[g(X,Y)] directly from a joint PMF or joint PDF, without first finding marginal distributions.

Step 1 of 119%

Tutorial

Expected Value of a Function of Two Discrete Random Variables

The expected value of a function g(X,Y)g(X, Y) of two jointly distributed discrete random variables is computed by weighting g(x,y)g(x, y) by the joint PMF p(x,y)p(x, y) and summing over all outcomes:

E[g(X,Y)]=xyg(x,y)p(x,y).E[g(X, Y)] = \sum_{x} \sum_{y} g(x, y)\, p(x, y).

This formula handles any function of the two variables — sums, products, squares, indicators — without first having to find the marginal distributions.

For example, suppose X{0,1}X \in \{0, 1\} and Y{1,2}Y \in \{1, 2\} with joint PMF

p(0,1)=0.4,p(0,2)=0.1,p(1,1)=0.2,p(1,2)=0.3.p(0,1) = 0.4,\quad p(0,2) = 0.1,\quad p(1,1) = 0.2,\quad p(1,2) = 0.3.

Then

E[XY]=(0)(1)(0.4)+(0)(2)(0.1)+(1)(1)(0.2)+(1)(2)(0.3)=0+0+0.2+0.6=0.8.\begin{align*} E[XY] &= (0)(1)(0.4) + (0)(2)(0.1) + (1)(1)(0.2) + (1)(2)(0.3) \\ &= 0 + 0 + 0.2 + 0.6 \\ &= 0.8. \end{align*}
navigate · Enter open · Esc close · ⌘K/Ctrl K toggle