[Webinar] 12-Aug-2025: A Tutorial for Getting Started with PyMC

A Tutorial for Getting Started with PyMC

This one-hour tutorial introduces new users to version 5 of PyMC, a powerful Python, open source library for probabilistic programming and Bayesian statistical modeling. Participants will learn the fundamentals of PyMC, best practices for installation and setup, and gain hands-on experience building their first Bayesian model.

Background
WinBUGS, released in 1997, was the first software to provide an alternative to manually coding samplers for Bayesian models. However, it had a number of limitations. WinBUGS and OpenBUGS provided invaluable experience in Bayesian modeling for beginners, and paved the way for the development of PyMC as well as other tools that made it easier to implement Bayesian inference methods.

In 2003, Chris Fonnesbeck began writing the first version of PyMC, with the goal of being able to build Bayesian models in Python. PyMC 1.0 was released in 2005. Learn more about the history of PyMC up to 2023 here: PyMC: Past, Present, and Future — PyMC project website

PyMC has experienced an estimated 40-60% adoption growth since 2022, establishing itself as the most accessible entry point for Python developers into probabilistic programming through its intuitive syntax and seamless integration with the PyData ecosystem. While Stan remains the academic gold standard and NumPyro excels in raw computational performance, PyMC’s recent JAX integration now delivers competitive speed while maintaining the familiar, Pythonic workflow that makes Bayesian modeling approachable for newcomers.

Prerequisites

Resources

Event Outline

1. Introduction to PyMC and Probabilistic Programming

  • What is PyMC and its role in the Python data science ecosystem
  • Understanding probabilistic vs Bayesian approaches
  • The probabilistic programming landscape
  • Real-world applications and case studies

2. Installation and Environment Setup

  • Recommended installation procedure
  • Understanding PyMC’s computational backends
  • Troubleshooting common installation issues
  • Setting up development environments

3. PyMC Fundamentals

  • Model contexts and random variables
  • Prior and likelihood specification
  • Working with observed data
  • Understanding PyMC’s relationship with ArviZ

4. Building Your First Model

  • Hands-on example: Bayesian linear regression
  • Prior predictive checks
  • Posterior sampling with NUTS
  • Basic model diagnostics
  • Posterior predictive checks

5. Common Pitfalls and Solutions

  • Addressing frequently asked questions
  • Debugging convergence issues
  • Understanding and fixing divergences
  • Performance optimization tips

6. The PyMC Ecosystem and Resources

  • ArviZ for visualization and diagnostics
  • Related packages (Bambi, PyMC-experimental)
  • Finding and using PyMC example notebooks
  • Community resources and support channels

7. Future Directions

  • How AI/LLMs are changing PyMC workflows
  • PyMC’s development roadmap
  • Opportunities for contribution

How to Join the Webinar

You can join via your browser (no app download required). Use Chrome or Firefox. Pre-register for the webinar:


Video Recording

This event will be recorded and placed on our YouTube. We usually have it up within 24 hours of the event. Subscribe to our YT and set your notifications: https://www.youtube.com/c/DataUmbrella/


Time

16:00 UTC, 9am PT / 12pm ET / 6pm Paris / 7pm EAT / 9:30pm IST (Daylight Savings Time)


Additional Details

Talk Level: Beginner


About Speaker

Chris is a Principal Quantitative Analyst at PyMC Labs and an Adjoint Associate Professor at the Vanderbilt University Medical Center, with 20 years of experience as a data scientist in academia, industry, and government, including 7 years in pro baseball research with the Philadelphia Phillies, New York Yankees, and Milwaukee Brewers. He is interested in computational statistics, machine learning, Bayesian methods, and applied decision analysis. He hails from Vancouver, Canada and received his Ph.D. from the University of Georgia.​​

LinkedIn: https://www.linkedin.com/in/christopher-fonnesbeck-374a492a/
GitHub: fonnesbeck (Chris Fonnesbeck) · GitHub
Bluesky: @fonnesbeck.bsky.social on Bluesky

1 Like

The video for @fonnesbeck’s presentation today “A Tutorial for Getting Started with PyMC”:

Eventually, we will get the timestamps added as well as a transcript posted.

A link to the slides is coming soon. I will update this post as more resources become available or have been created.

Thanks @fonnesbeck for a terrific and engaging presentation.

3 Likes

The slides are now available for the “Getting Started with PyMC” presentation delivered on 12-Aug-2025: Getting Started with PyMC

The timestamps have beed added for “Getting Started with PyMC”: https://youtu.be/jrU0UBr2z3k

## Timestamps

00:00 Data Umbrella introduction
03:50 Chris F begins presentation
05:42 Agenda / outline
06:18 What is PyMC?
07:37 Why Bayesian modeling?
08:58 Real world applications
10:08 Installation and setup
12:20 Sampling backends and libraries
12:40 Q: what about uv for installation?
13:32 Q: what is the recommended installation for HPC?
16:28 Test your installation
17:00 Trouble shooting common issues
19:42 Performance: BLAS backends
20:29 PyMC fundamentals \- Bayes Theorem and the Computational Challenge
21:57 MCMC inference method (the model container, random variables and distributions)
25:22 Observed data
26:09 Data handling pitfalls (NumPy, pandas, polars, dataframes; missing data)
27:47 ArViz: diagnostics and visualization
28:58 Building your first model
31:20 Models dims and coords
32:23 Common modeling errors
33:35 Prior predictive check
34:49 Sampling the posterior
35:50 Trace plots: checking convergence; posterior distributions, parameter relationships, model summary table
40:35 Common pitfalls and solutions (convergence diagnostics, divergences, diagnosing sampling problems)
44:19 Performance optimization (prior specification problems)
47:11 Debugging workflow
48:49 Bambi: high-level modeling
49:33 PyMC-Extras: Cutting edge
50:25 Community & learning resources (+ PyMC example notebooks)
54:05 Future direction of PyMC
56:30 Community & Process
57:40 Q: what program did you use to create the slides? https://sli.dev
58:50 Q: is PyMC using NumPy v2.0? (Answer: yes)
01:00:13 Q: why use the context manager?
01:01:02 Q: How can I evaluate whether my model has too many parameters?

The full transcript for @fonnesbeck presentation “Getting Started with PyMC” is now available: Getting Started with PyMC — PyMC project website