2.10 Exercises
Using PyMC, change the parameters of the prior Beta distribution in
our_first_model
to match those of the previous chapter. Compare the results to the previous chapter.Compare the model
our_first_model
with prior θ ∼ Beta(1,1) with a model with prior θ ∼(0,1). Are the posteriors similar or different? Is the sampling slower, faster, or the same? What about using a Uniform over a different interval such as [-1, 2]? Does the model run? What errors do you get?PyMC has a function
pm.model_to_graphviz
that can be used to visualize the model. Use it to visualize the modelour_first_model
. Compare the result with the Kruschke diagram. Usepm.model_to_graphviz
to visualize modelcomparing_groups
.Read about the coal mining disaster model that is part of the PyMC documentation ( https://shorturl.at/hyCX2). Try to implement and run this model by yourself.
Modify
model_g
, change the prior for the mean to a Gaussian distribution centered at the...