Bayesian Data Analysis course
This book serves as a collection of my notes and exercises completed for the Bayesian Data Analysis course taught by Aki Vehtari. It is normally taught as CS-E5710 at Aalto University, but the lectures and assignments have been made freely available online and the course is based around the text book Bayesian Data Analysis (3rd ed.) by Gelman et al (Gelman et al. 2013).
The source code for my course work is available on GitHub: jhrcook/bayesian-data-analysis-course. If you see any problems (big or small), please let me know by opening an Issue. All R Markdown files are self-contained an can be executed on their own (i.e. do not need to be run in a series or specific order).
0.1 Resources
- Course website
- 2021 Schedule
- GitHub repo (my fork)
- free PDF of Bayesian Data Analysis (3e) (a.k.a “BDA3”) (exercise solutions)
- Chapter Notes
- Video lectures or individually lists here
- Lecture slides
0.2 How to study
The following are recommendations from the course creators on how to take the course.
The recommended way to go through the material is:
- Read the reading instructions for a chapter in the chapter notes.
- Read the chapter in BDA3 and check that you find the terms listed in the reading instructions.
- Watch the corresponding video lecture to get explanations for most important parts.
- Read corresponding additional information in the chapter notes.
- Run the corresponding demos in R demos or Python demos.
- Read the exercise instructions and make the corresponding assignments. Demo codes in R demos and Python demos have a lot of useful examples for handling data and plotting figures. If you have problems, visit TA sessions or ask in course slack channel.
- If you want to learn more, make also self study exercises listed below.
0.3 Course sections
Below are the main sections of the course where each section should take about a week to complete.
- Course Introduction
- Basics of Bayesian Inference
- Multidimensional Posterior
- Monte Carlo
- Markov chain Monte Carlo
- HMC, NUTS, and Stan
- Hierarchical models and exchangeability
- Model checking & Cross-validation
- Model comparison and selection
- Decision analysis
- Normal approximation & Frequency properties
- Extended topics
0.4 Additional notes
I took additional notes on other chapters in the book. I appended these chapters after the primary course sections.
- Ch. 14 Introduction to regression models
- Ch. 15 Hierarchical linear models
- Ch. 19 Parametric nonlinear models
- Ch. 20 Basis function models
- Ch. 21 Gaussian process models
- Ch. 22 Finite mixture models
- Ch. 23 Dirichlet process models
I plan to also read through and take notes on chapters 16 and 18 on “Generalized linear models” and “Models for missing data” in the future.
0.5 Assignments and exercises
I completed the assignments that accompany the course and also did some of additional exercises from the book. These are available in their own sections of the book: Assignments and Exercises.
0.6 Stan models
Below is a list of the models built during the course. The original code is available in the GitHub repo “models” directory and they are also copied in the Models section of this website.
- Drug bioassay model for Assignment 6
- 8 school SAT model
- Drownings for Assignment 7
- Factory machine measurements for Assignments 7 & 8:
- pooled
- separate
- hierarchical (also used in Assignment 9)
- serial dilution assay for chapter 19 exercises