Topic | Description | Link |
---|---|---|
Lesson | PyMC & Bayesian Regression Notebook | Link |
Dataset description: Skittles bag contents, wage gap data
After this lesson, students will be able to:
- Recap the purpose of Bayesian methods.
- Define conjugacy
- Fit models in PyMC.
- Interpret traceplots and posterior distributions.
Before this lesson(s), students should already be able to:
- Describe prior distributions, likelihood functions, and posterior distributions.
- Fit and interpret linear and logistic regression models.
- Interpret confidence intervals.
Total Time: 110 minutes
I. Recap and Conjugacy (40 minutes total)
- Priors, Likelihoods, Posteriors
- Conjugacy
II. Regression in PyMC (70 minutes total)
- Selecting Priors
- Fitting a Model
- Checking Output
- Example 1: Skittles
- Example 2: Election
- Example 3: Wage Gap Analysis
For supplemental reading material on this topic, check out the following resources:
- PyMC Documentation: Linear Regression
- Probabilistic Programming & Bayesian Methods for Hackers
- Andrew Gelman's Recommendations for Selecting Priors
- Think Bayes!
- Wikipedia: Conjugate Prior