Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
up vote 0 down vote accepted

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$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.