1
$\begingroup$

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}]
]

enter image description here

$\endgroup$
  • 2
    $\begingroup$ 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$. $\endgroup$ – sudeep5221 Aug 1 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.