Good day,
not long ago i solved similar problem for $X_1, X_2,...,X_n$ iid $U(\{1,..,N\})$ (discrete). But then i asked myself what if $X_i$ would be iid $U([0,1])$ (continuous) and realised that tricks i used for discrete calculations wouldn't work at all.
So let be $X$ and $Y$ independent random variables with continuous uniform distribution on [0,1]. $Z:=\max\{X,Y\}$. How to calculate $\mathbb{E}[X|Z]$?
To acquire $\mathbb{E}[X|Z=z]$ would be enough for calculating. And i know that \begin{align*} \mathbb{E}[X|Z=z]=\int x d\mathbb{P}^{X|Z=z} \end{align*} $\mathbb{P}^Z$ almost surely. Good, the problem reduces to finding out what $\mathbb{P}^{X|Z=z}$ is.
We know that $\mathbb{P}^{X|Z=z}$ has a lebesgue density $\frac{f(x,z)}{f^Z(z)}$.
Calculating of $f^Z(z)$ wasn't hard and i have $2z\mathbf{1}_{0\leq z\leq1}$, but i am clueless about $f(x,z)$.
i have read this post from Did Conditional expectation $E[X\mid\max(X,Y)]$ for $X$ and $Y$ independent and normal but i have no idea where the formula comes from.
If someone knows how to solve this problem please tell me.