Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



29 Commits

Repository files navigation

Statistical Rethinking: A Bayesian Course (with Code Examples in R/Stan/Python/Julia)

Winter 2020/2021

Instructor: Richard McElreath

Format: Online, flipped instruction. The lectures are pre-recorded. We'll meet online once a week for an hour to work through the solutions to the assigned problems.

When: Wednesdays 3-4PM CET, starting 2 December 2020 (see full calendar at bottom). A Zoom link will be given to enrolled students.

Registration: Please sign up via <EventBright>. I've also set aside 100 audit tickets at the same link, for people who want to participate, but who don't need graded work and course credit. Apologies for using an external service, but it will make distributing the access information and course materials easier for all of us.


We'll use the 2nd edition of my book, Statistical Rethinking. I'll provide a PDF of the book to enrolled students.


The full lecture video playlist is here: <YouTube:Statistical Rethinking 2019>. Links to individual lectures, slides and videos are in the calendar at the very bottom.

Code examples

Students can engage with the material using either the original R code examples or one of several conversions to other computing environments. The conversions are not always exact, but they are rather complete. Each option is listed below.

Original R Flavor

For those who want to use the original R code examples in the print book, you need to first install rstan. Go to and find the instructions for your platform. Then you can install the rethinking package:


The code is all on github and there are additional details about the package there, including information about using the more-up-to-date cmdstanr instead of rstan as the underlying MCMC engine.

R + Tidyverse + ggplot2 + brms

The <Tidyverse/brms> conversion is very high quality and complete through Chapter 14.

Python and PyMC3

The <Python/PyMC3> conversion is quite complete.

Julia and Turing

The <Julia/Turing> conversion is not as complete, but is growing fast and presents the Rethinking examples in multiple Julia engines, including the great <TuringLang>.


The are several other conversions. See the full list at

Homework and solutions

I will also post problem sets and solutions here. Check the folders at the top.

Calendar & Topical Outline

There are 10 weeks of instruction.

Week ## Meeting date Reading Lectures
Week 01 02 December Chapters 1, 2 and 3 The Golem of Prague <slides> <video>
Garden of Forking Data <slides> <video>
Week 02 09 December Chapter 4 Geocentric Models <slides> <video>
Wiggly Orbits <slides> <video>
Week 03 06 January Chapters 5 and 6 Spurious Waffles <slides> <video>
Haunted DAG <slides> <video>
Week 04 13 January Chapter 7 Ulysses' Compass <slides> <video>
Model Comparison <slides> <video>
Week 05 20 January Chapters 8 and 9 Conditional Manatees <slides> <video>
Markov Chain Monte Carlo <slides> <video>
Week 06 27 January Chapters 10 and 11 Maximum entropy & GLMs <slides> <video>
God Spiked the Integers <slides> <video>
Week 07 03 February Chapter 12 Monsters & Mixtures <slides> <video>
Ordered Categories, Left & Right <slides> <video>
Week 08 10 February Chapter 13 Multilevel Models <slides> <video>
Multilevel Models 2 <slides> <video>
Week 09 24 February Chapter 14 Adventures in Covariance <slides> <video>
Slopes, Instruments and Social Relations <slides> <video>
Week 10 03 March Chapter 15 Gaussian Processes <slides> <video>
Missing Values and Measurement Error <slides> <video>


Statistical Rethinking Course Winter 2020/2021






No releases published


No packages published