I am running some goodness of fit tests using scipy.stats
in Python 2.7.10.
for distrName in distrNameList:
distr = getattr(distributions, distrName)
param = distr.fit(sample)
pdf = distr.pdf(???)
What do I pass into distr.pdf()
to get the values of the best-fit pdf on the list
of sample points of interest, called abscissas
?
To evaluate the pdf at
abscissas
, you would passabcissas
as the first argument topdf
. To specify the parameters, use the*
operator to unpack theparam
tuple and pass those values todistr.pdf
:For example,