Random points on interval, expected lengths of pieces Many years ago I came across the following task.
If we have the interval $[0; 1]$ and we throw $N$ uniformly distributed and mutually independent points on it, then we'll get $N+1$ segments. What is the expected length of the longest segment? The 2nd longest? Etc.
For $N=1$, the solution is trivial: $3/4$ and $1/4$ (since the longest segment is uniformly distributed in [1/2; 1] and the shorter one is uniformly distributed in $[0; 1/2]$).
For $N=2$, the solution is not trivial, but possible. One just has to draw a quadrat 1 x 1. A point in it would mean that the longest segment has the x coordinate, and the 2nd longest segment has the y coordinate (and the shortest one is 1 - 1st - 2nd). One then has to carefully draw the possible area (this will be a triangle), and find its middle point.
But for $N>2$ I have no clue how to solve it.
I remember, the book I saw the task in, had a general solution for arbitrary $N$, but I don't know anymore what book it was.
Note that the task is somewhat similar to Average Distance Between Random Points on a Line Segment, but just somewhat.
 A: *

*Well, barring a more elegant solution, there's a recurrence relation on $F_n(x)$, the probability that when you distribute $n$ points, the largest segment has at least length $x$.  

*The base case is 0 points, in which case the largest segment is the full interval and always has length 1. So $F_0(x)$ is 1 for all points $x\leq 1$ and 0 otherwise.

*The recurrence relation for $F_{n+1}(x)$ is as follows: you pick the length of the first interval, $u$, uniformly from [0,1]. If $u\geq x$, then $F_{n+1}$ has value 1. Otherwise, you have a scaled problem: pick $n$ remaining intervals out of the remaining space $1-u$ and see how often the largest such interval has length at least $x$.  Altogether the relationship is:
$$F_{n+1}(x) = (1-x) + \int_0^x du\,F_n\left(\frac{x}{1-u}\right)$$

*The expected length of the longest interval is a weighted sum of all possible lengths times the probability that the longest interval has exactly that length; it is:
$$E[L_n] = \int_0^1 \ell \Pr(\ell) d\ell = \int_0^1 -\ell \left[\frac{dF_n(\ell)}{d\ell}\right] d\ell$$

*For example, $F_0$ is defined as above. Using the recurrence relation, we find that $F_1(x) = 2(1-x)$ (thresholded to lie between 0 and 1). Hence, plugging in,  the expected length for one point is $E[L_1] = \frac{3}{4}$.



*

*If you make the substitution $G_n \equiv 1- F_n$ (so $G_n(x)$ denotes the probability that the longest interval has length at most $x$), you can simplify the defining recurrence:
$$G_{n+1}(x) =  \int_0^x du\, G_n\left(\frac{x}{1-u}\right)$$

*And the probability of length exactly $x$ is given by the derivative of $G_{n+1}$, so the expected length for $n$ points is, by the fundamental theorem of calculus:
$$E[L_{n+1}] = \int_0^1 \ell \frac{dG_{n+1}}{d\ell}(\ell) \,d\ell = -\int_0^1 \ell \cdot G_n\left(\frac{\ell}{1-\ell}\right)\, d\ell $$

My only other observation is that, by the linearity of expectation, I would expect the expected lengths of the largest, second largest, etc. intervals to sum to one because the lengths sum to one for each outcome and therefore should do so in expectation.
