-
- :生成随机值
pmf(x, <shape(s)>, loc=0)
:概率密度函数在x
处的值logpmf(x, <shape(s)>, loc=0)
:概率密度函数在x
处的对数值cdf(x, <shape(s)>, loc=0)
:累积分布函数在x
处的取值logcdf(x, <shape(s)>, loc=0)
:累积分布函数在x
处的对数值sf(x, <shape(s)>, loc=0)
:生存函数在处的值ppf(q, <shape(s)>, loc=0)
:累积分布函数的反函数isf(q, <shape(s)>, loc=0)
:生存函数的反函数moment(n, <shape(s)>, loc=0)
:non-central n-th moment of the distribution. May not work for array arguments.stats(<shape(s)>, loc=0, moments='mv')
:计算期望方差等统计量entropy(<shape(s)>, loc=0)
:计算熵expect(func=None, args=(), loc=0, lb=None, ub=None, conditional=False)
:Expected value of a function with respect to the distribution. Additional kwd arguments passed to integrate.quadmedian(<shape(s)>, loc=0)
:计算该分布的中值- :计算该分布的均值
var(<shape(s)>, loc=0)
:计算该分布的方差interval(alpha, <shape(s)>, loc=0)
Interval that with alpha percent probability contains a random realization of this distribution.__call__(<shape(s)>, loc=0)
:产生一个参数冻结的随机变量
-
x=range(1,7)
p=(0.1,0.3,0.1,0.3,0.1,0.1)