Source:
This question from order statistics appeared on the qualifying exam for Probability and Stochastic Processes in the Electrical Engineering Department.
Question:
Let $(X_{1},⋯,X_{n})$ be uniformly distributed and from the set \begin{equation} \{(x_{1},⋯,x_{n}):0<x_{1}<⋯<x_{n}<1\}. \end{equation} Also, let $f$ be a continuous function on $[0,1]$. Set $X_{0}=0$. Let $R$ be the weighted sum \begin{equation} R=\sum_{i=0}^{n−1}f(X_{i+1})(X_{i+1}−X_{i}). \end{equation} Show that \begin{equation} E[R]=\int^{1}_{0}f(t)(1−(1−t)^{n})dt. \end{equation}
What I tried:
I was initially trying to integrate over the joint distribution of $X_{1},\cdots,X_{n}$ (assuming all of them are independent) but I am confused how to integrate $f$ in that case.
I would be very thankful for any help in proving this. I found a similar post here Expected value of Rieman sums of a continous function over all possible patitions of $[0,1]$ into n+1 subintervals. but it is unanswered.
I was sure there is an elegant probabilistic argument for this, but sadly, I don't see it. One can do this using the joint density of order statistics. One can easily find online that the joint PDF for $(X_i,X_{i+1})$ is $f_{i,i+1}(u,v)=\frac{n!}{(i-1)!(n-i-1)!}u^{i-1}(1-v)^{n-i-1}$ on $0<u<v<1$. Therefore, one can easily compute
\begin{align} \mathbb{E}[f(X_{i+1})(X_{i+1}-X_i)]&=\int_0^1\int_0^v f(v)[v-u]f_{i,i+1}(u,v)\mathrm{d}u\mathrm{d}v\\ &=\int_0^1\left(\frac{n!(1-v)^{n-i-1}}{(i-1)!(n-i-1)!}\right)f(v)\left(\int_0^v [v-u]u^{i-1}\mathrm{d}u\right)\mathrm{d}v\\ &=\int_0^1\left(\frac{n!(1-v)^{n-i-1}}{(i-1)!(n-i-1)!}\right)f(v)\left[\frac{v^{i+1}}{i(i+1)}\right]\mathrm{d}v\\ &=\int_0^1f(v)\left[{n \choose i+1}v^{i+1}(1-v)^{n-i-1}\right]\mathrm{d}v. \end{align}
Note that this actually holds also for $i=0$ under your convention. Then summing from $i=0$ to $n-1$, reindexing, and interchanging sum and integrals, we obtain:
\begin{align} \mathbb{E}[R]=\int_0^1 f(v) \sum_{i=1}^n {n \choose i}v^{i}(1-v)^{n-i}\mathrm{d}v. \end{align}
But note that $\sum_{i=0}^n {n \choose i}v^{i}(1-v)^{n-i}=(v+(1-v))^n=1$, hence the sum from $i=1$ to $n$ is equal to $1-(1-v)^n$. This is the desired formula.