# Expected distance between two points on randomly selected line segment

My question is similar to a question answered before many times, namely the expected distance of L/3 between two random points on a line segment (Average Distance Between Random Points on a Line Segment)

However, I would like to add the prerequisite of starting by having an infinite line with infinite points on it. After picking a line segment at random and observing it contains two points, what is the expected distance between these points now?

I think the answer is L/2, since you choose the line segment after defining the points, which makes the expected length of the head and tail of the segment both L/4 and the distance between the points L/2.

Let's suppose you start somewhere on the infinite line and insert points along it as a Poisson process with some rate $$\lambda$$. You then choose various arbitrary line segments of length $$L$$ in the part covered by the Poisson process (these line segments do not have to be random, but they do have to be independent of the Poisson process)
The expected number of points in a line segment is then $$\lambda L$$, which could be large or small, but no matter. If you condition on there being two points on the line segment, then you are back to your original linked question with the two points being uniformly distributed on the line segment or at least the ordered equivalent of this. So I would agree with your friend
More generally, conditioning on there being $$n \gt 1$$ points on the line segment, you get the expected average distance between successive points being $$\frac{L}{n+1}$$. The sub-segments before the first point and after the last point have the same distribution as the $$n-1$$ sub-segments between successive points and so the symmetry argument still applies. This is the consequence of this being a memoryless Poisson process; other processes could produce different results