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 do the following exercises:

  1. Use the grid approach with other priors; for example, try with prior = (grid <= 0.5).astype(int) or prior = abs(grid – 0.5), or try defining your own crazy priors. Experiment with other data, like increasing the total amount of data or making it more or less ...

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.