# Conditional expectation on multiple variables

1. May 20, 2010

### dabd

How to compute $$E[X|Y1,Y2]$$?
Assume all random variables are discrete.

I tried $$E[X|Y1,Y2] = \sum_x{x p(x|y1,y2)$$ but I'm not sure how to compute $$p(x|y1,y2] = \frac{p(x \cap y1 \cap y2)}{p(y1 \cap y2)}$$

If it is correct, how can I simplify the expression if Y1 and Y2 are iid?

2. May 20, 2010

### EnumaElish

If y1 and y2 are independent then p(y1, y2) = p(y1)p(y2).

3. May 20, 2010

In general

$$p(x \mid y_1, y_2) = \frac{p(x,y_1,y_2)}{p(y_1,y_2)}$$

where the numerator is the joint density (or mass function for discrete case) of all three, and the denominator is the marginal of the two ys. You treat this as a function of $x$ alone. Then, in the discrete case, the expected value is

$$\sum x p(x \mid y_1, y_2)$$

and in the continuous case it is

$$\int x p(x \mid y_1, y_2) \, dx$$

In each case it is possible for the answer to depend on both $y_1, y_2$.