All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Two random points (Posted on 2018-04-26) Difficulty: 3 of 5
On a circumference of a given circle with a radius R two random points A & B are independently chosen.

What is the probability of AB being less than R ?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: There must be a reason for the D3 rating. | Comment 3 of 10 |
(In reply to There must be a reason for the D3 rating. by Charlie)

Here's a simulation of a possible non-uniform distribution being used in each of the independent randomizations:


The randomization uses a unit circle.  A random x coordinate is chosen between -1 and 1 and the y coordinate is one of the two points on the circle with that x coordinate, chosen with equal probability.

100,000 trials are done and the accumulated statistics reported every 10,000 trials:

4402/10000 = 0.4402
8689/20000 = 0.43445
13094/30000 = 0.436466666666667
17482/40000 = 0.43705
21829/50000 = 0.43658
26300/60000 = 0.438333333333333
30606/70000 = 0.437228571428571
35020/80000 = 0.43775
39395/90000 = 0.437722222222222
43785/100000 = 0.43785

The probability is about 43.8 %.

 For majLoop = 1 To 10
 Randomize Timer
 
 For tr = 1 To 10000
   xs1 = 4 * Rnd(1)
   code1 = Int(xs1)
   xv1 = xs1 - code1
   If code1 Mod 2 = 0 Then xv1 = -xv1
   yv1 = Sqr(1 - xv1 * xv1)
   If code1 \ 2 < 1.5 Then yv1 = -yv1
   
   xs2 = 4 * Rnd(1)
   code2 = Int(xs2)
   xv2 = xs2 - code2
   If code2 Mod 2 = 0 Then xv2 = -xv2
   yv2 = Sqr(1 - xv2 * xv2)
   If code2 \ 2 < 1.5 Then yv2 = -yv2
   
   dist = Sqr((xs1 - xs2) ^ 2 + (ys1 - ys2) ^ 2)
   If dist <= 1 Then hitCt = hitCt + 1
   trCt = trCt + 1
   DoEvents
 Next tr
 
 Text1.Text = Text1.Text & hitCt & "/" & trCt & " = " & hitCt / trCt & crlf
 Next majLoop




  Posted by Charlie on 2018-04-26 10:42:51
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information