Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
February 4, 2018 21:15
May 18, 2020 14:08
September 11, 2017 15:44
September 15, 2017 12:28
February 23, 2018 17:39
August 27, 2017 12:01
December 14, 2021 02:21
December 14, 2021 02:21

Bayesian Data Analysis Python Demos

Binder to interactively run the IPython Notebooks in the browser.

This repository contains some Python demos for the book Bayesian Data Analysis, 3rd ed by Gelman, Carlin, Stern, Dunson, Vehtari, and Rubin (BDA3). See also Bayesian Data Analysis course material.

Currently there are demos for BDA3 Chapters 2, 3, 4, 5, 6, 10 and 11. Furthermore, PyStan is also demoed.

Demos are in jupyter notebook (.ipynb) format. These can be directly previewed in github without need to install or run anything.

Corresponding demos were originally written for Matlab/Octave by Aki Vehtari and translated to Python by Tuomas Sivula. Some improvements were contributed by Pellervo Ruponen and Lassi Meronen. There are also corresponding R demos.


  • python 3
  • ipython
  • numpy
  • scipy
  • matplotlib 2
  • pandas (for some demos)
  • pystan (for some demos)
  • ArviZ (for some demos)