Markov Chains, Python.
accept: # Update position mu_current = mu_proposal samples.append(mu_current) import pandas as pd pd.DataFrame(samples).tail(100).hist() Notice that we only used the last 100 samples to plot the histogram. This is because the ‘burn-in’ that I referred to earlier, required for the Markov Chain to