Data Science, Mathematics, Physics, Modelling, Economics.
the state at time n. It is possible to prove (and it is actually very easy) that the probability of being in a certain state, i.e. an integer number x, at time t+1 only depends on the state at time t. In short words, it is a Markov Chain. So this is how to generate it: And it is the result: Now the