1. Use Monte Carlo (MC) to numerically estimate E[X] and put a confidence interval using 2SE where SE is MC standard err
Posted: Wed May 04, 2022 11:57 am
1. Use Monte Carlo (MC) to numerically estimate E[X] and put a confidence interval using 2SE where SE is MC standard error. •+∞ E[X] = * xf (x)dx where X-Weibull (a = 2, ß = 3) Solution: In R simulation Generate a large sample (T= 2000) from the Weibull distribution. Find average of X using function mean. Notice that you have T values for X. Calculate SE of X using generated X's and average of X. Use SE of X to find SE of sample mean (average of X). run T = 2000 . All R codes X = rweibull(T,shape =2, scale=3) EX_hat mean(X) SE_hat=sd(X) SE_hat_EX_hat = SE_hat/sqrt(T-1) CI_LB = EX_hat - 2*SE_hat_EX_hat CI_UB = EX_hat + 2* SE_hat_EX_hat