hw2 - STAT 428 Spring 2010 Homework 2 Feb 5 Homework 2 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 2 Feb 5 Homework 2 Due in class on Friday, Feb 12. 1. The following is another version of the Box-Muller algorithm. 1. Generate Y 1 and Y 2 independently from exponential distribution with parameter 1 until Y 2 > (1 - Y 1 ) 2 / 2. 2. Generate U from Uniform[0 , 1] and take X = b Y 1 , if U 0 . 5 , - Y 1 , if U > 0 . 5 . (1) Show that this algorithm produces one normal variable X . 2. In the lecture on Wednesday Feb 3, we gave a rejection method for the case when the target distribution π ( x ) is only known up to a normalizing constant. Show that the accepted samples from that algorithm indeed follow the target distribution π ( x ). 3. Let X 1 ,... ,X n be i.i.d. from N ( θ, 1), where θ is the unknown parameter. In Bayesian inference, we may put a Cauchy prior distribution on θ , and the Bayes estimate of θ is the mean of the posterior distribution π ( θ | x 1 ,... ,x n ) 1 π (1 + θ 2 ) n p i =1 1 2 π e - ( x i - θ ) 2 / 2 . Suppose n = 3 and the observed values are x 1 = 0 . 8 ,x 2 = 1 . 3 ,x 3 = 1 . 1. Design a rejection algorithm to generate samples from
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/24/2010 for the course STAT 428 taught by Professor Chen during the Spring '08 term at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online