For Bayesian linear regression with prior and noise precision , derive the log evidence . Which terms reward fit, and which penalise complexity?
Probabilistic models, Model evidence
Level L4 Advanced. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can evaluate a Gaussian integral by completing the square and interpret the Occam factor .
Key idea
Write the integrand as and complete the square around the posterior mean: with . The integral then gives .
Steps
- The evidence is , with weights and data points.
- The two densities give prefactors times , where .
- is quadratic in with Hessian and minimum at . So .
- The Gaussian integral: .
- Take logs: .
- Interpretation: rewards fit (low squared error and small weights). The term penalises complexity. Since , it grows with the number of well-determined weights, so more flexible models are charged more.
- We choose and (or the number of features) by maximising this evidence, with no validation set. As a check, with , , and the data , we get and .
Common mistakes
- Forgetting the term from the prior's normaliser.
- Dropping and keeping only the fit term. Then the best model is always the most complex.
- Using in place of . The sign of the determinant term then flips.
How long your answer should be
A page. About 8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Probabilistic models: In mean-field variational inference, with , show that the optimal factor satisfies . How is this used as an algorithm?
Next in Probabilistic models: Derive the log marginal likelihood of a GP regression model with , , and its gradient with respect to a kernel hyperparameter . How do the data-fit and complexity terms trade off as the length-scale grows?