Suppose $X_1,X_2,\ldots,$ is a sequence of independent random variables with uniform distribution on unit interval $(0,1)$. Let $N=\min\{n>0\mid X_{(n)}-X_{(1)}>\alpha\}$ where $0<\alpha<1$. How can find $\mathbb{E}(N)$? Note: $X_{(1)},X_{(n)}$ are the smallest and the largest order statistics elements of the sequence $X_1,X_2,\ldots,$ and $\alpha$ is fixed.
Expectation related to the span of a uniform sample
-
0@Sasha: Nice and upvoted. Maybe a little simpler is to first compute $\mathrm P(x\leqslant X_{(1)},X_{(n)}\leqslant y)=(y-x)^n$, then $\mathrm P(X_{(1)}\in\mathrm dx,X_{(n)}\leqslant x+\alpha)$ (with two different formulas for the regimes $x\leqslant1-\alpha$ and $x\geqslant1-\alpha$), then $\mathrm P(N\geqslant n+1)=n\alpha^{n-1}(1-\alpha)+\alpha^n$ for every $n\geqslant0$, and finally $\mathrm E(N)$ as $\sum\limits_{n\geqslant0}\mathrm P(N\geqslant n+1)$. (At the moment, in view of your own *previous* comment to the OP, I do not feel like detailing this as a solution.) – 2012-03-10
1 Answers
The joint probability density function for $(X_{(1)}, X_{(n)})$ is well known: $ f_{X_{(1)}, X_{(n)}}(x,y) = (y-x)^{n-2} n(n-1) \cdot [ 0 < x \leqslant y <1] $ The probability of the event $N_\alpha = n$ can be computed as probability that $X_{(n)}-X_{(1)} < \alpha$, but addition new uniform variable makes it greater than $\alpha$: $ \mathbb{P}(N_\alpha = n+1) = \mathbb{P}\left( X_{(n)} - X_{(1)}<\alpha, \max(U, X_{(n)}) - \min(U, X_{(1)}) > \alpha \right) $ Transcribing into the integral: $ \begin{eqnarray} \mathbb{P}(N_\alpha = n+1) &=& n(n-1) \int_0^1 \mathrm{d} u \int_0^1 \mathrm{d} y \int_0^y \mathrm{d} x (y-x)^{n-2} [ y-x < \alpha \land (y-u > \alpha \lor u - x > \alpha) ] \end{eqnarray} $
I used Mathematica to evaluate the probability:
In[60]:= Integrate[ n (n - 1) (y - x)^(n - 2) Boole[ y - x < al && (u - x > al || y - u > al)], {u, 0, 1}, {y, 0, 1}, {x, 0, y}, Assumptions -> 0 < al < 1 && n >= 2] Out[60]= (-1 + al)^2 al^(-1 + n) n
That is $ \mathbb{P}(N_\alpha = n) = (n-1) \left(1-\alpha\right)^2 \alpha^{n-2} $ The expectation is then $ \mathbb{E}(N_\alpha) = \sum_{n=1}^\infty n \cdot (n-1) \left(1-\alpha\right)^2 \alpha^{n-2} = \left(1-\alpha\right)^2 \frac{\mathrm{d}^2}{\mathrm{d} \alpha^2} \frac{1}{1-\alpha} = \frac{2}{1-\alpha} $