24.3 Sampling from the posterior predictive distribution
Given draws from the posterior θ(m)∼p(θ∣y), draws from the posterior predictive ˜y(m)∼p(˜y∣y) can be generated by randomly generating from the sampling distribution with the parameter draw plugged in, ˜y(m)∼p(y∣θ(m)).
Randomly drawing ˜y from the sampling distribution is critical because there are two forms of uncertainty in posterior predictive quantities, sampling uncertainty and estimation uncertainty. Estimation uncertainty arises because θ is being estimated based only on a sample of data y. Sampling uncertainty arises because even a known value of θ leads to a sampling distribution p(˜y∣θ) with variation in ˜y. Both forms of uncertainty show up in the factored form of the posterior predictive distribution, p(˜y∣y)=∫p(˜y∣θ)⏟samplinguncertainty⋅p(θ∣y)⏟estimationuncertaintydθ.