f(1) = 1
f(1.5)= .98
f(2) = .95
f(2.5) = .9
f(3) = .8
f(4) = .7
f(5) = .6
f(10) = .5
f(20) = .25
This doesn't make sense: for 3-5, adding one each time subtracts .1. With a real curve the output wouldn't be evenly spaced between any evenly spaced inputs. In other words, your curve is not a curve, as you can see by the graph: https://docs.google.com/spreadsheets/d/1EEbRxTyYalPSyQ93rcIbKiIvmYRX1lhRvkRh_HyofJc/edit?usp=sharing
So let's just ignore your "curve"; There are several ways to create diminishing returns. One of my favorites is:
f(x) = (x*a) / (x+b) + c
You can make a
, b
, and c
anything you want. With this format a + c
essentially* becomes your maximum possible output, c
is your minimum, and b
controls how quickly the output values scale and its effectiveness is relative to the value of a
. This curve, of course increases the output as the input increases, whereas your example wants to decrease the output as the input increases. To fix this, you can swap the numerator and denominator:
f(x) = (x+b) / (x*a) + c
This makes the minimum output value equal to 1/a + c
, the maximum output value approaches infinity as the input value approaches 0. b
once again controls how quickly the output scales and its effectiveness is relative to the value of a
.
Another approach would be to use something like what was mentioned by @Pierreten, though I'm not sure why he explicitly uses e
:
a^(-bx)
Both a
and b
have a profound impact on how quickly the curve scales. If a
is greater than 0 and less than 1, the output will increase as the input increases, but will also have the opposite effect, meaning it will have increasing returns, not diminishing. If a
is greater than 1, then you'll see the desired effect of the output decreasing as the input increases with diminishing returns. The following is the closest thing I found to the numbers you described:
f(x) = 1.01^(-6.96607x)
f(0) = 1
f(1) = 0.933
f(3) = 0.812
f(10) = 0.5
f(20) = 0.25
There are several other options as well, but this is long enough.