Estimate the value of integral

Assignment Help Advanced Statistics
Reference no: EM131993154

Homework -

Monte Carlo integration is useful for high-dimensional integrals. Let's perform one:

1304 cos(xy + y4) dx dy

(Well, 2D is higher than 1D.)

1. Use a change of variables to recast this integral as an integral over the unit square. (Easy, but do it carefully.)

2. Use Monte Carlo simulation using 100,000 terms (that is, 100,000 pairs of Uniform (0, 1) samples) to estimate the value of this integral. Have your program calculate a 95% confidence interval as we did in class. Put this code in the file called confidence1.cpp. (Make sure you download Declarations.cpp and Definitions.cpp and keep them in the same folder as your file.)

3. Now, elaborate on the last part. Run the last Monte Carlo simulation 1000 times. Once again, Wolfram Alpha can give us a value for the true value of the integral, accurate to 6 decimal places: -0.152629. Count the number of times that this true value lies within your 95% confidence interval. It should be within approximately 950 of the 1000 confidence intervals that you produce. Put this code in the file called confidence1000.cpp.

4. Finally, one more version of the same problem.

This time, we will only compute a single confidence interval. However, now, don't fix the number of samples that you use.

Instead: set an error bound of 0:001. Have your program run until the error estimate 1.96(Std)^(X)/√n is less than 0.001, where n is the number of terms you've produced at a given time, and (Std)^(X) is the standard deviation of those terms. It should then print out the confidence interval (which should have a total width of about 0.002). Important: only have your program perform the check if 1.96(Std)^(X)/√n < 0.001 once every 100,000 terms! Put this code in the file called fixed error.cpp.

Attachment:- Assignment Files.rar

Reference no: EM131993154

Questions Cloud

Announced that its main product is no longer selling well : BCD Corp. has announced that its main product is no longer selling well. Analysts now expect that BCS earnings will fall by 50% over the next two years.
Analyze three economic factors that could lead the cio : Assess whether or not economic factors lead to the same level of IT outsourcing or offshoring decisions, despite the business or industry.
What is the yield on this five year corporate bond : A 5-year Treasury bond has a 4.2% yield. A 10-year Treasury bond yields 6.7%, What is the yield on this 5-year corporate bond?
Identify possible network infrastructure vulnerabilities : Address network vulnerabilities with the appropriate security measures. Ensure that consideration is given to virtualization and cloud technology.
Estimate the value of integral : MTH 4135 Homework - Use Monte Carlo simulation using 100,000 terms (that is, 100,000 pairs of Uniform (0, 1) samples) to estimate the value of this integral
Identify the fundamentals of public key infrastructure : Identify the fundamentals of public key infrastructure (PKI). Describe the manner in which your solution will protect the privacy of data transmitted.
Approaching warfare from a utilitarian perspective : Do you think this means that military strategists and commanders cannot avoid approaching warfare from a utilitarian perspective?
What are some of the characteristics of human languages : What are some of the characteristics of human languages? (Please provide specific examples.)
Describe the goals and objectives of the project : Describe the scope of the project and control measures. Describe the goals and objectives of the project.

Reviews

len1993154

5/23/2018 3:14:59 AM

Subject - Advanced Statistics. Message - I need code in python (preferably) or C++. When you are done: Submit the three files confidence1.cpp, confidence1000.cpp, and fixed error.cpp, generously commented, via Blackboard. If you feel more comfortable with Python: I ran these programs using the built-in random.random() generator in the random module, and they weren't too slow (problems 3 and 4 took around 5 minutes each). Since Python's random.random() is implemented using the Mersenne Twister, using it should result in quality random numbers. Submit three files, named confidence1.py, confidence1000.py, and fixed error.py, generously commented, via Blackboard.

Write a Review

Advanced Statistics Questions & Answers

  Relationship between speed, flow and geometry

Write a project proposal on relationship between speed, flow and geometry on single carriageway roads.

  Logistic regression model

Compute the log-odds ratio for each group in Logistic regression model.

  Logistic regression

Foundations of Logistic Regression

  Probability and statistics

The tubes produced by a machine are defective. If six tubes are inspected at random , determine the probability that.

  Solve the linear model

o This is a linear model. If your model needs a different engine, then you need to rethink your approach to the model. Remember, there are no IF, Max, or MIN statements in linear models.

  Plan the analysis

Plan the analysis

  Quantitative analysis

State the hypotheses that you are going to test.

  Modelise as a markov chain

modelise as a markov chain

  Correlation and regression

What are the degrees of freedom for regression

  Construct a frequency distribution for payment method

Construct a frequency distribution for Payment method

  Perform simple linear regression

Perform simple linear regression

  Quality control analysis

Determining the root causes

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd