Pm.sample() - How can the posterior be defined when there is no observed data to calculate the likelihood?

I think this might just be about semantics, but when there is no observed data in the likelihood, pm.sample still is returning the posterior distribution. It’s just that because there was no observed data the posterior = prior, because that’s how Bayesian updating works. If you have a prior, and then you observe no data to update the prior, the “new” posterior must be the same as the prior. Anything else wouldn’t make sense!

In other words, should we expect the same behavior when pm.sample is queried with no observed data, as we would when calling pm.sample_prior_predictive?

Yes, but it’ll be called (I think correctly) posterior in the trace.

2 Likes