numpy处理二项分布随机数_python_数据分析_3
import numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom scipy import statsbino = np.random.binomial(100,0.5,20)#投掷100次硬币,向上概率是0.5,即硬币向上的次数服从二项分布b(100,0.5),生成20个来源于该分布的随机数print(b...