Q1. (20 points)

Recall the experiment in class for sampling from the mixture normal distribution. Now use a Metropolis-Hastings sampler with a normally distributed random walk to sample from this distribution. What step size did you choose for this implementation and what was your acceptance rate? Overall, how do the results compare to the Gibbs sampler?

Q2.

Recall the housing dataset from the previous homework. Now let’s consider a binary outcome of whether or not a house sells for more than $400,000. To simplify the analysis only consider the zip code, square footage of the house, and the square footage of the lot. A smaller dataset has been provided for this question SeattleBinaryHousing.csv.

a. (10 points)

Fit a logistic regression model and concisely write/describe your model, this should include priors. You are welcome to use JAGS, stan, or write your own Metropolis sampler, but please include your code here.

b. (10 points)

Summarize the posterior distribution of the parameters in your model. Include trace plots and marginal posterior distributions for the regression coefficients.

Q3. (10 points)

Continue working on your course project. At this point the written summary should contain the following elements: The proposal should address the following points:

  1. An introduction paragraph that identifies the larger problem to which you are contributing, gives readers a sense of the direction your paper is going, and makes it clear why it is important. It should engage the widest audience practical. Before writing this section, identify your specific question or hypothesis.

  2. A paragraph describing the data set that you are using. In addition to a written summary, this section should also include a set of data visualizations related the question or hypotheses addressed above.

  3. A section outlining the model framework that you will be using for your project. You should also have an idea on how you plan to fit your model: R code from scratch, stan, JAGS, or existing software packages.