Send to a Friend
Is there a simple proof for this?
Asked by LostInParadise (31917)
March 14th, 2012
I saw this problem on Yahoo Answers. It seems that it should be true intuitively, but I have difficulty in proving it.
Given n values of Xi, define f(x) = sum(|Xi – x|)
Show that f(x) is minimal for x = median value of Xi
It is tempting to try to differentiate this, but the absolute value causes difficulties.
I was able to prove this for the special case where x is one of the Xi. I can show that f(X(i+1)) – f(Xi) = (2i – n)(X(i+1) – Xi).
X(i+1) – Xi is always positive and 2i – n is negative for Xi below the median and positive for Xi at or above the median. Even this limited proof took more work than this seems to require. Can you come up with something more general?
Using Fluther
or