Show that $P\{X=i\}=\dfrac{1}{n+1}$ I need some help with this problem. I prove that if U is a random variable, that is uniform on $(0,1)$ and if, conditional on $U=p$, $X$ is binomial with parameters $n$ and $p$, then $P\{X=i\}=\dfrac{1}{n+1}$, $i=\{0,1,\cdots,n\}$. 
But now, I need another way to show this result, let $U, X_{1}, X_{2}, \cdots, X_{n}$ be independent uniform $(0,1)$ random variables. If we define $X$ by $X=\#i: X_{i}<U$. That is, if the $n+1$ variables are ordered from smalltest to largest, then U would be in position $X+1$, any idea?. Regards!

If $U\sim\mathsf U(0,1)$ and $X\mid U=p\sim\textsf{Binom}(n,p)$ then 
\begin{align}
\mathbb E[s^X] &= \sum_{k=0}^n \mathbb P(X = k)s^k\\ &= \int_0^1\sum_{k=0}^n \binom nk k^p (n-k)^{1-p}s^k\ \mathsf dp\\
&= \int_0^1 (1-(1-s)p)^n\ \mathsf dp\\
&= \left.\frac{(1-(1-s)p)^{n+1}}{(n+1)(s-1)}\right|_0^1\\
&= \frac{1-s^{n+1}}{(n+1)(1+s)}\\
&= \sum_{k=0}^n\frac1{n+1} s^k,
\end{align}
so that $X$ is uniformly distributed over $\{0,1,\ldots,n\}$.
Now if $U,X_1,\ldots,X_n\stackrel{\textsf{iid}}\sim\mathsf U(0,1)$ and $Y=\max_k\{X_k<U\}$, then
$$\mathbb P(Y=k) = \frac{n!}{(n+1)!}=\frac1{n+1}, \ k=0,1,\ldots, n $$ since there are $(n+1)!$ permutations of $\{U,X_1,\ldots,X_n\}$ and $n!$ of them with $k$ $X_i$'s before $U$.
