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?