Least Squares approximation for item prices

63 Views Asked by At

Let's say that $A$, $B$, $C$ are different items with different values.

$R$ is a unit of currency, for simplicity I'll let it be $1$. Traders frequently trade these items on an open market. Price is determined by the laws of supply and demand.

$2A + B$ was exchanged for $C + R$.

$B + C$ was exchanged for $5A$.

$A + C + 2R$ was exchanged for $B + 4R$.

$A + B + C$ was exchanged for $6.33R$.

How is the approximate price (good deal) of each item calculated? Is using Least Squares approximation appropriate? I would have three separate equations. How would I do so?

I don't remember having learned Least Squares approximation, but I read this PDF and this page and it seemed like I can use it.

2

There are 2 best solutions below

0
On BEST ANSWER

Okay, having not learned about Least Squares Approximation, it took me awhile.

This paper helped a bunch.

Thus:

$ A = \left| \begin{array}{ccc} 2 & 1 & -1 \\ -5 & 1 & 1 \\ 1 & -1 & 1 \end{array} \right|$

$ x = \left| \begin{array}{ccc} A \\ B \\ C \end{array} \right|$

$ b = \left| \begin{array}{ccc} 1 \\ 0 \\ 2 \end{array} \right|$

$Ax = b$

Using the normal equation for least squares:

$(A^T A) x = A^Tb$

I was able to get the values:

$A = 1.0440R$

$B = 2.1155R$

$C = 3.1375R$

0
On

Solve all three for $R$

Then you will have $R = Mw$ Where $M$ is a matrix and $w$ is the weighting of each item relative to $R$.

Your example is three equations and three unknowns so only invert the matrix $M$

if more equations than unknowns you must take the pseudo inverse of $M$.