# In Bayesian Linear Regression, do I need to take multiple samples of the Posterior for prediction?

Given \begin {align} \beta&\sim\mathcal N(1.5,1)\\ y&\sim\mathcal N(\beta x,5.5) \end{align}I have 10,000 samples from the posterior $$\beta_S\sim P(\beta|x)$$

Is it enough to get the prediction posterior samples by computing $$\hat \mu_s=\beta_s x$$ for $$s=1\cdots10,000$$?

And getting a Single sample with dimension $$(10000,1)$$ from $$\mathcal N(\hat\mu,5.5)$$?

Or do I still need to take N samples of the above and get a sample dimension $$(N,10000,1)$$?

I need the prediction distribution samples and I don't know how to properly get the posterior predictive samples.

You want the posterior predictive for $$y$$, which will be given as $$p(y^{rep}|y)=\int p(y^{rep}|\beta,y)p(\beta|y)=\int p(y^{rep}|\beta)p(\beta|y)$$. This suggests the following procedure for generating samples from the posterior predictive.
1. Draw from your posterior of $$\beta_s\sim p(\beta|y)$$
2. From each of your sampled $$\beta_s$$ draw $$y|\beta_s\sim N(\beta_s x,5.5)$$.
• In step 2, how many samples $y|\beta_s$ for a single sampled $\beta_s$? Is one sample sufficient or do I take M samples and get the mean Nov 10, 2023 at 3:14
• One sample is sufficient in step 2 for each $\beta_s$. Nov 10, 2023 at 3:15