exercises for Wed Sep 15
1. On Wed Sep 8 we did Nils Exercise 12 and the book's 2.9, 2.10, with various related comments and extensions. I've uploaded R scripts com25b, street cars of San Francisco, and com27a, alarm or no alarm. Play with the code, tweak parameters, etc., to learn more. In particular, you should *invent your own prior* for the street cars exercise, to see how that affects the results.
2. We also discussed material from Ch 2, with more on binomial-beta and normal-normal setups. Next week we round off Ch 2 and start on Ch 3.
3. Exercises for Wed Sep 15:
(i) Go back to Nils Exercise 1, where I gave 10 data points for a Poisson. Find the distribution of the not-yet-seen data point 11. Give a 90 percent credibility interval for that data point.
(ii) A modern reader of Bayes's original publication can ask and check some follow-up points. Here's one. Imagine 10^4 people getting their 10^4 coins from the local coin factory, which produces coins with theta = Pr(krone) following a uniform distribution. These 10^4 people go home and throw their coins n = 50 times, recording y = the number of krone. Simulate this in your computer, check the 10^4 vaues of y. Supply the math to explain what you find.
(iii) Suppose y given theta is N(theta, sigma^2), with given sigma, and that theta has a prior N(theta_0, sigma_0^2), with given theta_0 and sigma_0. As shown in the book, theta given y is then a normal, with updated parameters. Find explicit formulae for these. Show in particular that the posterior mean is a mixture between prior guess theta_0 and data point y, and find the ratio of the posterior standard deviation to what is was before y was observed.
(iv) Suppose theta is the "real" IQ score, and that the distribution of these, for a certain population (like all Norwegians above 18) is a N(100, 15^2). Suppose then that a certain IQ test is such that for an individual with IQ theta, the test gives y, which is N(theta, 5^2). If y is taken from a randomly sampled person, what is the marginal distribution of y? Assume the test gives y = 117, for Ola N. Ordmann. What is the distribution of his theta, given this information? Give a 90 percent credibility interval for his theta.
(v) Exercise 2.13, with the airline disaster data.