Question

Coding Exercise (MATLAB) - Monte Carlo Simulation: 2. (30pts) Calculate(232)drdy (a) (15pts) Write a program to estimate I that takes as input n mmber of repli- cations. (Hint: You can use MATLAB function rand). See http: 1/ ws mathuworks.com help/matlab ref/rand. html)

Use Monte Carlo Simulation to estimate I.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

x = [7.1, 3.4, 7.2, 28/4, 3.6, 17, 9.4, 8.9];
length(x) % length of x vector
y = rand(3, 4, 5, 2);
ndims(y) % no of dimensions in array y
s = ['Zara', 'Nuha', 'Shamim', 'Riz', 'Shadab'];
numel(s) % no of elements in s

Add a comment
Know the answer?
Add Answer to:
Use Monte Carlo Simulation to estimate I. Calculate I = integral^5_3 integral^2_1(2x + 3y^2)dxdy (a) Write...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You roll a fair dice five times. Write R code the conducts a Monte Carlo simulation...

    You roll a fair dice five times. Write R code the conducts a Monte Carlo simulation experiment with 500,000 replications that estimates the probability that you will see a string of three or more consecutive ones.

  • Monte Carlo Simulation This lab assignment consists of two problems involving Monte Carlo simulation. You should...

    Monte Carlo Simulation This lab assignment consists of two problems involving Monte Carlo simulation. You should use either Excel or Python for this assignment. References: Seila, A. F., V. Ceric, and P. Tadikamalla, Applied Simulation Modeling, Duxbury - Brooks/Cole, Belmont, CA, 2003. Schriber, T. J., "Simulation for the Masses: Spreadsheet-based Monte Carlo Simulation," Proceedings of the 2009 Winter Simulation Conference, Rossetti, Hill, Johansson, Dunkin, and Ingalls, Eds., December 2009. Adopted from Problem 2.13 from Seila et al. (page 74) with...

  • Q. 2 a) Using only Unif 0,1) random variates, use a Monte Carlo algorithm to approximate...

    Q. 2 a) Using only Unif 0,1) random variates, use a Monte Carlo algorithm to approximate the value of the Gamma function 0 by considering the function as an expectation of a function of a random variable. b) Show that if a Monte Carlo simulation of size N is used then the variance of the Monte Carlo estimator is Var (「(a))- 2a-1)-[「(a)]2] provided that α > 0.5. c) Write an R function to implement the method returning the estimated value...

  • 1. While using Monte Carlo simulation in capital budgeting, if a variable such as the unit...

    1. While using Monte Carlo simulation in capital budgeting, if a variable such as the unit cost of production is relatively certain, one would use a random distribution to simulate its values. True or False? 2. While using Monte Carlo simulation in capital budgeting in the year 2018 circa, if one were to use a personal computer, the following number of random drawings/calculations would probably be appropriate: a. Tens b. Thousands c. Billions d. Trillions

  • 4. Use Monte Carlo simulation to approximate the probability of three heads ocurring when five fair...

    4. Use Monte Carlo simulation to approximate the probability of three heads ocurring when five fair coins are flipped. Do a sufficient number of trials to have a meaningful result.

  • (PYTHON) Use Monte-Carlo method to calculate Pi and get as accurate as Math.pi to 0.000001. Reset...

    (PYTHON) Use Monte-Carlo method to calculate Pi and get as accurate as Math.pi to 0.000001. Reset random number seed at the beginning of your program. Do multiple iterations, for example, n = 1000, 10000.

  • Write a Java program that uses the Monte Carlo method to estimate the value of PI....

    Write a Java program that uses the Monte Carlo method to estimate the value of PI. This method uses the unit circle inscribed in a square with sides of length 2 and random numbers to perform the estimation. The estimation works as follows: • Two random numbers are generated during each iteration of a loop. • The random numbers are each in the range of -1 to 1. One random number is the x-coordinate and the other is the y-coordinate....

  • Problem 9 (for all students) Monte Carlo simulation is often used to analyze probabilities of failure...

    Problem 9 (for all students) Monte Carlo simulation is often used to analyze probabilities of failure of geotechnical engineering structures. a) For a case, where the limit state function, G, can be described by three normally distributed random variables such that G-Xi-X2x X3, describe a step-by-step methodology (i.e. an algorithm; MatLab code is not needed) that calculates the probability of failure with Monte Carlo simulation. (3 p) I. Il Running the algorithm that you proposed in a), you can visualize...

  • 5. Given the loaded (unfair) dice probabilities below, use Monte Carlo simulation to simulate the sum...

    5. Given the loaded (unfair) dice probabilities below, use Monte Carlo simulation to simulate the sum of five rolls of the dice. roll die 1 die 2 | 1 0 .1 0.3 2 0.1 0.1 3 0.2 0.2 4 0.3 0.1 5 0.2 0.05 6 0.1 0.25

  • Use Monte Carlo Simulation to approximate pi by considering the percentage of points with coordinates (x,y)...

    Use Monte Carlo Simulation to approximate pi by considering the percentage of points with coordinates (x,y) generated randomly by choosing x and y both between 0 and 1, inside the unit quarted circle Q: X^2 + y^2 = 1, x>=0 y>=0 when the quarter circle is taken to be inside the square S: 0<=x<=1 and 0<=y<=1 Use approximation pi/4 = area Q / area S. Hint: Do the simulation 10000 times and then 100000. (meaning choose the value of x...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT