__U__sing Excel, the numbers are: 616, 637, 677 and 696. This sums to 2626. So the answer is 626.

/* I know this approach was not what you were looking for, but can't resist using Excel when I have a spreadsheet open. :-) */

See question on Quora

/* I know this approach was not what you were looking for, but can't resist using Excel when I have a spreadsheet open. :-) */

See question on Quora

This is mathematical proof, but I guess this is fairly intuitive too..

Line up the series of numbers from 1 to (n-1) once, and in reverse right below that:

1 + 2 + 3 + ...................+ (n-2) + (n-1)

(n-1) + (n-2) + (n-3) +..................... + 2 + 1

Adding these vertically, these are (n-1) pairs of n.... So the vertical sum is n*(n-1), and since this is twice the sum that we originally wanted.

So, required sum is n*(n-1)/2 or n choose 2.

See question on Quora

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:

- 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.
- Calculate the radius r of the circle by dividing the distance between Point1 and Point2 by 2
- Locate the center O of the circle by calculating the midpoint of Point1 and Point2.
- Calculate the length of OA, i.e. the distance between square center and circle center
- Define Success: Center of the square is with in the circle (r > OA). Assign 1 to success and 0 to failure
- Repeat the process a large number of times in excel and estimate the probability by dividing success count by iteration count.
- Press F9 a few times to refresh the data, and you will see that the probability is around 0.5
- (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