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

Click For 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:
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K