I have a number X
of integers (very large) and a probability p with which I want to draw a sample s
(a number) from X
following a Poisson distribution. For example, if X = 10^8
and p=0.05
, I expect s to be the number of heads we get.
I was able to easily do this with random.binomial as:
s=np.random.binomial(n=X, p=p)
How can I apply the same idea using random.poisson
?