TITLE: Average Distance Between Random Points on a Line Segment
QUESTION [57 upvotes]: 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?

REPLY [2 votes]: I have another proof based on limits.
Split the line L into $k$ equal segments by placing points $p_0$, $p_2$, ... $p_k$ on the line. The length of each segment is $\dfrac Lk$. Let $S_i$ be the sum of distances from point $p_i$ to all other points.
$S_i$ =
$\dfrac Lk \sum_{n=0}^{k-i} n + \dfrac Lk \sum_{n=0}^{i}  n$
$S_i$ =
$\dfrac L{2k} ( (k-i) (k-i+1) + i(i+1) )$
$S_i$ =
$\dfrac L{2k} ( 2i^2 - 2ik + k^2 + k )$
Now, the sum of all distances from every point to every other point is $\sum_{i=0}^{i=k} S_i$. Also, the number of pairs of points is $(k+1)^2$. Therefore the average $A_k$ is $\dfrac{\sum_{i=0}^{i=k} S_i}{(k+1)^2}$
$\sum_{i=0}^{i=k} S_i = \dfrac L{2k} \sum_{i=0}^{i=k} ( 2i^2 - 2ik + k^2 + k ) $
$A_k = \dfrac L{2k(k+1)^2} \sum_{i=0}^{i=k} ( 2i^2 - 2ik + k^2 + k ) $
$A_k = \dfrac {2L}{2k(k+1)^2} \dfrac{k(k+1)(2k+1)}6 - \dfrac {2Lk}{2k(k+1)^2} \dfrac{k(k+1)}2 + \dfrac {L(k^2+k)(k+1)}{2k(k+1)^2} $
$A_k = \dfrac {L(2k+1)}{6(k+1)} - \dfrac {Lk}{2(k+1)} + \dfrac {L(k+1)}{2(k+1)} $
$A_k = \dfrac {L}{6(k+1)} (2k+1-3k+3k+3) $
$A_k = \dfrac {L}{3(k+1)} (k+2) $
$A_k = \dfrac L3 + \dfrac L{3(k+1)} $
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}{3(k+1)} = \dfrac L3 \space\blacksquare $