Expectation of decreasing uniform random variables

81 Views Asked by At

Suppose $X_1,X_2,\dots$ are independent random variables uniform on the interval $(0,1)$, and let $N$ be the first time the sequence $X_1,X_2,\dots$ is not decreasing, i.e., it is the smallest $n$ such that $X_1>X_2>\cdots>X_{n_1}$ and $X_n>X_{n-1}$. Find $E[X_{N-1}]$.

My approach was expressing the expectation as a sum of conditional expectations,

$$E[X_{N-1}]=\sum_{n\geq2}E[X_{N-1}|N=n]P(N=n)$$

where the probability $P(N=n)$ I know is $1/n(n-2)!$. Now I thought that $E[X_{N-1}|N=n]$ should be just the expectation of $X_{n-1}$, which is $\frac12$, so the final answer I get is the series $\frac12\sum_n1/n(n-2)!=\frac12$, but this answer is presumably incorrect. I think the problem is that $E[X_{N-1}|N=n]$ is not $\frac12$, but in this case could anyone enlighten on why it's not the case and also how one could compute it?