[Numpy-discussion] Fitting a curve on a log-normal distributed data

Ian Mallett geometrian at gmail.com
Thu Nov 19 22:12:26 EST 2009


My analysis shows that the exponential regression gives the best result
(r^2=87%)--power regression gives worse results (r^2=77%).  Untransformed
data gives r^2=76%.

I don't think you want lognorm.  If I'm not mistaken, that fits the data to
a log(normal distribution random variable).

So, take the logarithm (to any base) of all the "conc" values.  Then do a
linear regression on those values versus "sizes".

Try (semi-pseudocode):
slope, intercept, p, error = scipy.stats.linregress(sizes,log(conc))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20091119/63d45f75/attachment.html>

More information about the NumPy-Discussion mailing list