# Uniform Continuous R.V. - Optimization

working on this problem:

A road construction company needs to decide where to place an emergency phone on a stretch of road of length L. Suppose that accidents can happen uniformly at random on this stretch of the road.Where should the phone be placed so that the expected distance from an accident to the phone is minimized? I.e., you need to find f such that E[|X - f|] is minimized.

Solution attempt:

So I understand that I need to graph out the P.D.F for this. Once I get the P.D.F, I can find the mean of the P.D.F, and then minimize E[|X - f|]. How would I approach finding the P.D.F of this problem? How would I minimize the expected value in this case?

Thank you.

-

If the phone is placed at position $f$, then $E [\vert X - f \vert ] = \int_{0}^{L} \vert X - f \vert dX$, which is $\frac{1}{2} ( f^2 + L^2 - Lf )$. By taking the derivative with respect to $f$, we see that the minimum occurs when $f = L/2$.

-