Requesting for help to understand the basic of bayesian estimation

I am not sure if I can explain this one.

Your PyMC model defines the posterior probability model of P(mu, sigma | y) = P(y | mu, sigma) * P(mu, sigma) or, because mu and sigma are independent, = P(y| mu, sigma) * P(mu) * P(sigma) (the = should read as proportional). The pm.sample statement then takes samples from this posterior via the NUTS algorithm.

The observed argument is basically transforming the prior joint model of P(mu, sigma, y) into the posterior P(mu, sigma | y), or in other words, conditioning the model on the observed values of y. If you remove the observed argument, and call pm.sample you will instead obtain samples from this very prior.

2 Likes