Exercises for Tue Feb 13

1. On Feb 6 I went through more Dirichlet Process matters, including the Sethuranam stick-breaking representation, and how to simulate from a simple hierarchical setupt where parameters \theta_i stem from Dir(a P_0) and observattions are seen as y_i from f(y_i | x_i).

2. Check my R scripts com3a, com4a, com5a.

3. I also did a bit of Bayesian nonparametrics for the quantile function Q(y) = Finverse(y) = the minimum x for which F(x) \ge y. See also the Hjort-Petrone paper about such things which is now at the course webpage.

4. I'll rather soon tex up some Nils Exercises and Lecture Notes.

5. Exercises for Tue Feb 13:

(i) Use the stick-breaking representation to put an infinite sum representation for P(A), with A a fixed set. Show that E P(A) = p_0 = P_0(A), and find the 2nd and 3rd central means, E (P(A) - p_0)^2 and E (P(A) - p_0)^3. Check that these are as they should be, from the Beta distribution for P(A).

(ii) With n = 100 data points x_1, ..., x_n from P, where P is Dir(a P_0), simulate say 1000 such cases, and read off D_n, the number of unique points in the 100-sample. Check the distribution of D_n, from simulations, and check that it fits formulae for the mean and the variance.

(iii) Consider the model where y_i is N(\theta_i,1) and where the \theta_i come from Dir(a P_0) with P_0 a normal (0,9), i.e. standard deviation 3. Find the posterior for \theta_1 if you observe y_1 = 1.11. Find the posterior for (\theta_1, \theta_2) if you observe 1.11 and 2.22. Find following the posterior for (\theta_1, \theta_2, \theta_3) if you observe 1.11, 2.22, 3.33. Use simulations to display relevant histograms.

(iv) Go back to the war-and-peace data, with 37 values of y_i = log z_i before Vietnam and 14 values after Vietnam. Call the distributions F_L and F_R. Use Dirichlet priors, now with a = 0.01 (i.e. very small, where the prior mean functions almost disappear). Simulate from the quantile functions Q_L = F_L-inverse and Q_R = F_R-inverse. Plot bands. Read off what this says about the medians for the battle-deaths distributions before and after Vietnam.

Published Feb. 9, 2018 5:07 PM - Last modified Feb. 9, 2018 5:10 PM