Maths behind sliding scale pricing [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionI'm trying to work out a simple calculation for the following:
a phone model has the maximum sale price of £85.00 and this is if only 1 unit is purchased and a minimum sales price of £50.00 - this is if 150 units and over are purchased in one.
How can I work out a way of the price if between 2 and 149 units are purchased??
Thanks, B.
Formula:
Y = 50 + ((85 - 50) / (150 - 1)) * (X - 1)
Result:
X = 1 --> Y = 85
X = 33 --> Y = 57.52
X = 150 --> Y = 50
You probably don't have a linear model in such situations. I don't know the right English term, but you would have more like a piecewise or stepwise function here.
But nevertheless, you can get a linear function through interpolation.
精彩评论