{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw3 - algorithm and implement it in R based on 1000 samples...

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

STAT 428 Spring 2010 Homework 3 Feb 17 Homework 3 Due in class on Friday, Feb 26. 1. Implement your rejection sampling algorithm in R for Problem 4(b) of Homework 2 to generate 100 samples from the truncated Weibull distribution π ( x ) f ( x )1 { 0 <x< 1 } . Based on the 100 samples you accepted, give an estimate of the mean of π ( x ) and the standard error of your estimate. Attach the R code and results. 2. Suppose X has a uniform distribution on [0 , 1] and we want to estimate E bracketleftbig sin ( X 2 )bracketrightbig . (a) Describe the naive Monte Carlo method and implement it in R based on 1000 samples. Give your estimate and the standard error your estimate. Attach your R code. (b) Design an importance sampling algorithm which will give an estimate with smaller standard error than the naive Monte Carlo method based on the same number of samples. Describe your
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: algorithm and implement it in R based on 1000 samples. Give your estimate and the standard error your estimate. Is this standard error smaller than the one based on the naive Monte Carlo method? Attach your R code. 3. Suppose we want to estimate μ = E ( X 1 { X> 3 . 5 } ), where X has a standard normal distribution and 1 { x> 3 . 5 } is an indicator function. Design an importance sampling algorithm and implement it in R. Give your estimate of μ and the standard error your estimate. Attach the R code. 4. Use importance sampling to estimate σ 2 = E ( X 2 ), where X has the density that is propor-tional to e-| x | 3 / 3 . Implement your algorithm in R. Give your estimate and the standard error of your estimate based on 1000 samples....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online