Statistical Rethinking is an incredible resource for learning Bayesian Statistics and was written by Richard McElreath, a Full Professor of Anthropology at the Max Planck Institute for Evolutionary Anthropology. Aside from his intuitive explanations of Bayesian concepts, Statistical Rethinking also includes code written in R
to express the logic of the statistical theories as an alternative to the equations we're used to seeing in math textbooks. Coupled with data to manipulate, the book is very effective in testing the logic of the mathematical models and watching the theory play out through real-world examples as represented by the data. In addition to the textbook, Prof. McElreath has also released a complimentary playlist video lectures for the textbook as another resource for understanding the ideas explained in the text.
As great of a source as the textbook is, one of its key drawbacks is that it requires the reader to have a proficient understanding of the syntax of R
to read, run, and manipulate the code presented in the textbook. Luckily, the core dev team and other selfless contributors at PyMC has offered another alternative to interacting with this resource by porting the R
code to Python
. By utilizing Python
libraries such as pymc
,arviz
, numpy
, and scipy
, they were able to create Python
equivalents to the code that Prof. McElreath wrote in the textbook for the readers that are only familiar with Python
syntax. Their contributions can be found in this Github repository.
With the foundation that they've laid, we're aiming to take their project one step further by forking their original repository, along with all the code examples written in Jupyter Notebooks, and adding our own summaries of the textbook material alongside each of the Python-ported code examples in the notebooks. By paraphrasing the textbook material in the Jupyter Notebooks that the PyMC team started, we're aiming to reduce the friction of having to switch back and forth between the textbook and the code examples for a learner who's only proficient in Python. We strongly believe that Statistical Rethinking is an intuitive resource for building a solid foundation in the world of Bayes and with this project, our goal is to make your first steps as seamless as possible. Happy Learning!
Each .ipynb
file should have the ability to run independently by clicking the "Open in Colab" button at the top of every notebook.
APA Reference:
McElreath, R. (2020). Statistical Rethinking: A Bayesian Course with examples in R and Stan. Routledge.