在 4 场不同的比赛中,Jin 都有 60% 的获胜机会。假设比赛相互独立,Jin 至少赢得 1 场比赛的概率是多少。
二项分布参数:
n=4
p=0.60
以十进制显示概率。
暗示:
- P(x>=1)=1-P(x=0)
- 使用 scipy.stats 包的 binom.pmf() 函数计算概率。
#n=4
#p=0.60
#k=1
from scipy import stats
probability=stats.binom.pmf(1,4,0.60)
print(probability)
#0.15360000000000007
这里 K 的值应该是多少。我的输出不正确。