# Probability distribution functions for the perimeter and space of triangle with fixed radius

Given a circle with radius R = 1, I'm trying to find either the probability distribution function or the density function for the space of triangle, which is randomly selected on this circle. The same task is for perimeter function of this triangle.

The only thing I've understood is the following. If we fix some point R on the circle, then angles ROA, ROB, ROC (counterclockwise) are uniformly distributed on [0; 2 * Pi]. I've tried expressing the space and the perimeter through those angles, but still had no success.

I would appreciate any help, really. I've tried to solve this problem for three weeks, and it seems to me that soon those triangles and circles will begin to come into my night dreams. Thanks.

-
I get the impression there won't be a nice answer to this. There are various ways of expressing the area and the perimeter in terms of the angles, and you can get e.g. the average area, $3/(2\pi)$, by integrating over the angles, but as far as I'm aware, in order to get the distribution, you'd have to solve for one of the angles, and I invariably get ugly fourth-order equations when I do that. –  joriki Dec 17 '11 at 18:15

Let's denote the angles BOC,AOC,AOB by $\alpha,\beta,\gamma$. If you knew the distributions of these angles, then elementary geometry would tell you that the length of the segment BC is $2\sin\left(\frac{\alpha}{2}\right)$, the length of AC is $2\sin\left(\frac{\beta}{2}\right)$,and that of AB is $2\sin\left(\frac{\gamma}{2}\right)$. So the only problem now is understanding what is the distribution.

WLOG, assume that $A$ is chosen on the $x$-axis, i.e. on $R$ in your drawing. Choosing $B,C$ is equivalent to choosing two angles $x,y$, uniformly distributed on $(0,2\pi)$. Then \begin{align} \gamma&=\min(x,y)\\ \beta &=2\pi-\max(x,y)\\ \alpha&=|x-y|=2\pi-\beta-\gamma \end{align}

From symmetry, you know that the distributions of $\alpha,\beta,\gamma$ are the same. so let's look at the distribution of $\alpha$. The CDF is given by $P(\alpha<z)=P(x<z \mbox{ and } y>x) + P(y<z \mbox{ and } x>y)$ Let's find that probability in graphic way, because this is always instructive. This region in the $xy$ space is drawn in the figure,

The blue region is $x<y$ and the green region is $x<z$. Since $x,y$ are uniformly distributed, the probability of this event is the area of the triangle, normalized by the total area, that is $$P(\alpha<z) = 2 \left(\frac{\frac{1}{2}z^2}{4\pi^2}\right)$$ And from now on it's straight forward (but remember that $\alpha,\beta,\gamma$ are not independent)

-
I don't see how anything is straightforward from there. That the angles aren't independent is part of the problem. Another part of the problem is that the distributions for the area and perimeter are integrals over these angle distributions with variable integration limits and potentially complicated derivatives in the integrand. It seems to me you've only done the easy part. –  joriki Dec 17 '11 at 17:45
Maybe you're right. I didn't really think about the other part, because I understood from the question that the problem was understanding the distributions. –  yohBS Dec 17 '11 at 21:46

I get the area to be $$2\sin\left(\frac{X_1}{2}\right)\sin\left(\frac{X_2}{2}\right) \sin\left(\frac{|X_1 - X_2|}{2}\right)$$ where $X_1$ and $X_2$ are independent random variables uniformly distributed on $[0, 2\pi)$ but I don't foresee an easy calculation to get the distribution of the area either. As joriki says, the problem does not seem to have a "nice" answer.

Let A be a fixed point on the circle of radius $1$ and let point B be at distance $X$ measured clockwise along the circle boundary from A. Then, the chord AB has length $L = 2\sin(X/2)$ and if $X$ is uniformly distributed on $[0,2\pi)$, then for $z \in [0, 2)$. the CDF and pdf of $L$ are \begin{align*} F_L(z) &= \frac{2}{\pi}\arcsin\left(\frac{z}{2}\right),\\ f_L(z) &=\frac{1}{\pi\sqrt{1-(z/2)^2}}. \end{align*} See for example, here for a derivation. The angle between the tangent at A and the chord AB is $X/2$. If $C$ is also chosen similarly, then the triangle has sides AB and AC of lengths $L_1$ and $L_2$ having angle $(\max\{X_1,X_2\} - \min\{X_1.X_2\})/2$ at A. So the area of triangle ABC is \begin{align*}\text{area ABC} &=\frac{1}{2}L_1L_2\sin((\max\{X_1,X_2\} - \min\{X_1.X_2\})/2)\\ &= 2\sin\left(\frac{X_1}{2}\right)\sin\left(\frac{X_2}{2}\right) \sin\left(\frac{\max\{X_1,X_2\} - \min\{X_1.X_2\}}{2}\right)\\ &= 2\sin\left(\frac{X_1}{2}\right)\sin\left(\frac{X_2}{2}\right) \sin\left(\frac{|X_1 - X_2|}{2}\right) \end{align*}

-

Here are numerically obtained plots of the distributions:

Red is the area, green is the perimeter; both plots are scaled such that the maximal possible value, $3\sqrt3/4$ for the area and $3\sqrt3$ for the perimeter, is at the right-hand edge. Note the singularities at area $0$ and perimeter $4$, the latter corresponding to a degenerate triangle on a diameter of the circle.

I calculated these by fixing one point and equidistantly sampling the other two points at $10,000$ values each.

-

Fix any point $R$. Let $\phi_1$, $\phi_2$ and $\phi_3$ be angles, relative to $R$, then $0 < \phi_1 < \phi_2 < \phi_3 < 2 \pi$, i.e the triple $\{\phi_1, \phi_2, \phi_3\}$ is the first, second and the third order statistics of the uniformly distributed angle on the interval $(0, 2\pi)$.

The area of the triangle, is then $$A = 4 \sin \left( \frac{\phi_2-\phi_1}{2} \right) \sin \left( \frac{\phi_3-\phi_2}{2} \right) \sin \left( \frac{\phi_3-\phi_1}{2} \right)$$ and the perimeter $$p = 2 \left( \sin \left( \frac{\phi_2-\phi_1}{2} \right) + \sin \left( \frac{\phi_3-\phi_2}{2} \right) + \sin \left( \frac{\phi_3-\phi_1}{2} \right) \right)$$ Given that $\frac{\phi_3 -\phi_1}{2} = \frac{\phi_3 -\phi_2}{2} + \frac{\phi_2 -\phi_1}{2}$, let $\alpha = \frac{\phi_2-\phi_1}{2}$ and $\beta = \frac{\phi_3-\phi_2}{2}$, then $$A(\alpha, \beta) = 4 \sin \alpha \sin \beta \sin (\alpha+\beta) \qquad p(\alpha, \beta) = 2 \left( \sin \alpha + \sin \beta + \sin (\alpha+\beta) \right)$$ The distribution of $\alpha$ and $\beta$ are not hard to find. Indeed, distribution of $\phi_1$, $\phi_2$ and $\phi_3$ ($[\chi]$ stands for Iverson bracket): $$\mathrm{d} F(\phi_1, \phi_2, \phi_3) = \frac{3!}{(2 \pi)^3} \Big[ 0 < \phi_1 < \phi_2 < \phi_3 < 2 \pi \Big] \mathrm{d} \phi_1 \mathrm{d} \phi_2 \mathrm{d} \phi_3$$ Changing variables to $\alpha = \frac{\phi_2-\phi_1}{2}$, $\beta=\frac{\phi_3-\phi_2}{2}$ and $\gamma = \frac{1}{3} \left( \phi_1 + \phi_2 + \phi_3 \right)$ we get, noting that the Jacobian equals $4$, $$\mathrm{d} F(\alpha, \beta, \gamma) = \frac{3!}{(2 \pi)^3} \Big[ 0 < \alpha < \pi, 0 < \beta < \pi-\alpha, \frac{4 \alpha + 2 \beta}{3} <\gamma< 2\pi - \frac{2 \alpha + 4 \beta}{3} \Big] \cdot 4 \cdot \mathrm{d} \alpha \, \mathrm{d} \beta \, \mathrm{d} \gamma$$ Integrating over $\gamma$ we find the joint pdf for $(\alpha, \beta)$: $$\mathrm{d} F\left(\alpha,\beta\right) = \frac{3!}{\pi^3} \left( \pi - \alpha - \beta \right) \Big[ 0 < \alpha < \pi, 0< \beta < \pi - \alpha \Big] \, \, \mathrm{d} \alpha \, \mathrm{d} \beta$$ This means that $\left\{ \frac{\alpha}{\pi}, \frac{\beta}{\pi} \right\}$ follows Dirichlet distribution with parameters $\{1,1,2\}$.

Using the interpretation in terms of the Dirichlet distribution, it is not hard to determine the mean and the variance of the area and the perimeter:

-
If you fix the first point to be on (0,1), the triangle is completely described by the two angles $x,y$ that I described before. Elementary geometrical calculations show that the area of this triangle is $$A(x,y)=\frac{1}{2}\left|\sin(x)-\sin(y)-\sin(x-y)\right|$$ and the perimeter is given by $$\ell(x,y)=2\left[\sin\left(\frac{x}{2}\right)+\sin\left(\frac{y}{2}\right)+\sin\left(\frac{\left|x-y\right|}{2}\right)\right]$$ Here are the contour plots of these functions. Area:
The contour curves themselves can be calculated analytically, but I couldn't integrate them to arrive at the CDF. However, you can numerically calculate the CDF/PDF from these contour plots: $P(A<a)$ is exactly the area outside the contour $A=a$, and the same can be done for $\ell$. Thus you do not need to revert to random sampling, and your problem reduces to numeric integration, which can be preformed at arbitrary precision. Here is the result for $\ell$, which is of course identical to that of joriki.