I was performing some standard model checking and realized strange outputs when recreating plots for posterior predictive checks. My question closely relates to this one; however, I am wondering how this extends into prediction. I created a gist that provides all of the details.
Basically, I see that the distribution of values from a single draw align nicely with the distribution of my observed data. However, the distribution of the mean of the draws does not.
Using plot_ppc
from arviz
:
Same thing but by hand:
The dark blue lines in mine are the same as the blue lines in the arviz
version. The baby blue in mine is the same as the orange in the arviz
version. The KDE of all the samples is not the same as the KDE of the mean of the samples. Similarly, red in mine is the same as black in arviz
. (probably should have just matched colors…)
In the linked post @OriolAbril points out how this fits within a Bayesian context, but my question is how this extends into prediction. For example, in the example I provided, we want to make some predictions on a test set. I completely understand the point that a main advantage of Bayesian methods is that we obtain a distribution instead of just a point estimate. However, in some cases we may need to use a point estimate as our prediction for use in real-world applications (also I get that the advantage is that we can choose what that point estimate is, e.g., MAP, median, …).
Does taking the mean of our predictions (e.g., over chain
and draw
) have the same impact that it does when we are performing posterior predictive checks? Given that predictions are basically posterior checks on new observations, I don’t see how this would not be something to consider here.
Sorry if this is very basic, but I don’t see quite as much discussion around predictions.
Thanks.