This is just a question I want answered so I can have fun with charts in the future.
Consider the following data:
How would make a function that hits all listed number above? Is it even possible to do so?
This is just a question I want answered so I can have fun with charts in the future.
Consider the following data:
How would make a function that hits all listed number above? Is it even possible to do so?
Infinitely many functions can "hit" any finite number of points.
Important questions are these:
1) Do you REALLY need it to match ALL the data? Even if there are huge outliers or other oddities?
2) What do you want it to do in between the given values?
3) What do you want it to do before and after the data start? 1989 or 2000, for example.
Those are very much insufficient responses.
There are infinitely ways to be "smooth" between two points.
There are infinitely many "limits" in both directions.
What do you know about "differences"? With 10 points, you can hit all of them with a 9th degree polynomial. It's ugly, but it fits all your criteria. In this case, you are lucky enough that there is a 6th degree polynomial that is very, very close.
Really, these data do not appear to be modelled well by any elementary function. What do you know of "cubic splines"?