STAT221 Assignment 2 2022
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Assignment 2
STAT221
2022
1) Monte Carlo Integration
a) Use Monte Carlo integration with a sample size of n = 100 points to estimate the integral I = \0 2π e −北 sin(x) dx
b) Calculate a 90% confidence interval for the true value of the integral
c) Calculate the true value of the integral (hint: you could use integration by parts).
2) Standard Normal Distribution
a) Compute a Monte Carlo estimate of the standard normal cdf with sample size n = 10, 000
Φ(x) = \ e − dt
separately for x = 1.644854 and x = 1.959964. (hint: use the fact that the standard normal distribution is symmetric around a mean of 0.)
b) Calculate a 95% confidence interval for the true value of the integral
3) Monte Carlo integration using a Beta distribution
Use Monte Carlo integration to estimate the integral
I = \0 1 e − ^北 dx
with sample size n = 10, 000 by
a) sampling from a Uniform(0,1) distribution
b) sampling from a Beta(0.8, 1) distribution (rbeta())
c) Calculate 99% confidence intervals based on a) and b) for the true value of the integral
d) Which method a) or b) works better? Why?
2022-08-24