I wrote a computer program to simulate the minimum, average, and maximum distance between $2$ random points in a unit length cube (such as $1$ cubic foot). The minimum possible distance is $0$ and the maximum possible distance is about $1.73$ (Square root of $3$), but what I am wondering is why is the average distance somewhere around $0.66$? I am trying to figure out what is the relationship between that average distance and the max. For example, if we have points $(0,0,0)$ and $(1,1,1)$, that is a distance of about $1.73$, the maximum possible. If we instead have $(0,0,0)$, $(.5, .5, .5)$. That is a distance of about $0.866$.
All I am looking for here is some explanation of why the average distance is about $0.66$ units and what the relationship is to the max. A fair question is why is the average distance less than half of the max distance when it seems the average distance between each coordinate component (x,y,z) should be around $0.5$? I suppose if you assume the smaller of (x1,x2) is already more than $0.5$, then the max x difference will be less than $0.5$ so I assume it is related to the probability that one of more of the 3 dimensional point coordinates has a lower value already greater than $0.5$ (half of the unit size of the cube).
Perhaps this can be approximated by using probability that the lower value of all of x,y,z will be greater than or less than $0.5$ and also coming up with some type of average when only $1$ dimension changes and then extrapolating that to all $3$ dimensions. I was a little surprised when I got about $0.66$. I will get a good average, using $1$ billion pairs of points.