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:
- 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.
- Try reploting figure 3 using other priors (
beta_params
) and other data (trials and data). - Read about Cromwell's rule at Wikipedia https://en.wikipedia.org/wiki/Cromwell%27s_rule.
- Explore different parameters for the Gaussian, binomial and beta plots. Alternatively, you may want to plot a single distribution instead of a grid of distributions.
- Read about probabilities and the Dutch book at Wikipedia https://en.wikipedia.org/wiki/Dutch_book.