Find the expected value from a point to three edges of a right triangle. Given a right triangle with a, b, c are the lengths of three edges. Here $a^2=b^2+c^2$. A point is randomly chosen inside the right triangle. Find the expected value of the sum of the distances from the point to three edges.
 A: I have assumed that $a,b$ are the sides which are not the hypotenuse. (Clarified thanks to a comment)
Assume the side $a$ is along the $y$ axis, side $b$ along the $x$ axis. 
Then, the triangle is bounded $x=0$, $y=0$ and $y=-(a/b) x + a$. Call this region $R$, and the probability distribution of how you pick the points $p(x,y)$. 
The distance from the point to the left edge is $x$. The distance from teh point to the bottom edge is $y$. The distance from the point to the hypotenuse is given by the point-line distance in 2d formula : for the line $ax+by+c=0$, the distance from the point $(x_0,y_0)$ to the line is $\frac{|a x_0 + b y_0 + c|}{\sqrt{a^2+b^2}}$ [note that this is not the same $a,b,c$ as the triangle sides]. Apply this to get the distance from the point in $R$ to the line $y=-(a/b) x + a$. 
If you want the sum distances, then you simply need to note $E[\text{sum distance}] = E[X + Y + \text{distance to hypotenuse}] = E[X] + E[Y] + E[\text{distance to hypotenuse}]$, and $E[\text{blah}] = \int_R \text{blah} p(x,y) dx dy$. 
If you want the minimum distance, split $R$ into points which are closest to each side by drawing medians and figuring out which region consists of points closest to which side (giving $R$ as the union of regions $R_a , R_b, R_c$), then $E[\text{min distance}] = \int_{R_a} x p(x,y) + \int_{R_b} y p(x,y) +\int_{R_c} \text{distance to hypotenuse} p(x,y)$. 
