What is the probability that a randomly drawn chord will be longer than the radius of the circle?
(In reply to re: You're right!
In the case of the random chords being chosen by taking a random point within the circle and using that as the midpoint of the chord, the following program simulates that:
critDist = SQR(3) / 2
FOR i = 1 TO 100000
x = 2 * RND(1) - 1
y = 2 * RND(1) - 1
dist = SQR(x * x + y * y)
IF dist < 1 THEN
IF dist < critDist THEN hit = hit + 1
ct = ct + 1
p = hit / ct
q = 1 - p
PRINT USING "####### "; hit; ct;
PRINT USING "#.##### "; p; SQR(ct * p * q) / ct
In this case the positive case is reported (prob of chord length greater than radius). It is reported as
58866 78570 0.74922 0.00155
with the first two numbers signifying 58866 hits out of 78570 tries (as in some cases the random points were not even in the circle and thus not counted). The probability does match the 3/4 you had specified in a prior post.
Posted by Charlie
on 2003-11-17 16:11:15