I want to find the distribution that best fit some data. This would typically be some sort of measurement data, for instance force or torque.
Ideally I want to run Anderson-Darling with multiple distributions and select the distribution with the highest p-value. This would be similar to the 'Goodness of fit' test in Minitab. I am having trouble finding a python implementation of Anderson-Darling that calculates the p-value.
I have tried scipy's stats.anderson()
but it only returns the AD-statistic and a list of critical values with the corresponding significance levels, not the p-value itself.
I have also looked into statsmodels
, but it seems to only support the normal distribution. I need to compare the fit of several distributions (normal, weibull, lognormal etc.).
Is there an implementation of the Anderson-Darling in python that returns p-value and supports nonnormal distributions?