Bayesian statistics, simulation and software

Module 01 (Wednesday 24 Nov 8:45 - 12:00)

Topics: Basic probability.

Module 02 (Wednesday 24 Nov 12:30 - 15:45)

Topics: Introduction to the R software package.

  1. Overview of R and RStudio, and setting up an RStudio project. There is no material for this overview where you are expected to follow along and set things up.
  2. Introduction to R commands etc. We go through the material in R-demo.pdf in a live programming session. (Correspondig script: R-demo.R)
  3. Introduction to Rmarkdown documents. As an example we will look at the file exercises02.Rmd which was used to generate the exercises for module 2. Solutions are provided in pdf and Rmd formats.

Module 03 (Thursday 25 Nov 8:45 - 12:00)

Topics: Bayesian principle, the binomial model, conjugate priors.

Please read sections 1-2.2 in the notes A brief introduction to Bayesian inference.

  1. We start by going through this material about the binomial model mainly covering likelihood inference and only briefly introducing Bayesian inference. The exercises for this part are here, and you may use the Rmarkdown file as a template for answering the exercises. Solutions are provided in pdf and Rmd formats.
  2. We then go through the main slides with more details about the binomial model in the Bayesian setting and more. For this part solve exercises 1, 2, and 3 in the notes A brief introduction to Bayesian inference. (If you don't manage to solve all 3 exercises, you may continue in the afternoon.) Here you find the solutions.

Module 04 (Thursday 25 Nov 12:30 - 15:45)

Topics: The Gaussian model, conjugate and improper priors.

Please read sections 2.3-2.6 in the notes A brief introduction to Bayesian inference.

Module 05 (Friday 26 Nov 8:45 - 12:00)

Topics: Introduction to simulation based inference.

  1. We first go through the main slides.
  2. Then the supplementary material contains a lot of the details of the implementation in R.
  3. The first exercise concerns this R implementation. Solutions are provided in pdf and Rmd formats.
  4. Finally, the remaining time is devoted to this mark-and-recapture exercise. This frequentist analysis mainly uses material from lecture 3, while we at a later stage will conduct a Bayesian analysis. It may be convenient to download this Rmarkdown source file for the exercise. Solution is provided in pdf and Rmd formats. Also a comment about the likelihood is available

Module 06 (Friday 26 Nov 12:30 - 15:45)

Topics: The Gibbs sampler.

Read about Gibbs sampling, see Section 8 in "A short diversion into...". A minor point: Notice that the gamma distribution is parameterised differently from what we have done so far in this course.

Module 07 (Monday 29 Nov 8:45 - 12:00)

Topics: More Markov chain Monte Carlo methods.

  1. We first go through the supplementary material which concerns rejection sampling and practical aspects in R.
  2. Then there is time to work on exercises about rejection sampling. Solutions are provided in pdf and Rmd formats.
  3. Then we go through the main slides.
  4. Finally, there is time to work on this exercise. Solutions are provided in pdf and Rmd formats.

Module 08 (Monday 29 Nov 12:30 - 15:45)

Topics: More MCMC: Invariant density, irreducibility, Metropolis-Hastings algorithm.

Module 09 (Tuesday 30 Nov 8:45 - 12:00)

Topics: More MCMC: Metropolis-Hastings algorithm, burn-in, tuning.

Module 10 (Tuesday 30 Nov 12:30 - 15:45)

Topics: Bayesian prediction and model checking.

Module 11 (Wednesday 1 Dec 8:45 - 12:00)

Topics: A mixture model and JAGS.

Module 12 (Wednesday 1 Dec 12:30 - 15:45)

The final module is devoted to the hand-in exercise that must be completed to obtain credit for the course (see the front page for the hand-in date).