The goal of this problem is to simulate a geometric random

Assignment Help Basic Computer Science
Reference no: EM13770266

The goal of this problem is to simulate a geometric random variable (which will be covered on Friday, Feb 6th in lecture). We will break this problem into two parts.

Part a

Build a function which takes in p. This function should repeat a Bernoulli trial until a "success" (defaulted to a 1 in R) occurs, and return the trial number on which the first success occurred (i.e., if the 3rd trial resulted in a "success", this function should return 3). Use your function with the following values of p (and show your functions output):

i.p=0.02 ii.p=0.10 iii. p = 0.50

Part b

Build another function which takes in p, r, and N. This function will calculate the probability that the first "success" occurred on the rth trial, based on N simulations.

Notice you can use your function from Part a in this function.

Use your function with the following values of p, r, and N (and show your functions output):

i. p = 0.02, r = 10, N = 600000
ii. p = 0.10, r = 10, N = 600000
iii. p = 0.20, r = 10, N = 600000

These simulations may take a few minutes (or more depending on your computer) to run, but they should not crash your computer.

Remember that you can always use the computer labs to complete simulations.

Reference no: EM13770266

Questions Cloud

Firm has decreasing returns : In the short-run, if a firm has decreasing returns, does it have increasing, constant, or decreasing marginal cost? Explain. What about if it has constant returns? Increasing returns? Explain.
Partner wants to take the bid and let the subcontractor : Your partner wants to take the bid and let the subcontractor suffer consequences of his bad estimate. What do you think you should do?
What are the implications for defensive actions : Based on the article by Don et al on networked terrorists and your readings on cyber collection, what advantage do those planning a cyber attack have? What are the implications for defensive actions
Model over time would depletion from non-renewable resource : If we think about a model over time (dynamic), would depletion (production) from a non-renewable resource, we wouldn't have a traditional, static supply curve that is completely based on price. Would the classic demand curve still apply?
The goal of this problem is to simulate a geometric random : The goal of this problem is to simulate a geometric random variable (which will be covered on Friday, Feb 6th in lecture). We will break this problem into two parts.
The level of prices and the value of money : Suppose the price level reflects the number of dollars needed to buy a basket of goods containing one cup of coffee, one donut, and one newspaper. In year one, the basket costs $8.00.
To meet increased delivery demands : To meet increased delivery demands, a Dairy company just bought 15 new delivery trucks. Each truck cost $30,000 and has an expected life of 4 years. The trucks can each be sold for $8,000 after four years. Using CCA Class 10 depreciation, determine a..
Resulted from the change in the reserve requirement : The U.S. money supply (M1) at the beginning of 2000 was $1,148 billion broken down as follows: $523 billion in currency, $8 billion in traveller’s checks, and $616 billion in checking deposits. Suppose the Fed decide to reduce the money supply by inc..
Develop hypotheses predicting the effect : Develop hypotheses predicting the effect of pyrite and coal on the acidity of water? Based on the results of your experiment, would you reject or accept each hypothesis that you produced in question 1? Explain how you determined this.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the estimated payback period of a project

What is the estimated payback period of a project whose cost is $90,000 and benefits estimated to be $60,000 in each of the next three years?

  Why is rarp used in one case versus arp

Why is RARP used in one case versus ARP? This one is complex and I don't know how to do it

  Determine and print the average age of your family

Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who lives in Oregon.

  Strayer library to research articles on ethical issues

You may also use the Internet or the Strayer Library to research articles on ethical issues in information systems and choose one (1) ethics issue of interest to you.

  How system access big date to maximum in usage?

How system access big date to maximium in usage?

  Use electronic monitoring to measure employee productivity

A discussion of the current trend to use electronic monitoring to measure employee productivity, bearing in mind the theories of Taylor and McGregor. The key ethical issues and the stakeholders involved.

  Identify major points to include in communications plan

Identify the major points you would include in a communications plan at this point in the project? what advice would you give your project team to help it manage the user expectations?

  Discussion centers on e-commerce

Discussion centers on e-commerce, the use of web sites for the buying and selling of goods and services. For your discussion this week, first visit this link on how to make a terrible website. It's a tongue-in-cheek look at what not to do on yo..

  Modify the range accordingly or terminate the program

modify the range accordingly or terminate the program. The program must do up to 20 guesses

  What does it mean to have integrated requirements models

What does it mean to have integrated requirements models?

  Create a flexsim model

Create a Flexsim model for a stylist shop that is open for 24 hours in a mall that is always open.

  Write a recursive method

public static boolean isSorted(List l) Write a recursive method that returns true if a linked list is sorted (nondecreasing) order and returns false otherwise. An empty list is considered to be sorted.

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