Simulation and Statistical Programming Hilary Term 2020

Page last updated: 2:20pm April 27, 2020


The information given in this section supercedes that given in the rest of the website. The exam for this course is postponed indefinitely. Please follow Departmental webpages for more details about the exam. Ordinarily for this course, in Trinity Term (TT), there would be one problem class in TT week 1, one revision class in each of TT weeks 2 and 3, and one consultation class in each of TT weeks 4 and 5. These will now be handled as follows.

General information



Week Lecture
Tuesday 2-3pm
LG.02, the IT suite, 24-29 Saint-Giles'
Computer Lab
Friday 9-11am
LG.02, the IT suite, 24-29 Saint-Giles'
Problem class
Various times
24-29 Saint-Giles'

Problem class details and sheets

Class Tutor TA Time Location weeks HT3, 5, 7 Location week TT1
1Robbie DaviesSheheryar ZaidiWednesday 9AM LG.02 LG.02
2Anthony CateriniAnthony CateriniThursday 11-12PM LG.02 LG.03
3Anthony CateriniSheheryar ZaidiThursday 10-11AM LG.02 LG.03
4Bobby HeBobby HeWedesnday 4-5PM LG.04 LG.04

Please hand in the solutions to the problem sheets by Monday noon of weeks 3, 5, 7 and send the R code by email, in a single well-commented R-script to the class TA.

Simulation lectures

Lecture slides with previous year contents and format are available here, here, and here. I will be minimally modifying these slides for this year. I will post the slides I will use below a few days before class.

Statistical programming lectures, problem sheets and solutions

Week Slides Practical Solutions Code Extra
3Slides 1 Practical 1 Solutions 1
4Slides 2 Practical 2 Solutions 2 Code 2
5Slides 3 Practical 3 Solutions 3 Code 3
6Slides 4 Practical 4 Solutions 4 Code 4
7Slides 5 Practical 5 Solutions 5 Code 5
8Slides 6 Practical 6 Solutions 6 Code 6 MHcode.R

Handouts (fewer pages, same information) of the slides are available here, as well as 4 per page here.

Datasets: Cystic Fibrosis (cystfibr.txt), Tetrahymena Data (hellung.txt), Japanese beetle larvae data (beetlelarva.txt), Speed Data (speed.txt), Air Pollution Data (airpol.txt), Image Data (image_noisy.txt, image_true.txt).

Past course material


We will be using the statistical software package R, which you can get here. Please install it on your own computer and practice using it as early as possible. You may find it helpful to bring a laptop to use during lectures, but it is not necessary.

The software RStudio is also useful.

You may find it useful to use R through a text editor. If you can stomach the learning curve of memorizing a few dozen key combinations, I highly recommend Emacs Speaks Statistics. You can download an all in one installer if you use a mac laptop here. The benefit of ESS is that the development environment when you use a laptop or a server is the same. This facilitates development in the real world, where almost always, the data is too sensitive to download locally, or your local workstation / laptop has insufficient storage or power to perform analysis locally.


This course material was almost entirely prepared by others who lectured this course earlier, including at least Julien Berestycki, Geoff Nicholls and Robin Evans.