For an equilateral triangle whose sides have length s, if I choose a point P with a uniform probability from one side of the triangle and let X denote the distance from P to the opposite vertex, how would I find the probability density function and cumulative density function for X?
This was an old problem I did for a class that I forgot how to do, and cannot make any headway.
This has been modified. I had not taken into account that there are 2 values for the distance along the line (u below) for each distance from the point to the vertex (d below). Because the distribution is uniform, the problem can be simplified to a 1-1 problem by using values of u in the first half of the line and douubling the density function.
To simplify, I will assume s=1. Using analytic geometry simplifies the calculation. Place the side with the point on the x axis and the vertices at the origin and at x=1. The coordinates of the other vertex are $(\frac{1}{2},\frac{\sqrt{3}}{2})$. Let u be the random point on the first half of bottom line. Then the distance d from that point to the vertex is given by $d^2=(u-\frac{1}{2})^2+\frac{3}{4}$ The cdf is then $P(d<D)$ or $P((u-\frac{1}{2})^2+\frac{3}{4}<D^2)$ or $P(u<\frac{1}{2}-\sqrt{D^2-\frac{3}{4} })$.
Since u is uniformly distributed between 0 and 1/2, $P(d<D)=1-2\sqrt{D^2-\frac{3}{4} })$. Note that $\frac{\sqrt{3}}{2}\lt D\lt 1$.