Exercises for Part I

9. Exercises for Part I#

In this chapter we collect various exercises to build intuition or gain practice in the basics of Bayesian inference, including the rules of plausible inference, parameter estimation, and a first exposure to Monte Carlo sampling.

  • Exercise: Checking the sum and product rules. Practice applying the sum and product rules (and their consequences: marginalization, Bayes’ theorem, conditional independence) using a simple and intuitive frequentist example.

  • Exercise: Standard medical example using Bayes. Practice on translating English statements into probability notation and then applying the Bayesian rules.

  • πŸ“₯ Parameter estimation example: Gaussian noise and averages I takes a look at a simple parameter-estimation problem, namely estimating the mean and the variance of a normal distribution that is associated with a collection of random variables. The exercise develops a Bayesian approach to this problem and shows how it reduces to standard frequentist estimators for a particular choice of prior.

  • πŸ“₯ Radioactive lighthouse problem explores a variation on a classic problem from Gull, which entails identifying the location of a hidden radioactive source using a Bayesian approach.

  • The goal of πŸ“₯ Amplitude of a signal in the presence of background is to estimate the amplitude of a signal when there is background. The notebook considers a limiting case where the background is flat, so it is completely specified by its magnitude, and the signal is known to be a Gaussian with unknown amplitude but (at least initially) known position (mean) and width (standard deviation). This exercise can be considered a first exposure to an experimental design problem.

  • πŸ“₯ Parameter estimation example: fitting a straight line is a simple Bayesian parameter estimation example in the context of the familiar problem of fitting a straight line to noisy data.

The final exercises introduce the use of Markov Chain Monte Carlo (MCMC) sampling in basic parameter estimation problems, but in a black-box mode. This first exposure to MCMC is focused on the visualization and interpretation of sampled posteriors, without delving into the details of how the MCMC algorithm that creates them works. Those latter details are explored in Overview of Part III: Sampling, which develops intuition, provides technical details, and introduces diagnostics for troubleshooting and validation.