scipy.stats.maxwell中的loc和scale参数是什么? [英] What are the loc and scale parameters in scipy.stats.maxwell?
问题描述
maxwell-boltzmann分布由
(来自MathWorld-Wolfram网络资源:
(来自MathWorld-Wolfram网络资源: wolfram.com )
通常,您需要读取发行版的文档字符串才能知道哪些参数分布了.例如, beta发行版具有 a
和 b
形状参数以及 loc
和 scale
之外.
但是,我相信对于所有连续发行, distribution.pdf(x,loc,scale)
等同于 distribution.pdf(y)/规模
,其中 y =(x-loc)/规模
.
The maxwell-boltzmann distribution is given by
(from MathWorld - A Wolfram Web Resource: wolfram.com)
. The scipy.stats.maxwell distribution uses loc and scale parameters to define this distribution. How are the parameters in the two definitions connected? I also would appreciate if someone could tell in general how to determine the relation between parameters in scipy.stats and their usual definition.
The loc
parameter always shifts the x
variable. In other words, it generalizes
the distribution to allow shifting x=0
to x=loc
. So that when loc
is nonzero,
maxwell.pdf(x) = sqrt(2/pi)x**2 * exp(-x**2/2), for x > 0
becomes
maxwell.pdf(x, loc) = sqrt(2/pi)(x-loc)**2 * exp(-(x-loc)**2/2), for x > loc.
The doc string for scipy.stats.maxwell
states:
A special case of a
chi
distribution, withdf = 3
,loc = 0.0
, and givenscale = a
, wherea
is the parameter used in the Mathworld description.
So the scale corresponds to the parameter a
in the equation
(from MathWorld - A Wolfram Web Resource: wolfram.com)
In general you need to read the distribution's doc string to know what parameters the distribution has. The beta distribution, for example, has a
and b
shape parameters in addition to loc
and scale
.
However, I believe for all continuous distributions,
distribution.pdf(x, loc, scale)
is identically equivalent to
distribution.pdf(y) / scale
with y = (x - loc) / scale
.
这篇关于scipy.stats.maxwell中的loc和scale参数是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!