【发布时间】:2020-09-03 19:48:26
【问题描述】:
我提到了这个帖子: https://stackoverflow.com/questions/38141951/why-does-scipy-norm-pdf-sometimes-give-pdf-1-how-to-correct-it
但我还是有些困惑
import scipy.stats as stats
x = np.array([ 0.7972, 0.0767, 0.4383, 0.7866, 0.8091,
0.1954, 0.6307, 0.6599, 0.1065, 0.0508])
print('mean:', x.mean()) # 0.45511999999999986
print('std', x.std()) # 0.30346538451691657
y = stats.norm.pdf(x, mean, std)
plt.plot(x, y, c='b')
plt.show()
这意味着平均值的概率是 131%?
给定一个点以及如何计算一个值的概率?这可能吗?
添加我的情况:
我知道在连续变量中,任何点的概率都是 0。
但是,我的用户问我数据中 100 的概率是多少,我如何量化 100?
【问题讨论】: