python - What are the loc and scale parameters in scipy.stats.maxwell? -
the maxwell-boltzmann distribution given maxwell-boltzmann http://mathworld.wolfram.com/images/equations/maxwelldistribution/inline9.gif. scipy.stats.maxwell distribution uses loc , scale parameters define distribution. how parameters in 2 definitions connected? appreciate if tell in general how determine relation between parameters in scipy.stats , usual definition.
the loc parameter always shifts x variable. in other words, generalizes distribution allow shifting x=0 x=loc. when loc nonzero,
maxwell.pdf(x) = sqrt(2/pi)x**2 * exp(-x**2/2), x > 0 becomes
maxwell.pdf(x, loc) = sqrt(2/pi)(x-loc)**2 * exp(-(x-loc)**2/2), x > loc. the doc string scipy.stats.maxwell states:
a special case of
chidistribution,df = 3,loc = 0.0, , givenscale = a,aparameter used in mathworld description.
so scale corresponds parameter a in equation
http://mathworld.wolfram.com/images/equations/maxwelldistribution/inline9.gif
in general need read distribution's doc string know parameters distribution has. the beta distribution, example, has a , b shape parameters in addition loc , scale.
however, believe continuous distributions, distribution.pdf(x, loc, scale) identically equivalent distribution.pdf(y) / scale y = (x - loc) / scale.
Comments
Post a Comment