Suppose $X_1 \sim {\tt U} \ (0,1)$ and $X_2|X_1=x_1\sim {\tt U} \ (0,x_1)$ are uniform random variables.
Find the conditional mean $\mathsf E[X_1|X_2=x_2]$
Sorry about the basic question, but I'm new to this and am trying to understand.
Is the answer $1/2$, because $X_2$ depends on $X_1$ but $X_1$ is independent?
Hint
The posterior pdf is given by the Bayes Rule:
Or
$$f_{X_1|X_2=x_2}(x_1)=\frac{f_{X_1}(x_1)f_{X_2|X_1=x_1}(x_2)}{\displaystyle\int f_{X_1}(u)f_{X_2|X_1=x_1}(u)du}$$ Now substitute the known pdfs and calculate the conditional expectation after finding $f_{X_1|X_2=x_2}(x_1)$.