菜鸡只能模拟了, b取10000次计算不出,只能取1000次了。 ``` p_a = 10*0.1*0.9**9 print('p_a',p_a) from scipy.special import comb, perm p_b = 0 n = 1000 for i in range(n//10): p_b += comb(n,i)*(0.1**i)*(0.9**(n-i)) print('p_b',p_b) ``` 结果: ``` p_a 0.3874204890000001 p_b 0.4845822904344084 ```