Then a and b are independent of each other and obey the uniform distribution on [0, a].
The distribution function is f (x) = 0, x.
The distance between two points X=|A-B|=max(A, B)-min(A, b)
EX=Emax(A,B)-Emin(A,B)。
The distribution function of max(A, b) is g (x) = [f (x)] 2, from which Emax(A, B)=2a/3 can be obtained.
The distribution function H (x) of min(A, b) is 1-[ 1-f (x)] 2, from which Emin(A, B)=a/3 can be obtained.
EX=Emax(A,B)-Emin(A,B)=a/3。