The exercise you have just performed has taught you how to simulate the markov chain known as the Ehrenfest urn. This Markov chain has a stationary distribution and one of the things I would like you to do now is to try to work through the derivation of the analytical expression for the limiting probability of being in each state of the chain. In addition, and in order to consolidate what you have just learnt, write a python notebook that contains programs to simulate this Markov chain. Run a simulation of this chain and calculate a histogram for the random variable that tells you the number of balls in container A from the time series for this random variable that this random variable estimates. Try to calculate suitable error bars around your estimates for these probabilities. Notice when you do this, however, that this is not simply a matter of applying the usual procedure because of a particular feature of the random variables that you have generated that makes analysing them using ideas based on the central limit theorem not very sensible. Hence, in order to calculate these error bars you are going to have to do a little bit of research online.
close