Square Line Picking
Square line picking is the selection of pairs of independent points, each sampled from the uniform distribution
over the interior of a square,
as the endpoints of a line segment. random line segments can be
picked in a unit square in the Wolfram
Language using the function RandomPoint[Rectangle[],
n,
2
].
Picking two points at random from the interior of a unit square, the average distance between them is
the
case of hypercube line picking, i.e.,
|
(1)
| |||
|
(2)
| |||
|
(3)
|
(OEIS A091505).
The exact probability density function is given by
|
(4)
|
(M. Trott, pers. comm., Mar. 11, 2004), and the corresponding distribution function by
|
(5)
|
From this, the mean distance can be computed, as can the variance
of lengths,
|
(6)
| |||
|
(7)
|
The statistical median is given by the unique root in
of the quartic equation
|
(8)
|
which is approximately .
The th
raw moment is given for
, 4, 6, ... as 1/3, 17/90, 29/210, 187/1575, 239/2079, ...
(OEIS A103304 and A103305).
If a pair of distinct sides of the unit square is chosen uniformly at random and one point is chosen independently and uniformly on each side, the average distance between the points is
|
(9)
| |||
|
(10)
| |||
|
(11)
| |||
|
(12)
|
(OEIS A091506; Borwein and Bailey 2003, p. 25; Borwein et al. 2004, p. 66).
See also
Box Integral, Cube Line Picking, Disk Line Picking, Hypercube Line Picking, Square Point Picking, Square Triangle Picking, Triangle Line Picking, Triangle Point PickingExplore with Wolfram|Alpha
References
Bailey, D. H.; Borwein, J. M.; Kapoor, V.; and Weisstein, E. W. "Ten Problems in Experimental Mathematics." Amer. Math. Monthly 113, 481-509, 2006b.Borwein, J. and Bailey, D. Mathematics by Experiment: Plausible Reasoning in the 21st Century. Wellesley, MA: A K Peters, 2003.Borwein, J.; Bailey, D.; and Girgensohn, R. Experimentation in Mathematics: Computational Paths to Discovery. Wellesley, MA: A K Peters, 2004.Sheng, T. K. "The Distance between Two Random Points in Plane Regions." Adv. Appl. Prob. 17, 748-773, 1985. https://doi.org/10.2307/1427086.Sloane, N. J. A. Sequences A091505, A091506, A103304, and A103305 in "The On-Line Encyclopedia of Integer Sequences."Trott, M. "The Mathematica Guidebooks Additional Material: Average Distance Distribution." https://www.mathematicaguidebooks.org/additions.shtml#S_1_14.Referenced on Wolfram|Alpha
Square Line PickingCite this as:
Weisstein, Eric W. "Square Line Picking." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/SquareLinePicking.html