# Is it valid to simulate a Poisson process with a sequence of Bernoulli trials?

In order to better understand some statistical concepts I generally try to run simulations to get to those results and see how the results match the theory.

While reviewing the Poisson and the Exponential distributions I decided to simulate a Poisson process following my understanding of it. However I ended up using Bernoulli trials and I have doubts I might be missing something.

As far as I understood the idea behind this model is that we have some events occurring at an average constant rate, so that on any time slot $$t$$ (of fixed size $$s$$) we have on average $$\lambda$$ events ocurring.

To replicate this scenario I ended up using a sequence of Bernoulli trials $$B_1, B_2,... B_n$$ with probability $$\lambda/s$$. Then, for every timestamp $$t_i$$ if $$B_{t_i}$$ = 1 then the event takes place, otherwise that timestamp is spent waiting. In this way I feel I ensure a constant rate and it also seems that the results I get are in line with the probability mass function of a random variable $$\sim Poisson(\lambda)$$, which is where I wanted to get. However, I cannot stop thinking that I am using Bernoulli trials and that maybe I am rather modelling a Bernoulli process, making a small conceptual mistake somewhere.

Can someone tell me if my implementation is wrong and where?

Your simulation looks like a good approximation of a Poisson process. Of course, it can only be an approximation since the Poisson process is a continuous process while your simulation is discrete.

A case in point is the event count random variable for any given interval, which, as you have mentioned, would have to be Poisson and thus give positive probabilities for arbitrarily large counts. Your simulation can only approximate this. But, of course, no simulation would be able to accurately produce this behavior.

Another possibility to simulate a Poisson process would be to use the fact that the length of the time interval between two consecutive events would be an exponential random variable. So you might sample from the exponential distribution and simulate the time of the $$k$$th event as the sum of your first $$k$$ samples from the exponential random variable.

• Thanks! As for sampling from an exponential distribution, I was aware of it but it seemed cool and convenient to me that with the simulation I designed I could compute both number of events and time between the events and show how these two random variables follow the Poisson and the Exponential distributions, respectively! Oct 21, 2022 at 7:13

You used the Poisson approximation of the Bernoulli distribution. For large values of $$n$$ probability close to zero, you get that the Bernoulli distribution is approximately equal to a Poisson distribution.

In the limit (infinitely many Bernoulli variables) you have the Poisson limit theorem.

$$\lim_{n \to \infty} {n\choose k} (\lambda/n)^k(1-\lambda/n)^{n-k} = e^{-\lambda k} \frac{\lambda^k}{k!}$$

It is valid to approximate a Poisson distribution with a binomial distribution (a sum of Bernoulli distributed variables) but the other way around is more common. The Poisson distribution is easier than the binomial distribution.