Praveen Reddy Vaka and Anon-User have already demonstrated two mathematically correct ways of handling this. I will discuss a slightly less accurate, but a reasonably practical and relatively easy approach using Excel:

  1. Let the four square corners of the square sit at (0,0), (0,1), (1,0) and (1,1). So, the square center A will always be at (0.5,0.5). Now, take two random points by generating coordinates using Excel's rand() function, which generates a random number between 0 and 1, hence guaranteeing the coordinate to be within the square.
  2. Calculate the radius r of the circle by dividing the distance between Point1 and Point2 by 2
  3. Locate the center O of the circle by calculating the midpoint of Point1 and Point2.
  4. Calculate the length of OA, i.e. the distance between square center and circle center
  5. Define Success: Center of the square is with in the circle (r > OA). Assign 1 to success and 0 to failure
  6. Repeat the process a large number of times in excel and estimate the probability by dividing success count by iteration count.
  7. Press F9 a few times to refresh the data, and you will see that the probability is around 0.5
  8. (Optional) If you have access to any advanced too like @Risk from Palisade, you can automate step 6 for a number of times, and graphically see the probability converging around 0.5

A screenshot of my excel solution for this is included below:

See question on Quora

Tags:

Leave a Reply