BayesianDecisionAnalysis

Repository for a workshop on Bayesian Decision Analysis

View the Project on GitHub AllenDowney/BayesianDecisionAnalysis

 

 

 

PyData Global

This repository contains slides and Jupyter notebooks for a tutorial on Bayesian Decision Analysis. Most recently I presented it at PyData Global 2022.

Abstract

This tutorial is a hands-on introduction to Bayesian Decision Analysis (BDA), which is a framework for using probability to guide decision-making under uncertainty. I start with Bayes’s Theorem, which is the foundation of Bayesian statistics, and work toward the Bayesian bandit strategy, which is used for A/B testing, medical tests, and related applications. For each step, I provide a Jupyter notebook where you can run Python code and work on exercises. In addition to the bandit strategy, I summarize two other applications of BDA, optimal bidding and deriving a decision rule. Finally, I suggest resources you can use to learn more.

The examples in this tutorial are from Think Bayes.

Outline

Prerequisites

For this tutorial, you should be familiar with Python at an intermediate level. We’ll use NumPy, SciPy, and Pandas, but I’ll explain what you need to know as we go. You should be familiar with basic probability, but you don’t need to know anything about Bayesian statistics. I provide Jupyter notebooks that run on Colab, so you don’t have to install anything or prepare ahead of time. But you should be familiar with Jupyter notebooks.

Previous versions

For the extended version of the workshop, here are the slides.

For each of the notebooks below, you have two options: if you view the notebook on NBViewer, you can read it, but you can’t run the code. If you run the notebook on Colab, you’ll be able to run the code, do the exercises, and save your modified version of the notebook in a Google Drive (if you have one).

Click here to run this notebook on Colab or click here to read it on NBViewer

Then take this quiz

02_pmf

Click here to run this notebook on Colab or click here to read it on NBViewer

Then take this quiz

03_euro

Click here to run this notebook on Colab or click here to read it on NBViewer

Then take this quiz

04_bandit

Click here to run this notebook on Colab or click here to read it on NBViewer

Then take this quiz