Introduction to MCMC with emcee
This is a short introduction to using MCMC for fitting a model to data, with visualizations. The Metropolis algorithm is introduced and manually implemented. Then a more efficient algorithm (affine-invariant ensemble sampling) is presented using the "emcee" package. The notebook may also be viewed at https://nbviewer.jupyter.org/.