
Average Distance Between Two Random Points in a Square

What’s the average distance between two randomly and uniformly chosen points in a unit square? That is, given a unit square
To find the average distance, we first use Cartesian coordinates to express the distance between the points. The distance can be expressed using Pythagorean Theorem:
Given the distance formula between the two points, the average distance is actually the quadruple integral of
Notice that the quadruple integral has four variables, we can simplify it by viewing
the region
Since PDF is the derivative of CDF:
Therefore the average distance can be expressed as:
using polar coordinates substitution
then the Jacobian Matrix is:
therefore,
we’ll then use integral of the secant cubed:
hence,
similarly, average distance between two random points in a cube is:
Further Reading
- Title: Average Distance Between Two Random Points in a Square
- Author: Aaron Lee
- Created at : 2025-02-03 00:00:00
- Updated at : 2025-02-04 00:19:15
- Link: https://kunying-lee.github.io/2025/02/03/Average-Distance-Between-Two-Random-Points-in-a-Square/
- License: This work is licensed under CC BY-NC-SA 4.0.