Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

poissonProcess = function(tot, n,lambda, s, nmbSim) { # initiating vector where I will store all of my estimates vectorOfFractions = c(rep(0,nmbSim)) # Simulating the Poisson

poissonProcess = function(tot, n,lambda, s, nmbSim) { # initiating vector where I will store all of my estimates vectorOfFractions = c(rep(0,nmbSim)) # Simulating the Poisson process nmbSim times for (j in 1:nmbSim) { # simulating little t values (incremental arrival times of customers) tVec = rexp(tot,lambda); # calculating big T values (summing up the times) TVec = cumsum(tVec) # Calculating the fraction of customers that arrive before time s fracLessThenS = length(TVec[TVec < s]) # Storing it in 'vectorOfFractions' if (fracLessThenS == n) { vectorOfFractions[j] = 1; } } estProb = mean(vectorOfFractions); paste("estimated Probability = ", estProb); }

1.In the program PoissonProcess.R, you can simulate a Poisson process from scratch. It allows you to do the following nmbSim times (nmbSim is the total number of simulations): simulate tot exponentials with parameter and count the fraction of times n customers arrive before time s. As youve learned in this module, the number of occurrences before time s is distributed as a Poisson random variable. Run the program Ive written for you, and use the function dpois in R to illustrate that the number occurrences before time s does, in fact, follow a Poisson random variable.

2.show how the accuracy of the Poisson approximation varies when the maximum of the arrival probabilities.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Multidimensional Array Data Management In Databases

Authors: Florin Rusu

1st Edition

1638281483, 978-1638281481

More Books

Students also viewed these Databases questions

Question

What is a lag measure? A lead measure?

Answered: 1 week ago