3

Aka there might be a simple name for that question, but here goes:

So I'm trying to score objects on certain parameters, one of which is price. The way I calculate the score is I multiply each parameter together. Pretty simple stuff.

Ex: score = Param1 * Param2 * Param3 * Param4 * price

Each parameter could individually be assigned an exponent (ranging from 0.5 to 3.5 to give it more or less weight in the equation). I do not know if that influences the complexity of what I am asking for.

Now, I have an ordered list where items are filtered from descending score. All parameters are set in stone, but price might vary; each item's price could potentially be discussed.

Ordered item list by score

What I'm trying to do is to suggest a bargained price for each item so it matches the item with the highest score.

enter image description here

For the moment, those 3 suggested prices have been manually found (and aren't very accurate of course).

The idea is that basically, an item might be worth giving priority over a higher ranked item if we can manage to bargain a good price. We're on the buyer side, so better score means cheaper price.

So the final question is: what equation(s) do I need to come up with to find a price whose score would match the best score ?

Edit: I should've explained things a bit more clearly, sorry about that. I thought the following wouldn't have any impact on what I was asking, but it does seeing the answers.

Turns out I misled the question by withholding some information regarding the parameters; they are all composites, ranging from 0 to positive infinite. The way I calculate them is based on certain criteria so that they don't go too far off the 0.5 - 2.5 range. This holds true for the price parameter as well. If it goes above a certain threshold, I return the following value:

$\left(\frac{threshold}{price}\right)^5$

Given a threshold of $5000$ and a price of $5700$, the returned value will be $0.88$. The 5th exponent is there to make each dollar above the threshold have a more dramatic effect on the total score.

On the other hand, if the price is below the threshold, the composite is calculated in the following manner:

$\frac{threshold}{price}$

So either a parameter increases the score, or it decreases it slightly (since they're all multiplied between each other).

As an example, here's the formula with the item with the highest score's parameters:

$1.5 * 1.99 * 450.00 * 1.44 * 1.18 = 2272$

And one with a lower score (due to the item's higher price):

$2.00 * 2.92 * 350.00 * 1.00 * 0.88 = 1790$

As you can see, it could've score higher if it weren't for its steeper price. That's why I'm trying to find a formula that suggest a price to make the item worth it. So as the buyer, you could try and discuss to get to that price.

Skwiggs
  • 83
  • My calculations yielded $1.5 * 1.99 * 450.00 * 1.44 * 1.18 = 2282.4504\ne 2272$ and $2.00 * 2.92 * 350.00 * 1.00 * 0.88 = 1798.72\ne 1790$. – Alex Ravsky Jul 26 '17 at 11:29
  • Well, this is odd. I did it too with calculator and indeed you're right. 2272 (rounded) comes straight from my Google Spreadsheet. Weird – Skwiggs Jul 26 '17 at 21:24

2 Answers2

2

what equation(s) do I need to come up with to find a price whose score would match the best score ?

If I understood your right then for object $i$ its score $score_i$ equals $s_i\cdot f\left(\frac{threshold}{price_i}\right)$, where $s_i$ is set in stone, that is constant for given $i$ and the function $f$ is defined as follows

$$f(x)=\cases{ x , \mbox{if }x\le 1,\\ x^5, \mbox{if }x\ge 1 }.$$

Thus if we wish to have $suggestedscore_i=bestscore$ then we should change $price_i$ to $suggestedprice_i$ as follows:

$$bestscore=suggestedscore_i = s_i\cdot f\left(\frac{threshold}{suggestedprice_i }\right).$$

Let $g$ be the inverse function for $f$, that is

$$g(y)=\cases{ y , \mbox{if }y\le 1,\\ y^{1/5}, \mbox{if }y\ge 1 }.$$

Then $g\circ f(x)=f\circ g(x)=x$ for each $x\ge 0$ and the above equality implies

$$suggestedprice_i=\frac{threshold}{g\left(\frac{bestscore}{s_i}\right)}.$$

In other words,

$$ suggestedprice_i =\cases{ threshold\cdot \frac{s_i}{bestscore} , \mbox{if }s_i\ge bestscore,\\ threshold\cdot\left(\frac{s_i}{bestscore}\right)^{1/5}, \mbox{if } s_i \le bestscore }.$$

Alex Ravsky
  • 90,434
  • 1
    For some reason, doing that actually raises the suggested prices for all objects except the one with the best score... Since I'm doing it in Google Spreadsheets, here's how I implemented it: suggested_price = G2*((MAX(N:N)/N2)^(2/3) where G2 is the item's price, MAX(N:N) is the best score and N2 is the item's current score. – Skwiggs Jul 25 '17 at 15:20
  • The reason of the price rising is that the price is multiplied by a positive power of best_score/score[i], which is at least $1$. – Alex Ravsky Jul 25 '17 at 16:16
  • But that lowers the score actually... Higher score is achieved with a cheaper price, not the opposite. The way I calculate the composite for the price is the following: If the price is higher than a specific threshold, return less than 1, otherwise return more (so that the price actually divides the total score if it's too high). I don't know, maybe I need to explain a bit more what each of those parameters are and how they're calculated ? – Skwiggs Jul 25 '17 at 20:41
  • I've managed to solve it by inversing the division. I'm dividing the current score by the highest score which will never be higher than 1. This now works for almost all offers, but somehow some have gone to ridiculously low prices and the score shot up through the roof. – Skwiggs Jul 25 '17 at 20:51
  • Ok sorry, last comment; I noticed that this happens only for items whose price is above my threshold. Makes sense as the composite for the price is then put to the 5th exponent. – Skwiggs Jul 25 '17 at 22:09
  • @Skwiggs “Higher score is achieved with a cheaper price, not the opposite”. According to the formula score = Param1 * Param2 * Param3 * Param4 * price the opposite holds, because score is proportional to price. – Alex Ravsky Jul 26 '17 at 01:39
  • yes sorry my bad, I withheld some information for you to be able to see the full picture. I've edited the question to make it a bit more clear on how I'm calculating the score and the parameters – Skwiggs Jul 26 '17 at 08:34
  • @Skwiggs OK, I edited my answer. – Alex Ravsky Jul 26 '17 at 11:27
  • what exactly is $s_i$ ? I couldn't really understand how I calculate it from your answer – Skwiggs Jul 27 '17 at 16:11
  • @Skwiggs $s_i$ is a multiplier for $score_i$, which is set in stone. For instance, for the example from the beginning of your question, $s_i$=Param1 * Param2 * Param3 * Param4. – Alex Ravsky Jul 27 '17 at 16:38
  • 1
    Ok got you. This mostly works now, but since some of those parameters can be inferior to $1$, there's still some cases where this formula doesn't work. They could potentially all be inferior to $1$ as a matter of fact. How do I translate that into the formula ? Sorry for distilling information so sparsely, I just have no idea of what I'm doing.... – Skwiggs Jul 28 '17 at 09:08
  • @Skwiggs Can you provide an example of parameters for which the formula doesn't work? – Alex Ravsky Jul 28 '17 at 14:55
  • Sure: $2.00 * 2.06 * 220.00 * 0.34 * 1.47 = 453$, where $price=3900$, $suggestedPrice=683$ and $score_{suggestedPrice}=3213$... This time Param4 is inferior to $1$. Another one with a different parameter being $<1$: $2.00 * 1.38 * 430.78 * 1.96 * 0.19 = 443$, where $price=6950$, $suggestedPrice=5028$ and $score_{suggestedPrice}=3213$ again. Not sure what's going on as this time it's only the price that's being $<1$ :/ – Skwiggs Jul 28 '17 at 20:40
  • @Skwiggs Sorry for the delay with the answer, but I cannot say what is going wrong with these examples. My formulas don’t depend whether are single parameters bigger or less than $1$, they depend only on their product $s_i$. And what is wrong with the examples: in both cases $suggestedPrice$ is less than $price$ and $score_{suggestedPrice}$ are equal (I guess they match the $bestscore$). Isn’t this the aim for which you have asked? – Alex Ravsky Aug 19 '17 at 07:28
1

If you are looking at the mathematical solution to the problem you describe, the answer by Alex Ravsky is accurate. However, there seems to be a contradiction in your preference model. The equation provided for the score is :

Ex: score = Param1 * Param2 * Param3 * Param4 * price

Each parameter could individually be assigned an exponent (ranging from 0.5 to 3.5 to give it more or less weight in the equation).

Or :

$score = (param1)^a\times (param2)^b \times (param3)^c \times (param4)^d \times (cost)^e$

With $a, b, c, d, e >0$

This function is increasing with regard to the price (the more costly the item is, the higher score it gets). This is always true if $e$ is positive.

Then, the question states :

We're on the buyer side, so better score means cheaper price.

This is in contradiction with the scoring formula.

What can you do

The easiest solution would be to make $e$ negative. This way, the score function decreases with prices, which is the desired behaviour. If you do that, the answer by Alex Ravsky is still good.

However

You might want to revise that formula because the score can be overly affected by one parameter. Say you have an object that scores near 0 on param1, but is near perfect with regard to all other parameters. Even if you assign a low exponent to param1, the overall score will be very low, perhaps lower than you expect.

A perhaps better way to score items would be with a weighted sum, i.e.

$score = a\times param2 + b\times param2 + c\times param3 + d \times param4 + e \times cost$

With a, b, c, d, and e playing the same role as before (the higher the value, the more important the parameter). Note that $e$ should be negative so the score decreases when the cost increases. If you want to see what should be the price of an item in order to obtain score $X$, all else being fixed, you can use the formula :

$desired\_cost = \frac{X - a\times param2 - b\times param2 - c\times param3 - d \times param4}{e}$

fredq
  • 950
  • Yes sorry my bad, I withheld some information for you to be able to see the full picture. I've edited the question to make it a bit more clear on how I'm calculating the score and the parameters – Skwiggs Jul 26 '17 at 08:34