Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用scipy.stats.gamma.fit(data)将伽玛分布拟合到我的数据中。我想知道结果分布的平均值是什么。
如何找到拟合伽马分布的平均值?
中的分布scipy.stats有一种mean(不出所料)计算平均值的方法。
scipy.stats
mean
您获取返回的拟合参数scipy.stats.gamma.fit并将它们传递给scipy.stats.gamma.mean:
scipy.stats.gamma.fit
scipy.stats.gamma.mean
data = stats.gamma.rvs(5, 2, size=1000); # generate example data params = scipy.stats.gamma.fit(data) print(scipy.stats.gamma.mean(*params)) # 6.99807037952