(Solved): The Poisson distribution with mean parameter has probability mass function (x)=x!ex, ...
The Poisson distribution with mean parameter ? has probability mass function ?(x)=x!e???x?, for x=0,1,2,… Consider the proposal distribution q(x,y):???? If x?1,y={x+1,x?1,? with probability 21? with probability 21?? If x=0,y=x+1,? with probability 1? We want to implement a Metropolis-Hastings algorithm to sample from the Poisson (?) distribution. (a) Write down the framework of your Metropolis-Hastings algorithm for this problem. (b) Let ?=6. Run the Metropolis-Hastings algorithm for 2000 iterations and make a trace plot (or time plot) of the Markov chain. (c) Calculate the mean and plot the histogram of the last 1000 samples.