We wish to estimate (mu=int_{-2}^{2} mathrm{e}^{-x^{2} / 2} mathrm{~d} x=int H(x) f(x) mathrm{d} x) via Monte Carlo

Question:

We wish to estimate \(\mu=\int_{-2}^{2} \mathrm{e}^{-x^{2} / 2} \mathrm{~d} x=\int H(x) f(x) \mathrm{d} x\) via Monte Carlo simulation using two different approaches: (1) defining \(H(x)=4 \mathrm{e}^{-x^{2} / 2}\) and \(f\) the pdf of the \(\mathscr{U}[-2,2]\) distribution and (2) defining \(H(x)=\sqrt{2 \pi} 1\{-2 \leqslant x \leqslant 2\}\) and \(f\) the pdf of the \(\mathscr{N}(0,1)\) distribution.

(a) For both cases estimate \(\mu\) via the estimator \(\widehat{\mu}\)

\[ \widehat{\mu}=N^{-1} \sum_{i=1}^{N} H\left(X_{i}\right) \]
Use a sample size of \(N=1000\).

(b) For both cases estimate the relative error \(\kappa\) of \(\widehat{\mu}\) using \(N=100\).

(c) Give a \(95 \%\) confidence interval for \(\mu\) for both cases using \(N=100\).

(d) From part (b), assess how large \(N\) should be such that the relative width of the confidence interval is less than 0. 01 , and carry out the simulation with this \(N\). Compare the result with the true value of \(\mu\).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Data Science And Machine Learning Mathematical And Statistical Methods

ISBN: 9781118710852

1st Edition

Authors: Dirk P. Kroese, Thomas Taimre, Radislav Vaisman, Zdravko Botev

Question Posted: