Average Distance Between Random Points on a Line Segment Suppose I have a line segment of length $L$.  I now select two points at random along the segment.  What is the expected value of the distance between the two points, and why?

It is possible to solve this using limits however the solution is somewhat inelegant.
Split the line L into $(k+1)$ equal segments by placing points $p_1$, $p_2$, ... $p_{k}$ on the line. The length of each segment is $\dfrac L{k+1}$. Let $S_i$ be the sum of distances from point $p_i$ to all other points.
$S_i$ = $ \dfrac L{k+1} \sum_{j=1}^{i-1} j + \dfrac L{k+1} \sum_{j=1}^{k-i} j $
$S_i$ =
$\dfrac L{2(k+1)} ( (k-i) (k-i+1) + (i-1) (i) )$
$S_i$ =
$\dfrac L{2(k+1)} ( 2i^2 - 2i(k+1) + k(k+1) )$
Now, the sum of all distances from every point to every other point is $\sum_{i=1}^{i=k} S_i$. Also, the number of pairs of points is $k^2$. Therefore the average $A_k$ is $\dfrac{\sum_{i=1}^{i=k} S_i}{k^2}$
$\sum_{i=1}^{i=k} S_i = \dfrac L{2(k+1)} \sum_{i=1}^{i=k} ( 2i^2 - 2i(k+1) + k(k+1) ) $
$A_k = \dfrac L{2(k+1)k^2} \sum_{i=1}^{i=k} ( 2i^2 - 2i(k+1) + k(k+1) ) $
$A_k = \dfrac {2L}{2(k+1)k^2} \dfrac{k(k+1)(2k+1)}6 - \dfrac {2L(k+1)}{2(k+1)k^2} \dfrac{k(k+1)}2 + \dfrac {L(k(k+1))}{2(k+1)k^2}k $
$A_k = \dfrac {L(2k+1)}{6k} - \dfrac {L(k+1)}{2k} + \dfrac {L}{2} $
$A_k = \dfrac {L}{6k} (2k+1 - 3k-3 + 3k) $
$A_k = \dfrac {L}{3k} (k-1) $
$A_k = \dfrac L3 - \dfrac L{3k} $
Now, we just need to make the line segments infinitely small, i.e infinitely large $k$ and we're done.
$\lim_{k \to +\infty} A_k$ = $ \dfrac L3 - \lim_{k \to +\infty} \dfrac {L}{3k} = \dfrac L3 \space\blacksquare $
