The full Bayesian inference procedure
The full Bayesian inference starts by specifying the model architecture, including the prior distribution for unknown (unobserved) parameters and the likelihood function that determines how the data is generated. We can then perform MCMC to infer the posterior distribution of these parameters given the observed dataset. Finally, we can use the posterior distribution to either quantify the uncertainty about these parameters or make predictions for new input data with quantified uncertainty about the predictions.
The following exercise illustrates this process using the mtcars
dataset.
Exercise 14.4 – Performing full Bayesian inference
In this exercise, we will perform Bayesian linear regression with a single feature and two unknown parameters: intercept
and slope
. The model looks at the relationship between car weight (wt
) and horsepower (hp
) in the mtcars
dataset. Follow the next steps:
- Specify a Bayesian inference model...