Let $X$ and $Y$ be two independent random variables distributed uniformly on $[0,1]$. I want to compute:
$$E[X+Y\mid\max\{X,Y\}≤(1/2)]$$
My first approach was the following. Let $X=\max\{X,Y\}$. Then I know that $$E[X \mid X \leq 1/2]=1/3 \quad \text{and} \quad E[Y \mid Y<X\leq1/2]=1/6$$ and hence
$$E[X+Y \mid \max\{X,Y\} \leq 1/2]=1/2$$
But then I thought: doesn't $\max\{X,Y\} \leq 1/2$ also imply that $X+Y$ must be less or equal than 1? Since $X+Y$ follows a triangular distribution, we can compute the expected value of $X+Y$ conditional on it not exceeding $1$. If we do so, what we get is
$$E[X+Y \mid X+Y\leq 1]=2/3$$
But why do I get two different answers?