This website contains my notes and code as I work through Richard McElreath's 2025 course on his book Statistical Rethinking. A course in Bayesian statistics, Rethinking is code-heavy and meant to be read sequentially, not as a reference. McElreath offers his flipped instruction course locally, also publishing the lectures online.
The repository is organized into separate quarto files, which are stitched
together in _quarto.yml.
book-notes/: contains notes and exercises directly from the textbookcourse-notes/: contains notes from pre-recorded lectures and slideshomework/: contains homework solutions
The quarto notebooks use both R and Python in their code.
First, install Quarto.
Install dependencies using uv:
uv sync
This creates a virtual environment and installs packages from the lock file.
Note: pymc compiles code at runtime, utilizing the g++ compiler it finds in
the PATH.
This project uses R 4.5.2, which can be installed using
rig:
rig add 4.5.2
Then, use rv to install
the R dependencies:
rv sync
You'll need to have Hunspell installed for the spellcheck quarto extension to work.
Windows:
choco install hunspell.portableMac:
brew install hunspell
Linux:
sudo apt-get install hunspell
After installing Hunspell, you must install the en_US dictionary.
Windows/Mac:
- Download the
dictionary
files (both files:
.dicand.aff). - Place them in hunspell's dictionary SEARCH PATH.
- To add a new directory to the search path, add the directory to the
DICPATHenvironment variable. - To view the search path, use
hunspell -D:
Linux:
sudo apt-get install hunspell-en-us
After installing the necessary dependencies, build the project:
quarto preview