Suppose I have a point randomly located in circle 1 (blue), and a point randomly located in circle 2 (red). I would like to know the probability that the 2 points are within a threshold distance of each other. Any suggestions? Thanks.
This works quite well when the threshold distance is small (relative to the circle sizes):
probability = (A∩B/A) * (A∩B/B) * (PI*d^2/A∩B)
where:
- A is the area of circle 1
- B is the area of circle 2
- A∩B is the overlap area of circles A and B
- d is the threshold distance
But when d becomes close in size to the circle radii, the approximation breaks down. I can get a good estimate for the correct answer for r1, r2, and d by running a simple simulation (but this is too slow):
- place a point randomly in circle 1
- place a point randomly in circle 2
- keep track of the fraction of pairs that are within d.
Probably a refinement to the probability equation above would be sufficient.
Thanks for reading!