[Math] Conditional expectation of the maximum of two independent uniform random variables given one of them

conditional probabilityprobabilityprobability distributionsprobability theory

Given $X_1$ and $X_2$ two independent random variables both uniformly distributed on $[0,1]$. What is the conditional expectation of $\max\{X_1,X_2\}$ given $X_2$?
And the conditional expectation of $\min\{X_1,X_2\}$ given $X_2$?

Best Answer

$$ \Pr(\max\{X_1,X_2\} = X_2\mid X_2=x)=\Pr(X_2>X_1\mid X_2=x) = \Pr(x>X_1)=x. $$ The probability distribution of $\max$ given that $\max\ne X_2$ and $X_2=x$ is the probability distribution of $X_1$ given $X_1>x$, so that is uniform on $[x,1]$.

So \begin{align} & \mathbb E(\max\mid X_2=x) \\[8pt] = {} & \Pr(\max=x\mid X_2=x)\mathbb E(\max\mid \max=x\ \&\ X_2=x) \\ & {} + \Pr(\max\ne x\mid X_2=x) \mathbb E(\max\mid \max\ne x\ \&\ X_2=x) \\[8pt] = {} & x^2 + (1-x)\cdot \frac{x+1}2 = \frac{1+x^2}2. \end{align}

Therefore $$\mathbb E(\max\mid X_2) = \dfrac{1+X_2^2}2.$$