Is there any reasonably fast way of finding a function of the type
that best fits a given data, for some K and n? For example, the following data closely follows an inverse power law
data = {{98.6, 38.8, 29.2, 23.7, 20.5, 18.1, 17, 15.9, 15, 14.3}}
ListLogPlot[data]
How can I find an expression that fits it?
ListLogLogPlot[data]
where they should fall on a line if the relationship was indeed a power-law. This can be confirmed with fitting:fit = NonlinearModelFit[First@data, 1/(k v^n), {k, n}, v]; Show[ListPlot[data], Plot[fit[x], {x, 1, 10}]]
The fit can be made better by including more terms:NonlinearModelFit[First@data, 1/(k1 v^n1) + 1/(k2 v^n2), {k1, n1, k2, n2}, v]
$\endgroup$NonlinearModelFit
, as suggested in the other comment. $\endgroup$