Calculate an approximation to p and print the result

Assignment Help Basic Statistics
Reference no: EM131294060

Π appears in the formula for the standard normal distribution, the most important probability distribution in statistics. Why not give it a try to calculate π using statistics! In fact, you'll use a simulation technique called the Monte Carlo Method.

Recall that the area of a circle of radius r is A = πr2. Therefore the area of a circle of radius 1, aka a unit circle, is π. You'll compute an approximation to the area of this circle using the Monte Carlo Method.

a) The Monte Carlo Method uses random numbers to simulate some process. Here the process is throwing darts at a square. Assume the darts are uniformly distributed over the square. Imagine a unit circle enclosed by a square whose sides are of length 2. Set an R variable area.square to be the area of a square whose sides are of length 2.

b) The points of the square can be given x-y coordinates. Let both x and y range from -1 to +1 so that the square is centred on the origin of the coordinate system. Throw some darts at the square by generating random numeric vectors x and y, each of length N = 10,000. Set R variables x and y each to be uniformly distributed random numbers in the range -1 to +1. (hint: runif() generates random number for the uniform distribution)

c) Now count how many darts landed inside the unit circle. Recall that a point is inside the unit circle when x2 + y2 < 1. Save the result of sucessfull hits in a variable named hit. (hint: a for loop over the length of x and y is one option to reach hit)

d) The probability that a dart hits inside the circle is proportional to the ratio of the area of the circle to the area of the square. Use this fact to calculate an approximation to Π and print the result.

Verified Expert

The given word file contains the approach of finding the estimated value of pi by Monte Carlo method.

Reference no: EM131294060

Questions Cloud

Determine the irreversibility rate of the turbine : Determine the irreversibility rate of the turbine, the turbine's entrance and exit specific flow availabilities and the turbine's actual output power.
Creating employer-employee rights and policy issues : How do you think technology is creating employer/employee rights and policy issues? What are some actions a company can take to lessen these issues?
Personal liability for corporate debts and other obligations : One of the key advantages to forming a corporation is that its owners are immune from personal liability for business debts and other obligations arising from operation of the corporation. This immunity from personal liability is commonly referred to..
Determine the irreversibility rate of the pump : Determine the irreversibility rate of the pump, the pump's entrance and exit specific flow availabilities and The pump's actual input power.
Calculate an approximation to p and print the result : The probability that a dart hits inside the circle is proportional to the ratio of the area of the circle to the area of the square. Use this fact to calculate an approximation to Π and print the result.
Promote and protect unions : Do you think it is still necessary for laws to promote and protect unions? What would you change regarding union laws? Justify your answer.
Resist labor-management partnerships : Why do you think unions might resist labor-management partnerships? Why might employers resist labor-management partnerships? Justify your answer.
Component of patient treatment in hospitals : Explain medical nutrition therapy as an important component of patient treatment in hospitals and other healthcare facilities today. Provide at least two examples of medical conditions in which medical nutrition therapy is crucial for patient reco..
Determine the irreversibility rate of the boiler : Determine the irreversibility rate of the boiler, the boiler's entrance and exit specific flow availabilities and The boiler's heat input rate.

Reviews

inf1294060

12/7/2016 6:55:43 AM

Hi there, any chance I can get the r code for a), b), C) and d). I have attached rmd and was wondering if you can edit the file with solution. Please let me know if I need to pay extra for the Question #2. 19700071_1CIND123-Fall2016-assignment-04 Nenad Brankovich.Rmd Thank You...I just sent you my payment. It will be great if you can please send me an edited rmd file that I sent you earlier, with the solution(s). Just to clarify....I will require edited rmd with solutions for question 1 (a, b, c, and d) as well as question 2. I paid for both. I am aware of it. Previously you sent me a solution for Question 1 in MS Word format that I paid for and I was asking if you can do the same by editing rmd file. I hope that this is not a problem since I do require r script for Q1 a) b) c) and d). You will see it once you open my rmd file that I sent.

inf1294060

12/2/2016 7:26:03 AM

Thank you heaps for the quick turnover time, I am very pleased with the result you have given me and have no issues with it. Again thank you, this is a high quality result and I appreciate that.

len1294060

11/29/2016 1:43:04 AM

Can you help me with the bonus question - you'll use a simulation technique called the Monte Carlo Method - a for loop over the length of x and y is one option to reach hit) - Use this fact to calculate an approximation to ? and print the result.

Write a Review

Basic Statistics Questions & Answers

  Statistics-probability assignment

MATH1550H: Assignment:  Question:  A word is selected at random from the following poem of Persian poet and mathematician Omar Khayyam (1048-1131), translated by English poet Edward Fitzgerald (1808-1883). Find the expected value of the length of th..

  What is the least number

MATH1550H: Assignment:  Question:     what is the least number of applicants that should be interviewed so as to have at least 50% chance of finding one such secretary?

  Determine the value of k

MATH1550H: Assignment:  Question:     Experience shows that X, the number of customers entering a post office during any period of time t, is a random variable the probability mass function of which is of the form

  What is the probability

MATH1550H: Assignment:Questions: (Genetics) What is the probability that at most two of the offspring are aa?

  Binomial distributions

MATH1550H: Assignment:  Questions:  Let’s assume the department of Mathematics of Trent University has 11 faculty members. For i = 0; 1; 2; 3; find pi, the probability that i of them were born on Canada Day using the binomial distributions.

  Caselet on mcdonald’s vs. burger king - waiting time

Caselet on McDonald’s vs. Burger King - Waiting time

  Generate descriptive statistics

Generate descriptive statistics. Create a stem-and-leaf plot of the data and box plot of the data.

  Sampling variability and standard error

Problems on Sampling Variability and Standard Error and Confidence Intervals

  Estimate the population mean

Estimate the population mean

  Conduct a marketing experiment

Conduct a marketing experiment in which students are to taste one of two different brands of soft drink

  Find out the probability

Find out the probability

  Linear programming models

LINEAR PROGRAMMING MODELS

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