What is the probability that a randomly drawn chord will be longer than the radius of the circle?
Prove it.
(In reply to
You're right! by Benjamin J. Ladd)
Perhaps you could post your program. If the method of randomization is to choose two random points on the circle, or one fixed point and one random point, then the probability should indeed be 2/3. The following program simulates the negative value, that the chord length is less than the radius and comes out with a probability close to 33%:
RANDOMIZE TIMER
FOR i = 1 TO 100000
pt1 = RND(1)
pt2 = RND(1)
dist = ABS(pt1 - pt2)
IF dist < 1 / 6 OR dist > 5 / 6 THEN hit = hit + 1
ct = ct + 1
NEXT
p = hit / ct
q = 1 - p
PRINT USING "#.##### "; p; SQR(ct * p * q) / ct
A run produced:
0.33283 0.00149
indicating that indeed about 1/3 of the time the two points were within 60 degrees (1/6 of the full circle) of each other. The second number is the std error of the mean of the probability.
In fact, if the number of iterations is raised to 1,000,000, I get:
0.33354 0.00047
Note, if posting a program, leading spaces should each be converted to (I use a program to do this.)
|
Posted by Charlie
on 2003-11-17 15:58:59 |