Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Least absolute minimization

  1. Feb 23, 2006 #1

    I have been having problems finding the way to minimize the sum of absolute values. Specificaly im looking for the value of X that will minimize the sum|Xi-V|<-- i=1,....n . I know that V should be equal to the mean value of X. But I do not know the correct aproach to finding this minimum.

    Can I square the Xi-V and differentiate? or is there another approach?

  2. jcsd
  3. Feb 23, 2006 #2


    User Avatar
    Science Advisor

    So is Xi X times i?
  4. Feb 23, 2006 #3
    Sorry about that,

    i---> is the sub index. Meaning X1....Xn.

    Then it is Sum from i={1 to n }of |Xi-V|.
  5. Feb 23, 2006 #4


    User Avatar
    Science Advisor

    Well then that expression is completely independent of the value of X. Do you mean you are looking for a V to minimize that expression? If you are then you can let V be any value between X(n/2) and X(n/2+1) if n is even, and you can let V be X((n+1)/2) if n is odd.
    Last edited: Feb 23, 2006
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook