Assignment 3 Sample Solutions
1. Ho Exercise 4.6 p. 234
Suppose Y Binomial(n, ) and Uniform(0, 1). Let = log 1 .
We have evaluated the density of analytically, using the change of variable formula in Assignment
2. Recall that we got
e
p( ) =
,
< <
(1 + e
Assignment 3 Due Fri. March 4
1. Ho Exercise 4.6 p. 234
2. Ho Exercise 4.8 p. 235
U
3. Let U Uniform(0, 1) and X = log 1U
(a) Find the probability density function of X .
(b) Use the inverse transformation method to simulate draws of X .
(c) Evaluate P (X
Assignment 2 Sample Solutions
1. Ho Exercise 3.4 p. 228
Estimate the probability of teen recidivism based on a study in which there were
n = 43 individuals released from incarceration and y = 15 re-oenders within 36 months.
Assuming the individuals act in
Assignment 1 Sample Solutions
1. Ho Exercise 2.1 p. 225
The joint distribution of occupational categories for fathers and sons, p(Y1 , Y2 ), is given by:
fathers occupation
farm
farm
operatives
craftsmen
sales
professional
sons occupation
operatives craft
Assignment 5 Due Wed. April 20
1. Ho Exercise 8.3 p. 242
You may want to compare your posterior means to the REML parameter estimates from tting a
random eects model.
2. Ho Exercise 9.2 p. 243
You may want to compare your results to those obtained with a
Assignment 4 Due Wed. March 30
1. Ho Exercise 6.2 p. 237
2. Ho Exercise 9.3 p. 243
3. Gibbs sampler. Consider the le school1.dat (from Assignment 2) which contains data on the
amount of times students at a high school spent on studying or homework during
Assignment 2 Due Wed. Feb. 23
1. Ho Exercise 3.4 p. 228
2. Ho Exercise 3.9 (skip part (c) p. 230
3. Ho Exercise 3.10 p. 231
4. Ho Exercise 3.13 p. 231
5. Ho Exercise 5.1 p. 235 (the datasets are posted on Blackboard)
6. Suppose y1 , . . . , yn are the lif
Assignment 1 Due Wed. Feb. 2
1. Ho Exercise 2.1 p. 225
2. Ho Exercise 3.1 p. 227 (see comments below)
(d) Suppose you allow to be any value in the interval [0, 1]. Using the uniform prior density for
, so that p() = 1, plot p() Pr( n Yi = 57|) as a functi