Internal Code : 3FIC
Statistical Modelling And Simulation Assignment Help
TASK1
In later problems in this exercise you will need to simulate data from the triangle distribution. We thus need an efficient algorithm for simulating data from the triangle distribution.
a) Start from the pdf for the triangle distribution as specified in the lecture notes (chapter 2,part 1) and derive an expression for the cdf. Explain how we can use the inverse transform method to simulate data from the triangle distribution. Do the necessary calculations and specify the algorithm for general values of a, b and c. (Hint: You will need to solve some quadratic equations and should consider which solutions are valid.)
b)R Implement the algorithm from point a) in a function in R. The function should take as input the number of data to be simulated, n, and the parameters a, b and c in the triangle distribution, and should return a vector of n simulated data. Use the function to generate a large number of data for the case a = 0.7, b = 2 and c = 1.5. Make a histogram of the data, and add a plot of the pdf of the triangle distribution on top to verify correctness of the algorithm.
TASK2
a) Explain how you can approximate the integral using ordinary Monte Carlo integration (crudeMonte Carlo integration). Also explain how you can calculate the required number of simulations you have to do to be at least 95% certain that your estimate is no more than 10 from the true answer.
b)R Implement the Monte Carlo integration method from a) in R.
Calculate the required number of simulations and find the approximation to the integral.
We shall now consider how to improve the ordinary Monte Carlo integration (crude Monte Carlo integration) implemented in 2b) by applying variance reduction techniques.
c) Explain why we cannot use antithetic variables to improve the precision of the ordinary
Monte Carlo integration in this case. Explain how importance sampling can be used to improve the precision of the ordinary Monte Carlo integration in this case. Propose a density (also called importance function) f(t) to be used in the importance sampling and explain why this density should lead to improved precision. Explain precisely how the importance sampling should be performed in this case.
d)R Implement the importance sampling method described in point d) in R and use it to estimatethe integral. Estimate the standard deviation of the integral estimate obtained with importance sampling, and compared to the estimated standard deviation with ordinary Monte Carlo integration. Comment briefly.
The above question has been solved by our Statistical Modelling And Simulation experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.