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?

The conditional pdf is given by
$$f_{X | W = w}(x) =
\frac {f_{X, W}(x, w)} {f_W(w)}.$$
$f_W$ is the pdf of a sum of two independent uniformly distributed r.v.:
$$f_W(w) = 4 w \left[0 < w \leq \frac 1 2 \right] +
 4 (1 - w) \left[\frac 1 2 < w < 1 \right].$$
The transformation $(x,w) = (x, (x + y)/2)$ maps the square $0 < x < 1 \land 0 < y < 1$ to the parallelogram $0 < x < 1 \land 0 < 2 w - x < 1$ and has the Jacobian $\partial(x, w)/\partial(x, y) = 1/2$. The transformed pdf is
$$f_{X, W}(x, w) = 2 \,[0 < x < 1 \land 0 < 2 w - x < 1] = \\
2 \left[ 0 < w \leq \frac 1 2 \land 0 < x < 2 w \right] +
 2 \left[ \frac 1 2 < w < 1 \land 2 w - 1 < x < 1 \right].$$
Consider what $f_{X | W = w}$ simplifies to when $w < 1/2$ and when $w > 1/2$.
