# Does E[max(x, y)] equal to E[x|x>y]*P(x>y) + E[x|x<y]* P(x<y) when x and y are not independent?

Suppose x and y are discrete random variable, I can write them in summation. And it seems like they are equal. Any ideas?

## 1 Answer

It's $$E[y|x on the second expression but otherwise fine yes. We can prove it using the law of total expectation without independence of $$x,y$$.

• He also states the variables are discrete, so one of the signs should be $\leq$ or $\geq$. – Raskolnikov Apr 27 at 10:33