Tuesday, January 14, 2025

An interesting Probability problem

I recently came across an interesting problem concerning the probability of a random sphere lying inside an unit ball in stackexchange.

The solution methodology was so fascinating that inspired me to come up with the following, almost similar, problem: Given a triangle and three points selected uniformly randomly from the triangle, what is the probability that the circle passing through those points lie completely inside the triangle?

We can characterise the three points the same way as in the SE post. Then,

$\displaystyle\mathbb{P}(\text{circle inside triangle})=\frac{1}{A^3}\iiint\limits_{\sqrt{x^2+y^2}+r \in \triangle}\,dx\,dy\,dr\int\limits_0^{2\pi}\int\limits_0^{2\pi}\int\limits_0^{2\pi}\frac{\partial (x_1,y_1,x_2,y_2,x_3,y_3)}{\partial (x,y,r,\phi_1,\phi_2,\phi_3)}\,d\phi_1\,d\phi_2\,d\phi_3$

where $A$ is the area of the given triangle $\triangle$ and the coordinates $(x,y)$ are w.r.t some arbitrary origin.

The integral involving $\phi$'s can be handled the same way as shown in the SE post which reduces the above expression to,

$\begin{align}\displaystyle\mathbb{P}(\text{circle inside triangle}) &= \frac{1}{A^3}\cdot (2\pi)^3\cdot 2 \cdot \frac{3}{2\pi}\iiint\limits_{\sqrt{x^2+y^2}+r \in \triangle}r^3 \,dx\,dy\,dr \\ &= \frac{24\pi^2}{A^3}\iiint\limits_{\sqrt{x^2+y^2}+r \in \triangle}r^3 \,dx\,dy\,dr \\ \end{align}$

If we now choose the incenter of the triangle to be the origin and $R$ to be inradius of the triangle, then the integral above w.r.t $\,dx\,dy$ is just the area of the set of points that are at the distance of $r$ inward from the triangle. But that is just the same triangle scaled such that its inradius is $R-r$. That is,

$\displaystyle \iint\limits_{\sqrt{x^2+y^2}+r \in \triangle}\,dx\,dy=\left(1-\frac{r}{R}\right)^2\cdot A$

Therefore,

$\begin{align}\displaystyle\mathbb{P}(\text{circle inside triangle}) &= \frac{24\pi^2}{A^3}\int\limits_0^R \left(1-\frac{r}{R}\right)^2\cdot A\,dr \\ \end{align}$


$\displaystyle \mathbb{P}(\text{circle inside triangle}) = \frac{2}{5}\left(\frac{\pi R^2}{A}\right)^2$

A similar approach can be used to find the probability that a circle formed by choosing two points uniformly randomly inside a triangle completely lies within the triangle. In this case,

$\displaystyle \mathbb{P}(\text{circle inside triangle}) = \frac{2}{3}\frac{\pi R^2}{A}$

It should be easy to see from here that the above formulas, in fact, works for any tangential polygon. If we take it a step further, the same approach can be made to work for any closed convex curve. The only tricky part is the integral w.r.t '$\,dx\,dy$' which would now be the area enclosed by the 'inward' parallel curve of the given curve, which is not terribly difficult but isn't straightforward either.

An equally interesting but a tad more challenging problem is the following: Choose two points uniformly randomly inside a given triangle. If we now construct the square with the line joining the chosen points as the diagonal, what is the probability that the square lies within the triangle?

We'll see this problem in a separate post. If you figure out the answer, please share it with us in the comments section below.


Until then
Yours Aye
Me