exercises for Wed Oct 20
1. Nils has "office hours" Mondays 14:15 to 15:30, where you might knock on his door to have conversations about stk 4021 (apart from Mon Oct 18, due to a certain statistics seminar).
2. On Wed Oct 13 we rounded off Ch 4, with the Old Egypt lifelengths data exercise, using the Weibull model, with (a_m, b_m) for men and (a_w, b_w) for women, etc. We then jumped to Chapters 10, 11, with MCMC, and the Metropolis algorithm.
3. I've placed R scripts com39a (old Egypt) and com41a (generic Metropolis MCMC) at the website; check them, run them, play with other questions and setups.
4. The Oblig is made available at t_0 = Tue Oct 19, with your reports to be handed in at t_1 = Tue Nov 2.
5. For Wed Oct 20, do the following exercises.
(i) Construct a model p(x) for all 4 x 4 squares x, with numbers 1, 2, ..., 15, 16, of the form p(x) = c \exp(-\lambda Q(x)), where Q(x) = |sum_1 - 34| + ... + |sum_{10} - 34|, with 4 row sums, 4 column sums, 2 diagonal sums. Set up an MCMC to simulate from this distribution. Let it run for a while, perhaps 10^5 times, to spot a case of x^* with Q(x^*) = 0, which means you've found a Magic Square, with all these ten sums equal to 34. Check two Nils FocuStat Blog Posts, about Magic Squares, and about Sudoko Solving via MCMC; there are "cursory curriculum".
(ii) Use Metropolis, with a version of com41a, to simulate from the distribution 0.2 N(-2,1) + 0.6 N(0,1) + 0.2 N(2,1).
(iii) Find the old Nils STK 4020 Exam Project from 2008, and do points 3(b), 3(c), about the Old Egypt data.