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

Ian Mallett geometrian@gmail....
Thu Nov 19 21:12:26 CST 2009


Hello,

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))

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


More information about the NumPy-Discussion mailing list