Logo

Lessons

  • 0. Preparing for the course
  • 1. Probability and the logic of scientific reasoning
  • 2. Plotting posteriors
  • 3. Marginalization by numerical quadrature
  • 4. Conjugacy
  • E1. To be completed after lesson 4
  • 5. Introduction to Bayesian modeling
  • 6. Parameter estimation by optimization
  • E2. To be completed after lesson 6
  • 7. Introduction to Markov chain Monte Carlo
  • 8. Cloud computing setup and usage
  • 9. Introduction to MCMC with Stan
  • 10. Mixture models and label switching with MCMC
  • 11. Regression with MCMC
  • E3. To be completed after lesson 11
  • 12. Display of MCMC results
  • 13. Model building with prior predictive checks
  • 14. Posterior predictive checks
  • E4. To be completed after lesson 14
  • 15. Collector’s box of distributions
  • 16. MCMC diagnostics
  • 17. A diagnostics case study: Artificial funnel of hell
  • E5. To be completed after lesson 17
  • 18. Model comparison
  • 19. Model comparison in practice
  • E6. To be completed after lesson 19
  • 20. Hierarchical models
  • 21. Implementation of hierarchical models
  • E7. To be completed after lesson 21
  • 22. Principled analysis pipelines
  • 23: Simulation based calibration and related checks in practice
    • ECDFs of mRNA counts
    • The generative model
    • Performing SBC
      • An adjusted prior
    • Sampling with our new model
    • Conclusions
    • Computing environment
  • E8. To be completed after lesson 23
  • 24. Introduction to Gaussian processes
  • 25. Implementation of Gaussian processes
  • E9. To be completed after lesson 25
  • 26: Variational Bayesian inference
  • 27: Wrap-up

Recitations

  • R1: Review of probability
  • R2. Review of MLE
  • R3. Choosing priors
  • R4. Stan installation and use of AWS
  • R5. A Bayesian modeling case study: Ant traffic jams
  • R6. Practice model building
  • R7. Introduction to Hamiltonian Monte Carlo
  • R8: Discussion of HW 10 project proposals
  • R9: Sampling discrete parameters with Stan

Homework

  • 0. Configuring your team
  • 1. Intuitive generative modeling
  • 2. Analytical and graphical methods for analysis of the posterior
  • 3. Maximum a posteriori parameter estimation
  • 4. Sampling with MCMC
  • 5. Inference with Stan
  • 6. Practice building and assessing Bayesian models
  • 7. Model comparison
  • 8. Hierarchical models
  • 9. Principled pipelines
  • 10. The grand finale
  • 11. Course feedback

Schedule

  • Schedule overview
  • Homework due dates
  • Lesson exercise due dates
  • Weekly schedule

Policies

  • Meetings
  • Lab sessions
  • Lessons and lesson exercises
  • The BE/Bi 103 GitHub group
  • Homework
  • Grading
  • Collaboration policy and Honor Code
  • Excused absences and extensions
  • Course communications
  • “Ediquette”

Resources

  • Software
  • Reading/tutorials
BE/Bi 103 b
  • »
  • 23: Simulation based calibration and related checks in practice
  • Open in Google Colab | Download notebook

23: Simulation based calibration and related checks in practice

Data set download


[2]:
import numpy as np
import pandas as pd
import scipy.stats as st

import cmdstanpy
import arviz as az

import iqplot

import bebi103

import holoviews as hv
hv.extension('bokeh')
bebi103.hv.set_defaults()

import bokeh.io
import bokeh.plotting
bokeh.io.output_notebook()
/Users/bois/opt/anaconda3/lib/python3.9/site-packages/colorcet/__init__.py:74: UserWarning: Trying to register the cmap 'cet_gray' which already exists.
  register_cmap("cet_"+name, cmap=cm[name])
/Users/bois/opt/anaconda3/lib/python3.9/site-packages/colorcet/__init__.py:74: UserWarning: Trying to register the cmap 'cet_gray_r' which already exists.
  register_cmap("cet_"+name, cmap=cm[name])