# Probability of a point lying inside a square which is inscribed in a circle

CD and EF are two diameters of the circle shown in image and CEDF is a square inscribed in the circle. If a point inside the circle is randomly chosen what is the probability that the point will lie inside the square?

• Welcome to Math.SE. You'll get a much warmer response from the community if you show what you've tried. – John Sep 27 '18 at 19:31
• Assuming that randomly means according to a uniform distribution the answer is simply given by the ratio between the area of the square and the area of the circle, i.e. $\frac{2}{\pi}$. – Jack D'Aurizio Sep 27 '18 at 19:33
• I tried to find the probability by dividing the area of the square by the area of the circle which results a probability of 2/pi . Am I correct? Or the process is not like how I've tried. – Abdullah Shahriar Sep 27 '18 at 19:35
• @AbdullahShahriar That's how you do it! – John Sep 27 '18 at 19:43
• It depends on how rigorous (pedantic) you want to define "random" is. I think it is safe to assume the do mean probability is proportional to area so the probability is $\frac {A(square)}{A(circle)}$. The only real trick is determining the area of a square by its diagonal radius of the circle, but it's not hard so see that is $2r^2$ so we have $\frac 2{\pi}$. So, yes, I'd say you have the correct answer. – fleablood Sep 27 '18 at 19:44

Here are some hints.

A common length of the square and the circle is the radius of the circle. If the radius of the circle is $$1$$, what is the area of the square?

The probability will be the ratio of the two areas.

Spoiler:

If the radius of the circle is $$1$$, then its area is $$\pi$$. If half of the diagonal of the square is $$1$$, then its side is $$\sqrt{2}$$ (think isoceles right triangle), making its area is $$2$$, and the probability is the ratio of the two areas, $$2/\pi$$.

• This is how I've tried to find out the probability and the answer I found is 2/pi. I'm interested to know another thing here. If I try this experiment in real life for a million times, will the probability be close to 2/pi? – Abdullah Shahriar Sep 27 '18 at 19:42
• " If I try this experiment in real life for a million times, will the probability be close to 2/pi?" In theory. Do you have doubts? you might want to consider if you paint dots on the x-y plain each $\frac 1{1000}$ units apart so that there are a million dot's in the square how many dots will be in the circle? And if you pick dots at random.... – fleablood Sep 27 '18 at 19:52
• I wrote a program in Python to calculate the probability for a million random pairs (which lies inside the circle) and tried to find the value of pi from the probability. But almost always I'm getting 2.14 as a result. This means the probability is not close to our theoretical value, what is causing this deviation? – Abdullah Shahriar Sep 27 '18 at 20:05
• @AbdullahShahriar Hard to know without looking at your code (that's probably best suited for Stack Overflow) but $2.14$ does look an awful lot like $\pi - 1$ ... – John Sep 27 '18 at 21:03