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

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

View Full Document Right Arrow Icon
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 b sin ( X 2 )B . (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
Background image of page 1
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&gt; 3 . 5 } ), where X has a standard normal distribution and 1 { x&gt; 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

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