Given some data that looks linear on a ListLogLogPlot, how can I find the correct equation (and particularly, the correct slope of the line)? I have a sample code here

data = {{1012*10^23, 0.64/10}, {669.83*10^23, 
   0.866647113123/10}, {405*10^23, 1.30/10}, {88.6*10^23, 
   4.32/10}, {30.4*10^23, 10.5/10}, {13.4*10^23, 
   20.22/10}, {5.97*10^23, 38.42/10}, {3.26*10^23, 61.94/10}}

H = LinearModelFit[Log10@data, x, x]

This yields

19.6255 - 0.800901 x

But when I try

G = ListLogLogPlot[data]

How can I also see the best fit line along with it? Show[G,H] and similar attempts didn't work. Also, is the slope of the best fit line -0.8? That is, is my relationship y = x^(-0.8)?


1 Answer 1


Try this:

  Plot[Normal[H], {x, 23, 26}]

enter image description here

Have fun!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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