How can I find the minimum value for the sum of absolute values?

AI Thread Summary
To minimize the sum of absolute values |Xi - V| for i=1,...,n, the optimal value of V is the median of the dataset, not the mean. For even n, V should be any value between the two middle values, X(n/2) and X(n/2+1). For odd n, V should be the middle value, X((n+1)/2). Squaring the differences and differentiating is not the correct approach for this problem. Understanding the relationship between V and the dataset is crucial for finding the minimum sum.
Jorge
Messages
2
Reaction score
0
Hello,


I have been having problems finding the way to minimize the sum of absolute values. Specificaly I am 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 approach to finding this minimum.

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

Thanks...
 
Mathematics news on Phys.org
So is Xi X times i?
 
Sorry about that,

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

Then it is Sum from i={1 to n }of |Xi-V|.
 
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:
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Back
Top