1. Assume that the instrumental distribution g in importance sampling (with unstandardized weights) is chosen such that f(x) < M·g(x) for all x and a suitable M ? R, where f is the target distribution.
Â
(a) Show that Varg(w?(X))< M ? 1.
Â
(b) Show that Varg(w?(X)·h(X)) is finite, if Varf (h(x)) is finite.
Â
2. Assume that you want to sample from a N (0, 1) distribution using a N (1, 2) distribution as instrumental distribution. Draw a sample of size 1000 using importance sampling, calculate the weighted mean and weighted variance, and plot a histogram of the weighted sample, i.e. plot a histogram of the draws from N(1,2) times the appropriate weights. How does this histogram compare to a draw directly from N (0, 1)?
Â
3. Suppose the general populationâs opinion of the federal government can be classified as âpositiveâ, ânegativeâ, or âit could be worseâ. If itis âpositiveâ one day, then it is equally likely to be either ânegativeâ or âit could be worseâ the following day. If itis not âposi-tiveâ, then there is one chance in two chance that opinions will hold steady for another day and if it does change, then it is equally likely to become either of the other two opinions.(a) What is the transition probability matrix for this Markov Chain? In the long run
Â
(b) How often does the general population hold a non-ânegativeâ opinion of the government?
Â
4. (a) Implement a MetropolisâHastings algorithm to simulate with ? = 0.7, using N(x(t), 0.012) as the proposal distribution. For each of three starting values, x(0) = 0, 7, and 15, run the chain for 10,000 iterations. Plot the sample path of the output from each chain. If only one of the
sample paths was available, what would you conclude about the chain? For each of the simulations, create a histogram of the realizations with the true density superimposed on the histogram. Based on our output from all three chains, what can you say about the behavior of the chain? Youdo not need to superimpose the true density on your histograms.
Â
a. Also, the sample path of a Markov Chain is a plot of the iteration number t versus the realizations of the random variable X(t) for t = 0, 1, 2, . .
Â
(b) Now change the proposal distribution in Problem 7.2 (a) to a Uniformdistribution on (0, 20) with starting point 7. Does this proposal do any better? Run your code several times and see if you can get a histogram that resembles the expected double hump, then plot the sample path and discuss your results.