Suppose I have a sample drawn from a posterior predictive distribution of a previously trained Bayesian Network (or any other Bayesian model). I.e., I have a vector $\tilde{\textbf{y}}_n = [\tilde{{y}}_1, \tilde{{y}}_2, ..., \tilde{{y}}_n]$, where all elements are data points drawn from $\text{P}(\tilde{y} | \textbf{y})$.

My question is: What are the ways in which Bayesian statisticians would commonly make use of this sample, drawn from the predictive posterior distribution? Are my following three suggestions correct? Are there other ways?

1. Point estimate

We can summarize the sample vector $\tilde{\textbf{y}}_n$ with $1$ single scalar, that would represent our "prediction". For example, we could take the sample mean.

$$E[\tilde{y} | \textbf{y}] = \frac{1}{n} \sum_{i = 1}^{n} \tilde{y}_i$$

2. Probability estimate

We can compute the probability of having a future value larger than (or smaller than) a certain value. For instance, we might want to compute the probability that the future value will be larger than 8.5. Then, we could simply take the proportion of the elements in our sample vector $\tilde{\textbf{y}}_n$ that are larger than 8.5.

$$\text{P}(\tilde{y} > 8.5 | \textbf{y}) = \frac{1}{n} \sum_{i=1}^{n}{\textbf{1}_{\tilde{y}_i > 8.5}}$$

3. Prediction interval

Suppose that we want a prediction interval, in which 95% of the future values will lie. Then, we would simply take the 2.5th percentile from $\tilde{\textbf{y}}_n$ as lower bound and the 97.5th percentile from $\tilde{\textbf{y}}_n$ as upper bound to get the prediction interval:

$$\text{95% prediction interval: } (2.5^{\text{th}} \ \text{percentile}, 97.5^{\text{th}} \ \text{percentile})$$

  • 2
    $\begingroup$ All your suggestions seem to be using the simulated sample to say things about the distribution of predicted values. If possible, it might be better to do so from the posterior predictive distribution itself rather than from a sample. If you must use a simulated sample then you need to handle the possibility your sample is not a precise reflection of the posterior predictive distribution. $\endgroup$
    – Henry
    Commented Jul 23, 2021 at 14:24
  • $\begingroup$ In this context, using a sample to approximate the posterior predictive distribution is the only option. How would you account for the possibility that the sample is not a precise reflection of the posterior predictive distribution? My only answer would be: draw a sample as large as possible. $\endgroup$
    – jollycat
    Commented Jul 23, 2021 at 14:40

1 Answer 1


There's an unlimited number of uses. You can calculate the statistics you've shown, but also any other statistics (median, mode, standard deviation, etc), or any arbitrary functions, you can plot the posterior predictive distribution instead of calculating the intervals, you can do hypothesis tests, you can use it for decision making, e.g. find the conditions such that function $h(\tilde y)$ is maximized, etc. Same as you can use statistics to learn something about your observed data, you can use them on the predictions to make claims about the possible outcomes as predicted by the model.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.