Trying to fit an equation to a graph

41 Views Asked by At

I'm trying to fit an equation to the scatter plot below. Does anyone know what equation can produce data points like this?

Scatter plot

1

There are 1 best solutions below

0
On BEST ANSWER

If those spikes are actually infinite, then $$y = \dfrac{x(x-150)(x-300)(x-700)(x-850)(x-1000)}{(x-30)^2(x-220)^2(x-410)^2(x-590)^2(x-780)^2}$$ would produce something similar, where the factors in the numerator are the places where the function is $0$, while the factors in the denominator are where the spikes are at. The numerator factors are all linear because at each of the zeros, the function actually changes sign. The factors in the denominator are all squared because at each spike, the function does not change sign.

(I had to divide everything by 100 to not overflow Desmos)

As you can see, it has the right general shape but isn't a great match. To improve it, multiply your data by the denominator above (adjusted to line up the factors to the actual spike locations in your curve). Plot the result. Does it still have spikes? If so, increase the exponent for any factor corresponding to a remaining spike by $2$ and try again. Keep doing this until all the spikes are gone.

The resulting curve can be approximated by a polynomial. Once you obtain a good polynomial approximation of that curve, divide it by the factors that were multiplied earlier to get a better approximation of your curve.