demo_numpy_random_poisson4.py:
from numpy import random import matplotlib.pyplot as plt import seaborn as sns sns.distplot(random.binomial(n=1000, p=0.01, size=1000), hist=False, label='binomial') sns.distplot(random.poisson(lam=10, size=1000), hist=False, label='poisson') plt.show()
C:\Users\My Name>python demo_numpy_random_poisson4.py