【发布时间】:2019-05-14 22:06:58
【问题描述】:
我想使用 scipy 计算 sum(e-λ λi/i!) 其中i=197,..., ∞ and λ=421.41。
我浏览了scipy.stats.poisson 的scipy 文档,可以在https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.poisson.html 中找到
但是,他们有多种scipy.stats.poisson 的方法,在选择最适合我的方法时有点困惑。
例如,
rvs(mu, loc=0, size=1, random_state=None) Random variates.
pmf(k, mu, loc=0) Probability mass function.
logpmf(k, mu, loc=0) Log of the probability mass function.
cdf(k, mu, loc=0) Cumulative distribution function.
logcdf(k, mu, loc=0) Log of the cumulative distribution function.
sf(k, mu, loc=0) Survival function (also defined as 1 - cdf, but sf is sometimes more accurate).
logsf(k, mu, loc=0) Log of the survival function.
ppf(q, mu, loc=0) Percent point function (inverse of cdf — percentiles).
isf(q, mu, loc=0) Inverse survival function (inverse of sf).
stats(mu, loc=0, moments=’mv’) Mean(‘m’), variance(‘v’), skew(‘s’), and/or kurtosis(‘k’).
entropy(mu, loc=0) (Differential) entropy of the RV.
expect(func, args=(mu,), loc=0, lb=None, ub=None, conditional=False) Expected value of a function (of one argument) with respect to the distribution.
median(mu, loc=0) Median of the distribution.
mean(mu, loc=0) Mean of the distribution.
var(mu, loc=0) Variance of the distribution.
std(mu, loc=0) Standard deviation of the distribution.
interval(alpha, mu, loc=0) Endpoints of the range that contains alpha percent of the distribution
目前,我正在使用sf(197, 421.41, loc=0)。但是,我不太确定我是否选择了正确的方法。请让我知道你的想法。
如果需要,我很乐意提供更多详细信息。
【问题讨论】: