# Find $E[X_1\mid\max\{X_1,X_2,…,X_n\}]$ for $(X_k)$ i.i.d uniform on $[0,1]$

Let $$X_1,X_2,...,X_n$$ be i.i.d uniform random variables on $$[0,1]$$. Define $$Y=max$${$$X_1,X_2,...,X_n$$}. Find $$E[X_1|Y]$$.

My answer: $$P(X_i|Y)=P(X_j|Y)$$ for all $$i,j=1,2,...,n$$.
Since $$\sum_{i=n}^{n}P(X_i|Y)=1$$, I get $$P(X_i|Y)=1/n$$.
Then $$E[X_1|Y]=\int_{0}^{1}x_1\times{1\over n}dx_1={1\over 2n}$$ Is it correct for $$P(X_i|Y)=P(X_j|Y)$$ and $$\sum_{i=n}^{n}P(X_i|Y)=1$$?

• None of this is correct. In fact, even passing over the misleading notations, none of this is even related to the question. What would be a definition of $E(X_1\mid Y)$, according to you? – Did Jan 12 '19 at 22:17
• Possible duplicate of Conditional expectation to de maximum $E(X_1\mid X_{(n)})$ – StubbornAtom Jan 14 '19 at 13:44
• – StubbornAtom Jan 14 '19 at 13:45

The equality $$\sum_i \mathbb P[X_i|Y]=1$$ is false, you don't get the right result for this reason.

Observe that $$\mathbb P[Y\leq y] = \mathbb P[X_1\leq y\land X_2\leq y\land\dots\land X_n\leq y]=y^n$$ hence $$f_Y(y)=n y^{n-1}$$. Similarly $$\mathbb P[X_1\leq x,Y\leq y]=\mathbb P[X_1\leq \min(x,y)\land X_2\leq y\land\dots\land X_n\leq y]=\min(x,y) y^{n-1}$$, hence for $$x\leq y$$, $$f_{X_1,Y}(x,y)=(n-1) y^{n-2}$$.

Using that, you can obtain the conditional distribution of $$X_1$$ given that $$Y$$, for $$x \begin{align*} f_{X_1|Y}(x|y) &= \frac{f_{X_1,Y}(x,y)}{f_Y(y)}\\ &=\frac{(n-1)y^{n-2}}{n y^{n-1}}\\ &=\frac{n-1}{ny} \end{align*}

For $$x=y$$ a discontinuity happens and $$\mathbb P[X_1=y|Y=y]=\frac{1}{n}$$ by symmetry. Hence for any $$x\leq y$$, \begin{align*} f_{X_1|Y}(x|y) =\frac{n-1}{ny}+\frac{1}{n}\delta(x-y) \end{align*}

finally the conditional expectation is given by \begin{align*} \mathbb E[X_1|Y=y] &= \int_0^{y} x \cdot f_{X_1|Y}(x|y) dx\\ &=\frac{n-1}{ny} \cdot \frac{y^2}{2}+\frac{y}{n}\\ &=\frac{y(n+1)}{2n} \end{align*}

And hence $$\mathbb E[X_1|Y]=\frac{Y(n+1)}{2n}$$

• But you ignored the point mass with weight $1/n$ of $f_{X_1 \mid Y}(x \mid y)$ at $x = y$. If $f_{X_1 \mid Y} (x \mid y) = (n-1)/(ny)$ then when you integrate $\int_0^y f_{X_1 \mid Y} (x \mid y) dx$ you get $(n - 1)/n$, not $1$. By the symmetry that the OP was possibly referring to, we have $P(X_1 = Y) = 1/n$. – Alex Jan 12 '19 at 22:42
• @Alex Oh yes, something felt wrong, thank you very much. – P. Quinton Jan 12 '19 at 22:50
• @P.Quinton what does the $\delta$ in case $x=y$ mean? – clement Jan 13 '19 at 2:12
• @P.Quinton and why don't you consider $x\gt y$? For $x\ge y$, $f_{X_1,Y}(x,y)=ny^{n-1}$, thus $E[X_1|Y]=1/2$ – clement Jan 13 '19 at 5:39
• The Dirac delta : en.wikipedia.org/wiki/Dirac_delta_function is a handy trick to represent some of the mixed random variables that should not have a pdf. It's properties are $\int_A f(x) \delta(x) dx = f(0)$. In this case it means that if you integrate $\int_A f(x) \delta(x-y) dx$ on a range $A$ that contains $y$, then it is equal to $f(y)$. This is a informal trick since $\delta$ is not really a function. To make it formal, you can define it as a measure (the approach taken in probability), however this is digging in the time consuming world of measure theory. – P. Quinton Jan 13 '19 at 7:33