Bayesian workflow

Welcome to the Bayesian workflow course. Here, you can browse and search the course notebooks.

This course is part of the ORIGINS Data Science Laboratory’s Block courses. Please see the main course page for more information.


To run the course notebooks, you have a few different options. I recommend to follow the standard install, and use docker or binder if there are problems.


The notebooks have been tested with Python 3.9 and updates may need to be made to for Python > 3.9 to work.

  • Plan A - Standard install: Fork/clone/download material from this GitHub repository, everything you need is in src/notebooks

    • I recommend using a virtual environment if possible

    • Install the basics if necessary: pip install numpy scipy matplotlib

    • Install: pip install cython==0.29.24 cmdstanpy==0.9.76 arviz==0.11.2 ultranest==3.3.0

    • Run install_cmdstan (as described in the cmdstanpy docs)

    • If using a virtual environment, set up an ipython kernel with this environment (as described here)

    • Open a notebook using jupyter, select correct kernel and get running

  • Plan B - Docker: Fork/clone/download material from this GitHub repository, everything you need is in src/notebooks

    • Install docker on your computer

    • Get a ready made docker enironment: docker pull cescalara/bayesian_workflow

    • Run docker run -p 8888:8888 -v "${PWD}":/home/jovyan/work cescalara/bayesian_workflow jupyter-notebook --allow-root

    • Open the given url in your browser

    • The current directory will be mounted to the docker and the jupyter server has the environment needed to run the notebooks

  • Plan C - Binder: Click here to launch a working environment via binder, all notebooks are in work/

    • The binder may take a while to load, this is normal

    • Using binder you will automatically time out of sessions if you are inactive for more than 10 minutes, so save your work frequently

    • The changes that you make are not persistent - if you close and repoen a tab your changes will be lost

    • To work continuously, download and upload your changes between active sessions


Complete solutions to the notebooks can be made available upon request. Please contact


I would like to highlight the many resources of Michael Betancourt and the KIPAC Statistical Methods course as providing inspiration for the course structure and content.