A
A
Artyom2021-09-15 16:09:29
Mathematics
Artyom, 2021-09-15 16:09:29

How to calculate the price rating of a product?

We need a formula.
There are a number of products ranging from 30,000 to 200,000. And a certain product worth 70,000. You need to assign a value to it based on the price.
Given:
Min. item price = a
Max. item price = b
Item price = c
Question:
How to get the item price rating if the minimum rating is 5 for the maximum price and 10 for the minimum price.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2021-09-15
@KubrickHabr

This is called interpolation. You know that f(a)=10, f(b)=5. You need to find f(c), where f must fall under common sense (a monotonous, continuous function).
for example, you can take a linear interpolation, then f(x) = 10-(xa)/(ba)*5.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question