a) A standard simulation estimator of the integral is
implemented in R below:
set.seed(1567)
f <- function(x){
4*x^3
}
std_mc <- function(f, B){
x <- runif(B)
ff <- f(x)
return(ff)
}
B <- 100000
I <- std_mc(f,B)
mean(I)
var(I)
b) An importance sampling estimator based exponential
distribution (weight function)
is given below.
set.seed(1567)
f <- function(x){
4*x^3
}
imp_mc <- function(lambda, f, B){
x <- rexp(B, lambda)
ff <- pexp(1,lambda)*f(x[x<1.0]) / dexp(x[x<1.0],
lambda)
return(ff)
}
lambda <- 0.045
B <- 100000
I <- imp_mc(lambda, f, B)
mean(I)
var(I)
c) The variance in first case is and
variance in second case (importance sampling) is
thus
achieving variance reduction.
4x3dx. 6. Consider estimating θ (a) Construct standard simulation estimator (b) Construct importance sampling estimator (choose appropriate pro- posal density) (c) Compare the variances of the ab...
Please explain how you got your answer. 1. The standard error of x-bar1 - x-bar2 is the measure of ____ for the sampling distribution of x-bar1 -- x-bar2. a) point estimator b) interval estimate c) standard deviation 2. The point estimator for the difference between two population means, u1 - u2, is___ a) o1 - o2 b) s1 - s2 c) there is no point estimator for the difference between two population means 3. Suppose students with an ACT Math...