Question

Use R markdown to solve the following questions.

Approximating φ The golden ratio φ is the positive solution of Simulate 1000 observations from Uniform( 0,2) distribution Then 1.5 1.0 0.5 0.0 0.5 00 1.0 0.5 1.0 .5 2.0 2x (the proportion of the values for which x2-x-1 〈 0 ) should be close to

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

Below is the R Code for approximating the golden ratio using uniform random variables:

> rm(list=ls(all=TRUE)) # To remove objects from R
> PHI=(sqrt(5)+1)/2;PHI # True value of Phi
[1] 1.618034
> N=1000 # No. of observations
> X=runif(N,0,2) # Uniform random variables
> Y=X^2-X-1 # Approximation
> (sum(Y<0)/N)*2 # Finding the proportion
[1] 1.628

We can see that the obtained value is 1.628 which is close to the true value 1.618.

Add a comment
Know the answer?
Add Answer to:
Use R markdown to solve the following questions. Approximating φ The golden ratio φ is the...
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
  • -1.2y 7e-03* from x tox 2.0 with the 2) Use Euler's method to solve the ODE...

    -1.2y 7e-03* from x tox 2.0 with the 2) Use Euler's method to solve the ODE initial condition y3 at x0 dx a) Solve by hand using h b) Write a MATLAB program in a script file that solves the equation using h-0.1 and find y(1.5). c) Use the program from part (b) to solve the equation using h= 0.01 and h = 0.001 and findy(1,5). 0.5 and find y(2). d) The exact solution to the IVP is given by...

  • The Burger Dome waiting line model studies the waiting time of customers at its fast-food restaurant....

    The Burger Dome waiting line model studies the waiting time of customers at its fast-food restaurant. Burger Dome's single-server waiting line system has an arrival rate of 0.75 customers per minute and a service rate of 1 customer per minute. Adapt the Black Sheep Scarves spreadsheet shown below to simulate the operation of this waiting line. Make sure to use the random values for both interarrival and service times generated in the worksheet_12-23. Assuming that customer arrivals follow a Poisson...

  • Use the sample data and confidence level given below to complete parts (a) through (d). A...

    Use the sample data and confidence level given below to complete parts (a) through (d). A research instituto poll asked respondents if they felt vulnerable to identity theft. In the poll, n=1052 and x 515 who said "yos." Use a 95% confidence level. Click the icon to view a table of z scores. *) Find the best point estimate of the population proportion p. (Round to three decimal places as needed.) b) Identify the value of the margin of error...

  • Use the sample data and confidence level given below to complete parts (a) through (d). A...

    Use the sample data and confidence level given below to complete parts (a) through (d). A research institute poil asked respondents if they felt vulnerable to identity theft. In the poll, n=990 and x = 599 who said "yes." Use a 90% confidence level. Click the icon to view a table of z scores a) Find the best point estimate of the population proportion p. (Round to three decimal places as needed.) b) Identify the value of the margin of...

  • Two questions For each of the following questions: clearly indicate the probability distribution being used to...

    Two questions For each of the following questions: clearly indicate the probability distribution being used to solve the problem solve by hand, and verify your answer using MATLAB. 1. Two teams, A and B, play a series of games. If team B has a probability 0.4 of winning each game, is it to their advantage to play the best three out of five games or the best four out of seven, and why? Assume the outcomes of successive games are...

  • use following to solve 3) Using an order of magnitude method (Hill), estimate the TCI in...

    use following to solve 3) Using an order of magnitude method (Hill), estimate the TCI in year 2006 dollars for a grass-roots plant with 100,000-lb annual production using an order-of-magnitude method based on a 10,000-lb annual production. The plant contains three 1200-ft/min centrifugal fans, five 1500-ft/min centrifugal blowers, seven 100-ft' centrifugal separators, and two 100-ft shell-and-tube heat exchangers. You may assume all materials are carbon steel, the materials handled are primarily solid, and that this plant construction is done fully...

  • I need solution thank you! you can use these tables and formulas. 2. The heights for...

    I need solution thank you! you can use these tables and formulas. 2. The heights for 5 year boys are normally distributed with a mean height of 43 inches and a standard deviation of 5.3 inches. A sample of 60 boys is randomly selected. Find (a) (8 points) The probability that mean height of boys for the sample of 60 boys is between 41 inches and 45 inches. (b) (5 points) The height of a boy that corresponds to the...

  • 10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated...

    10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated sludge operation that adversely affect effluent quality with origins in the engineering, hydraulic and microbiological components of the process. The real "heart" of the activated sludge system is the development and maintenance of a mixed microbial culture (activated sludge) that treats wastewater and which can be managed. One definition of a wastewater treatment plant operator is a "bug farmer", one who controls the aeration...

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
ADVERTISEMENT