Bayesian inference with OpenBugs, 


Teacher: Jukka Ranta (jukka.ranta at 

Scope: 5 op

Type: intermediate / advanced studies

Teaching: Lectures and computer class working.

Topics:This course consists of practical examples of Bayesian inference that can be implemented graphically by using so called 'DoodleBUGS' feature that is part of OpenBUGS (or WinBUGS) software. Each model is a DAG - a Directed Acyclic Graph which defines conditional probabilities between variables in the model. Once the graphical model is defined, the BUGS model code can also be printed out. However, we focus on the graphical models rather than BUGS-programming. The goal is to learn the basics with no requirement of extensive programming skills. Each example will introduce step-by-step some standard probability distributions when building the models. With a bottom-up-approach, we gradually get more familiar with the theory of Bayesian inference, and how it works with BUGS. The examples include practical problems with sampling problems (binomial-model), observed counts (Poisson-model), measurement data (normal-model), categorical data (multinomial-model) and regression models. We will work intensively hands on the practical examples with computers.

Prerequisites: Studies in probability, statistical inference, linear models, data-analysis with R-program. In statistic major degree requirements this course is scheduled for students who have already taken the courses 57045, 57046,  57703, 57705, 57701, 57714. A recommendation is that you have also taken a course which includes bayesian statistics, such as 57753, 57733, 57059, 57744. It is also possible to catch the relevant basics on bayesian statistics by self learning during this course (57745).



Teaching schedule

IV teaching period, Wednesdays 14-18 in computer class C128


Written home-work report of max 10 pages (pdf-file) consisting of a worked out example problem. This should include written text (Finnish/English), the BUGS-model, figures and tables. The report should clearly present the problem, the aims, the mathematical formulation of the problem, attached and tested BUGS-model for computing it, and the results with discussion. Some possible topics for the home-work are suggested, but you can also suggest your own topics. An ideal choice should not be too trivial, but not too extensive problem either  - to fit 10 pages. A successful report shows that you have (1) learned the modeling principles and can (2) apply them into your own data-analysis problems, and (3) document and explain clearly what you have done.           


Course material:

Written course text. You might also find this book useful: 'The BUGS Book: A practical introduction to Bayesian analysis.'. D. Lunn et al., CRC Press.2013. 


Did you forget to register? What to do?



  • Set 1
  • Set 2

Course feedback

Course feedback can be given at any point during the course. Click here.

  • No labels