TOPICS
Search

Square Line Picking


Square line picking is the selection of pairs of points (corresponding to endpoints of a line segment) randomly placed inside a square. n 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 n=2 case of hypercube line picking, i.e.,

Delta(2)=1/(15)[sqrt(2)+2+5ln(1+sqrt(2))]
(1)
=1/(15)(2+sqrt(2)+5sinh^(-1)1)
(2)
=0.521405433...
(3)

(OEIS A091505).

SquareLinePickingDistribution

The exact probability function is given by

 P(l)={2l(l^2-4l+pi)   for 0<=l<=1; 2l[4sqrt(l^2-1)-(l^2+2-pi)-4tan^(-1)(sqrt(l^2-1))]   for 1<=l<=sqrt(2)
(4)

(M. Trott, pers. comm., Mar. 11, 2004), and the corresponding distribution function by

 D(l)={1/2l^4-8/3l^3+pil^2   for 0<=l<=1; -1/2l^4-4l^2tan^(-1)(sqrt(l^2-1))+4/3(2l^2+1)sqrt(l^2-1)+(pi-2)l^2+1/3   for 1<=l<=sqrt(2).
(5)

From this, the mean distance l^_=Delta(2) can be computed, as can the variance of lengths,

var(l)=1/(225)[69-4sqrt(2)-10(2+sqrt(2))sinh^(-1)1-25(sinh^(-1)1)^2]
(6)
=0.061469....
(7)

The statistical median is given by the root of the quartic equation

 1/2x^4-8/3x^3+pix^2-1/2=0,
(8)

which is approximately l^~=0.512003....

The nth raw moment is given for n=2, 4, 6, ... as 1/3, 17/90, 29/210, 187/1575, 239/207, ... (OEIS A103304 and A103305).

If, instead of picking two points from the interior of a square, two points are chosen at random on different sides of the unit square, the average distance between two points picked in this manner is

Delta_f(2)=2/3int_0^1int_0^1sqrt(x^2+y^2)dxdy+1/3int_0^1int_0^1sqrt(1+(y-u)^2)dudy
(9)
=1/9(2+sqrt(2)+5sinh^(-1)1)
(10)
=1/9[2+sqrt(2)+5ln(1+sqrt(2))]
(11)
=0.869009...
(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 Picking

Explore 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.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." http://www.mathematicaguidebooks.org/additions.shtml#S_1_14.

Referenced on Wolfram|Alpha

Square Line Picking

Cite this as:

Weisstein, Eric W. "Square Line Picking." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SquareLinePicking.html

Subject classifications