Importance Sampling

 

Problem slide

R code