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:
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top