【发布时间】:2012-09-06 22:22:52
【问题描述】:
如何在 Python 中计算给定均值、std 的正态分布概率?我总是可以根据这个问题中的 OP 所做的定义明确地编写我自己的函数:Calculating Probability of a Random Variable in a Distribution in Python
只是想知道是否有库函数调用将允许您执行此操作。在我的想象中它会是这样的:
nd = NormalDistribution(mu=100, std=12)
p = nd.prob(98)
Perl 中有一个类似的问题:How can I compute the probability at a point given a normal distribution in Perl?。但我在 Python 中没有看到。
Numpy 有一个random.normal 函数,但它就像采样,不是我想要的。
【问题讨论】:
标签: python statistics scipy probability