0 like 0 dislike
0 like 0 dislike
Help with proof that median minimizes mean absolute error

2 Answers

0 like 0 dislike
0 like 0 dislike
2) If you want more details, you can explicitly write down the 2 cases:



Pair up data points from outside to the inside; if there is an odd one out, it's the data point in the middle. For each pair of point (a,b), then the minimum of the total absolute error |x-a|+|x-b| is minimized when x is between a and b. To minimize total absolute error, you can achieve that by minimize error to each pair, and also to the middle point if it exists. This is possible by choosing a point in between the innermost pair, and if there is a middle point, choosing that point.
0 like 0 dislike
0 like 0 dislike
1) Note that in the line above, when X>m, he showed Y>=m-a, not Y=m-a.

2) Multiplying by I is essentially the same as conditioning on X<=m, because that's what I is. YI=Y(1)=Y=a-m when I occurs, and YI=0 otherwise. Similar for the other term.

No related questions found

24.8k questions

103k answers


33.7k users

OhhAskMe is a math solving hub where high school and university students ask and answer loads of math questions, discuss the latest in math, and share their knowledge. It’s 100% free!