Least absolute deviation for item prices

161 Views Asked by At

How would I calculate the values of $A,B,C$ using least absolute deviation?

$R = 1$

$2A + B$ = $C + R$.

$B + C$ = $5A$.

$A + C + 2R$ = $B + 4R$.

$A + B + C$ = $6.33R$.

Using least squares approximation, I was able to get the approximate solutions:

$A = 1.0440R$

$B = 2.1155R$

$C = 3.1375R$

Is it possible to use least absolute deviation? If so how?

1

There are 1 best solutions below

0
On BEST ANSWER

Here is a method to calculate the least absolute deviation solution that goes back at least to Gauss (see Least Absolute Deviations). Please note that the least absolute deviation solution is rarely unique (one of the differences to linear least squares).

Your over-determined linear equation system is given by $Ax=b$ with:

$$A = \left( \begin{array}{ccc} 2 & 1 & -1 \\ -5 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 1 & 1 \end{array} \right) ~~~~~\textrm{and}~~~~~~ b = \left( \begin{array}{ccc} 1 \\ 0 \\ 2 \\ 6.33 \end{array} \right)$$

There is a a least absolute deviation solution that is given by $A_Sx=b_S$ where $A_S$ and $b_S$ are given by picking $3$ rows of the system. There are $\binom{4}{3}=4$ such possibilities. Pick some solution of these four possibilities where $\|Ax-b\|_1$ is minimal.

Here they are

$x_{123} = A_{123}^{-1}b_{123} = (1.0000,2.0000,3.0000)^T$

$x_{124} = A_{124}^{-1}b_{124} \approx (1.0550,2.0825,3.1925)^T$

$x_{134} = A_{134}^{-1}b_{134} \approx (1.0000,2.1650,3.1650)^T$

$x_{234} = A_{234}^{-1}b_{234} \approx (1.0550,2.1650,3.1100)^T$

$\|Ax_{123}-b\|_1\approx 0.3300$

$\|Ax_{124}-b\|_1\approx 0.1650$

$\|Ax_{134}-b\|_1\approx 0.3300$

$\|Ax_{234}-b\|_1\approx 0.1650$

So picking either the rows $124$ or $234$ from your system gives you an optimum.