Calculating Least Absolute Error

42 Views Asked by At

Given a set of data and a linear function f(x) what is the least absolute value of error i.e $$\sum_{i=0}^n|a_i - F(x) | $$ i can obtain?? for eg given 3 ,4 ,5....what would be the least value of $$|3-f(x)|+|4-f(x)|+|5-f(x)| $$ f(x) is a linear increasing function which is minimum at i = 0 , data is random & |x| is abs(x)