Re: Distribution of the length of a random segment in an interval



On Aug 13, 2:09 am, Adan Mithrillion <diablodestruct...@xxxxxxxxx>
wrote:
Hint:
Presumably x1 and x2 are independent and uniformly distributed on the
interval.  Then P(|x1 - x2| <= r) is the area of a certain region of the
unit square.  Draw a picture...

Thanks. Now I understand. I heard that the same problem in a two
dimensional case (length of a random segment in a square) is much more
complicated. Is that true?

Given two oriented rectangles
(rectangles with sides parallel to the x and y axes),
choose two random points, one from each,
and find the distribution of the distance
(or, more conveniently, the square of the distance)
between the two points.

That squared distance can be represented as
(c1+a1*U1+b1*U2)^2+ (c2+a2*U3+b2*U4)^2
with U1,U2,U3,U4 independent uniform in [0,1)
and c1,a1,b1,c2,a2,b2 constants,
possibly negative or positive,
depending on whether the rectangles are
disjoint, overlap a little or completely.

It is possible to express the general solution
as the density of the random variable
(c1+a1*U1+b1*U2)^2+ (c2+a2*U3+b2*U4)^2
by means of repeated calls to two functions:
g(x,z,r,s)=x-2*r*sqrt(z-x)+2*s*sqrt(x)+r*s*arcsin(2*x/z-1)
and
G(x,y,z,r,s)=if x>=y then 0 else g(y,z,r,s)-g(x,z,r,s)
applied to (up to 64) segments of suitable
spline-like functions.

Real-life applications arise in many areas such as
operations research, urban planning, population studies,
physical chemistry, chemical physics and materials science.

Details arising from talks I gave on this at
The National Bureau of Standards in 1972
are given, with a Fortran program, in the article:

Marsaglia, Narasimhan and Zaman,
"The distance between random points in rectangles"
Communications in Statistics--Theory and Methods
v 19, n 11 4199-4212 1990.

Unless one's library has such old bound journals,
or the library has a subscription agreement for
online access, it will cost $37 to download
a pdf version.
I havn't yet dug up the TeX file that led to the
published article, but I might, and if so, would
respond to requests: geo@xxxxxxxx edu

George Marsaglia
.


Quantcast