{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw7 - STAT 428 Spring 2010 Homework 7 Apr 21 Homework 7 Due...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT 428 Spring 2010 Homework 7 Apr 21 Homework 7 Due in class on Friday, Apr 30. 1. Consider the simulation of bivariate normal random variables. Let X = ( X 1 , X 2 ) and the target distribution is π ( x 1 , x 2 ) N parenleftbiggparenleftbigg 0 0 parenrightbigg , parenleftbigg 1 0 . 5 0 . 5 1 parenrightbiggparenrightbigg . Design a Gibbs sampler to generate samples approximately from the target distribution. Give your estimate of the mean of X 2 . Plot the histogram of X 2 based on your samples, and compare it with the histogram based on i.i.d. samples from N (0 , 1) (which is the true marginal distribution of X 2 ). 2. Consider the one-dimensional Ising model that we discussed in class. Let x = ( x 1 , . . . , x d ), where x i is either +1 or - 1. The target distribution is π ( x ) exp braceleftBigg μ d - 1 summationdisplay i =1 x i x i +1 bracerightBigg . Let μ = 2, d = 40. (a) Design a Gibbs sampling algorithm to generate samples approximately from the target dis- tribution π ( x ), and implement your algorithm in R. Attach the R code. (b) Suppose the output of your Gibbs sampling algorithm at step t is x ( t ) = ( x ( t ) 1 , . . . , x ( t ) d ). Define the total magnetization M ( t ) = d i =1 x ( t ) i .
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}