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?


Byron has already answered your question, but I will attempt to provide a detailed solution…

Let X be a random variable uniformly distributed over [0,L], i.e., the probability density function of X is the following


Let us randomly pick two points in [0,L] independently. Let us denote those by X1 and X2, which are random variables distributed according to fX. The distance between the two points is a new random variable


Hence, we would like to find the expected value E(Y)=E(|X1X2|). Let us introduce function g


Since the two points are picked independently, the joint probability density function is the product of the pdf’s of X1 and X2, i.e., fX1X2(x1,x2)=fX1(x1)fX2(x2)=1/L2 in [0,L]×[0,L]. Therefore, the expected value E(Y)=E(g(X1,X2)) is given by


Source : Link , Question Author : Kenshin , Answer Author : Michael Hardy

Leave a Comment