Assume there is a cubic equation of the form
for which
Since you know f(10), f(50), f(90), f(100), this equals solving a matrix
=
So, solving that, i got a polynomial
You can verify, it fits the points perfectly.
Hi everybody!
I'm trying to find a function that i could fit to only a few datapoints
x = [10 50 90 100]
y= [0.77 0.75 0.55 0.51]
I have troubles finding a function with only one or two free parameters to fit.
I got stuck with something like:
y(x)= 1 - exp(k*x)
What do you guys think? What would be the best function?
Thanks in advance!!
Assume there is a cubic equation of the form
for which
Since you know f(10), f(50), f(90), f(100), this equals solving a matrix
=
So, solving that, i got a polynomial
You can verify, it fits the points perfectly.
You could try a graphical approach.
Rewrite your equation as 1-y = exp(kx) and take logs.
That gets you ln(1-y) = kx which can be rewritten as Y=kx, where Y=ln(1-y).
If you now plot Y against x you should get a straight line. If the points do lie roughly along a straight line, (which should pass through the origin), then OK., and the slope of the line will be the value of k. If they don't then your equation doesn't work and it's back to the drawing board. Try something else.
The problem with the cubic in the last response is that it will have two turning points and these, (I haven't checked for this case) usually fall within the data points. The curve may well pass throught the data points but it can hardly be said to give a smooth (predictive) representation of the data.
Hi bottlerocket66!
With so few points and without any information about the expected relation, the best curve is a straight line.
That is the simplest shape that makes no assumptions.
Anything else is just obscuring whatever it is for.
What is it for?
Hi ILikeSerena!
Thanks for your reply. The data points are from a simple economic choice experiment.
They indicate how the value of a good is discounted. 1 being the value of the good. 0.77 means that it has decreased in value by that factor.
I'm looking for a function that takes into account the curvature and it should be a monotonically decreasing function.
The fitted free parameter(s) of the function should then say something about the individual degree of discounting (amount of curvature).
For the way a good is discounted, I would expect a relation like , where is the so called characteristic time, and is the value at x=0.
Looking at your data, that does not seem to match.
Just to mention a couple of other possible relationships:
With both of these relations you can get a pretty good match.