Exercises

  1. For the first model, change the prior for the mean to a Gaussian distribution centered at the empirical mean and play with a couple of reasonable values for the standard deviation of this prior. How robust/sensitive are the inferences to these changes? What do you think of using a Gaussian, which is an unbounded distribution, to model bounded data like this? Remember we said is not possible to get values below 0 or above 100.
  2. Using the data from the first example, compute the empirical mean and the standard deviation with and without outliers. Compare those results to the Bayesian estimation using the Gaussian and Student's t-distribution . Repeat the exercise adding more outliers.
  3. Modify the tips example to make it robust to outliers. ...

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.