Solved – How to fit a lognormal distribution in Python

pythonscipy

I want to fit lognormal distribution to my data, using python scipy.stats.lognormal.fit. According to the manual, fit returns shape, loc, scale parameters. But, lognormal distribution normally needs only two parameters: mean and standard deviation.

How to interpret the results from scipy fit function? How to get mean and standard deviation?

Best Answer

From scipy docs: "If log x is normally distributed with mean mu and variance sigma**2, then x is log-normally distributed with shape parameter sigma and scale parameter exp(mu)."

The location parameter shifts the lognormal distribution along the x-axis so the lower bound wouldn't be zero (which is what the location parameter defaults to.)