I have the follow dataset:

list1 = {{1, 0.0166}, {2, 0.05644}, {3, 0.16455}, {4, 0.18396}, {5, 
  0.16634}, {6, 0.1497}, {7, 0.0943}, {8, 0.04931}, {9, 0.0539}, {10, 
  0.02277}, {11, 0.01188}, {12, 0.01}, {13, 0.00515}, {14, 
  0.00396}, {15, 0.00515}, {16, 0.001585}, {17, 0.00356}, {18, 
  0.00158}, {19, 0.00079}}

I've been looking at the data through a loglog plot by using:

graph1 = ListPlot[list1,ScalingFunctions-> {"Log","Log"}]

I had been curious to see if the tail end of the distribution reflect a power law distribution, so I tried to fit my data using:

nlm1 = NonlinearModelFit[list1,{(x^b)},{b},x]
nlm2 = Plot[(x^-1.91424), {x, 1, 19}, ScalingFunctions -> {"Log", "Log"}]


However upon closer examination, the tail end of my data seems to fit poorly to a power law. I would like to try fitting my data on the log/log plot to an exponential decay function, but I'm having trouble going about that. If it's not possible to fit the data to an exponential decay function, would it be possible to shift the power law fit function over by adding in a parameter, etc, so that it shows better parity to the data?


In the following I have taken the tail end of the curve to be the last 9 points. You would want to adjust that according to your intuition.

First fit a power law to those points and obtain a fitted function expression nlm. Then plot all the points in black, then only the points being fit in red, then the fitted function as a dashed green line. Everything is plotted in log-log plots.

nlm = NonlinearModelFit[
        {a, xmin}, x, MaxIterations->1500

  ListLogLogPlot[list1, PlotStyle -> Directive[Black, PointSize[0.02]]],
  ListLogLogPlot[list1[[10;;]], PlotStyle -> Directive[Red, PointSize[0.02]]],
  LogLogPlot[nlm[x], {x, 0.9, 20}, PlotStyle-> Directive[Darker@Green, Dashed]]

plot wit points, section used in fit, and power law fit curve


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.