. Assume that X is U[10,25], what is E[X2 ]? Estimate the answer using Monte Carlo simulation. Make sure your half width is less than 1.0.
The R code for doing Monte Carlo simulation times to evaluate where is given below.
set.seed(17234)
N <- 10000
X <- runif(N,min=10,max=25)
EX_square <- mean(X^2)
EX_square
You can increase for more accurate estimates.
The simulated value of is which is very close to the theoretical value
Get Answers For Free
Most questions answered within 1 hours.