Hi I have a distribution of results that is positively skewed so I want to test if it is a good fit to a log-normal distribution or a Gumbell distribution.
I have us
You can simply use scipy.stats.lognorm.fit
to fit your data to a lognormal distribution. This will give you a tuple
(0.60845558877160033, 0.27409944344131409, 1.8037732130179509)
which represents shape, location, and scale respectively. If you want the more common parameters of mu and sigma, you can obtain them like so
shape, location, scale = scipy.stats.lognorm.fit(listofdata)
mu, sigma = np.log(scale), shape
You can use the scipy.stats.gumbel_l.fit
function similarily for that respective distribution, which will return the location and scale.
As far as how to test goodness of fit for each distribution, one possibility would be to use the Kolmogorov-Smirnov test with scipy.stats.kstest.