In [3]:
import matplotlib.pyplot as plt
import math
import numpy
import scipy.stats

In [4]:
samp = [numpy.random.poisson(lam=130) for i in range(1000)]

In [5]:
numpy.histogram(samp, 1)


Out[5]:
(array([1000], dtype=int64), array([  95.,  165.]))

In [37]:
domain = numpy.arange(80,150)
plt.hist(samp, bins=domain)
plt.plot(domain, 1000 * scipy.stats.poisson.pmf(domain, mu=130))
plt.show()



In [ ]:


In [22]:
samp2 = [numpy.random.poisson(lam=10) for i in range(50)]

In [23]:
plt.hist(samp2, bins=numpy.arange(20))
plt.show()



In [36]:
numpy.array(samp).min()


Out[36]:
95

In [8]:
psamp = numpy.random.poisson(35000/(120*60), 10000)
plt.hist(psamp, bins=numpy.arange(50))
plt.show()



In [ ]: