Exercises

We don't know if the brain really works in a Bayesian way, in an approximate Bayesian fashion, or maybe some evolutionary (more or less) optimized heuristics. Nevertheless, we know that we learn by exposing ourselves to data, examples, and exercises. Although you may disagree with this statement given our record as a species on wars, economic-systems that prioritize profit and not people's wellbeing, and other atrocities. Anyway, I strongly recommend you to do the proposed exercises at the end of each chapter:

  1. Modify the code that generated figure 3 in order to add a dotted vertical line showing the observed rate head/(number of tosses), compare the location of this line to the mode of the posteriors in each subplot.
  2. Try reploting figure ...

Get Bayesian Analysis with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.