Exercise 2 of MOA Tutorial 2. (http://moa.cms.waikato.ac.nz/)