# Probability distribution of the interior angle of a random triangle

Consider a triangle ABC, the coordinates of its three vertices are $$(x_i,y_i)$$, where $$x_i \sim \rm{uniform}(0, 1) , y_i \sim \rm{uniform}(0, 1)$$.

Choose an angle ∠A, how to solve its expectation and probability distribution?

Numerical simulation shows that the expectation is about 1.047, any idea?

data = VectorAngle[#1 - #2, #1 - #3]& @@@ RandomReal[1, {1*^6, 3, 2}];
Show[
Histogram[data, 10, "PDF", ChartElementFunction -> "GradientScaleRectangle"],
Plot[2 / (2 + Pi) (Sqrt[2] E^(-((2 x^2) / Pi)) + 1 / Pi), {x, 0, Pi}]
]


• For expectation, you can note that by symmetry the expectation of all the angles will be the same. Since their sum is always $\pi$, the expected value of each of them would be $\pi/3 \approx 1.047$. – sudeep5221 Aug 1 at 13:57