这是关于我在math stack上提出的一个问题的答案
我希望将这个问题/解决方案转换成python,但是我在解释这里使用的所有符号时遇到了困难
我意识到这篇文章太“给我代码”了,不是一个好问题,但我问这个问题的目的是理解这里涉及的数学。我不能很好地理解这里使用的数学符号语言,但是如果我看到它,我可以很好地解释python来概念化答案
问题可以这样设置
import numpy as np
bag = np.hstack((
np.repeat(0, 80),
np.repeat(1, 21),
np.repeat(3, 5),
np.repeat(7,1)
))
我不确定这是否正是你想要的,但这就是我计算的方法,例如,求和的概率==6。 它比数学更实用,只是解决了这个特殊的问题,所以我不确定它是否能帮助你理解数学
相关问题 更多 >
编程相关推荐