What is the distribution of $X|W=w$? Let $X$ and $Y$ be independent random variables with uniform distribution between $0$ and $1$, that is, have joint density $f_{xy}(x, y) = 1$, if x $\in$ $[0,1]$ and y $\in [0,1]$ and $f_{xy} (x, y) = 0$, cc. Let $W = (X + Y) / 2$:
What is the distribution of $X|W=w$?
I started considering something like this: $X|W = (x +y)/2$
But I stucked. I dont know how to begin.
Any idea? Hint?

$$X = 2W-Y$$
So, 
$$X_c = (X|W=w) = (2w-Y_c) $$
Hence, $X_c$ should also be uniform from $[\max(2w-1,0),\min(2w,1)]$.

EDIT: Here is an argument for why $X_c$ will also be uniform over its domain.
$$P(X=x_1|W=w) = \frac{P(X=x_1 \& W=w)}{P(W=w)} = \frac{P(X=x_1 \& Y=2w-x_1)}{P(W=w)}$$
Since $X$ and $Y$ are independent, this becomes:
$$P(X=x_1|W=w) = \frac{P(X=x_1)P(Y=2w-x_1)}{P(W=w)}$$
If $2w-x_1 <0 $ or $2w-x_1>1$, the density above becomes $0$.
But otherwise, it will stay exactly the same if we replace $x_1$ by $x_2$ (such that both satisfy $0 \leq 2w-x \leq 1$). Hence, $X_c$ and $Y_c$ should remain uniform over their valid domains.
