Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91340028
  • Price:- $20

Guranteed 24 Hours Delivery, In Price:- $20

Have any Question?


Related Questions in Computer Engineering

Consider the following reactionpcl 5 g -----gt pcl 3 g cl2

Consider the following reaction PCl 5 (g) -----> PCl 3 (g) + Cl2 (g) Kc = .0420 The concentrations of the products at equilibrium are [PCl3] = 0.120 M and [Cl2] = 0.160 M. What is the concentration of the reactant, PCl5, ...

Respond to the statement below in at least 100 words

Respond to the statement below in at least 100 words. Original answers only. If developers are making decisions on the requirements, then how do they know that the software will work properly for the end user? Developers ...

String utilitiesimplement the following methods write a

String Utilities Implement the following methods: // Write a method that returns true if s has leading or trailing whitespace, false otherwise public static boolean needsTrim(String s) // Write a method that swaps the fi ...

Calculate the thinkness of the monolayer assuming that the

Calculate the thinkness of the monolayer assuming that the volume of the monolayer is 7.39×10-6 mL and diameter of the watch glass is 5 cm.

What are the minimum and maximum values in decimal if an

What are the minimum and maximum values (in decimal) if an 8-bit binary number is given unsigned and two's complement formats?

Question suppose an instruction can be carried out in 3

Question : Suppose an instruction can be carried out in 3 stages, the stages taking 3 ns, 7 ns, and 10 ns, respectively. (a) What is the maximum execution rate without pipelining? (b) What speedup is possible with pipeli ...

Question suppose that a table has 9 columns it is known

Question : Suppose that a table has 9 columns. It is known that we only need to provide values for 4 columns explicitly to insert a new row successfully. Assume that there are n columns with default values and there are ...

Video and disruption report assignmentoverviewfor this

Video and Disruption Report Assignment Overview For this assessment task, you will create a two-minute video and written proposal about the impact of a particular technology on an industry or field. The purpose of this a ...

How does a java server page uses the client-server model to

How does a Java Server Page uses the client-server model to make a Web page interactive?

Restaurant management database project the restaurant

Restaurant Management Database Project : The restaurant maintains the catalog for the list of food and beverage items that it provides. Apart from providing food facility at their own premises, the restaurant takes order ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As