Bayesian Analysis with Python

Book Cover

The third edition of Bayesian Analysis with Python is an introduction to the main concepts of applied Bayesian inference and its practical implementation in Python using state-of-the-art libraries like PyMC, ArviZ, Bambi, PyMC-BART, PreliZ, and Kulprit.

By the end of this book, you will possess a functional understanding of probabilistic modeling, enabling you to design and implement Bayesian models for your data science challenges. And you will well-prepared to delve into more advanced material if the need arises.

Table of Contents

Get the Book

You can get a copy of the book from:


All the code used in the book, including code to generate many of the images is available at GitHub

Solutions to exercises

Solutions to the exercises can be found at GitHub


If you find an error in the book, or have questions, please fill an issue in the book's GitHub repository


If you use this book in your own work, please cite it using: Martin Osvaldo A, Bayesian Analysis with Python. Packt Publishing. 2024. ISBN 978-1-80512-716-1

Here is the citation in BibTeX format

                title = {Bayesian {Analysis} with {Python}: {A} {Practical} {Guide} to probabilistic modeling, 3rd {Edition}},
                isbn = {978-1-80512-716-1},
                shorttitle = {Bayesian {Analysis} with {Python}},
                language = {English},
                publisher = {Packt Publishing},
                author = {Martin, Osvaldo A},
                month = feb,
                year = {2024},


This book is only possible because of open-source contributors. If you finds this tools useful you can donate to ArviZ or PyMC to help sustain their ongoing development..

If instead, you want to donate directly to me, the author, please do it at ko-fi