Suppose that the number of children per household in the U.S. has the following distribution
Describe in detail how you could implement by hand a Metropolis-Hastings algorithm to simulate from this distribution, using a random walk to neighboring states as the proposal chain.
Write a few lines of code to implement and run your algorithm, and summarize the approximate distribution. Does your algorithm seem to work?
Specify the transition matrix for the M-H algorithm in the previous part.
Find the stationary distribution of the M-H chain. Is it the target distribution?
The standard double exponential distribution has a pdf which satisfies
Describe in detail a Metropolis-Hastings algorithm for simulating from this distribution.
Write a few lines of code to implement the algorithm and run it. Does the algorithm seem to produce values from the target distribution?