Question: in r code please 1. [25 marks] Suppose Nt denotes the number of people in a queue for a pint of beer at time t
in r code please ![in r code please 1. [25 marks] Suppose Nt denotes the number](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f332f50d89b_32466f332f46bff5.jpg)
1. [25 marks] Suppose Nt denotes the number of people in a queue for a pint of beer at time t (in minutes). Assume that There are no people in the queue at time t=1, The number of customers joining the queue at each time point follows a Poisson distribu- tion with rate = 2, A fixed number of customers u - 20 leave the queue at times t = 10, 20, 30, 40, 50, ... (i.e. every ten minutes), (Hint: use the modulo operator %%) When departures do occur, they happen after the arrivals which also occur at the same t, The bar stops serving alcohol when the size of the queue reaches the bar's capacity of 50 people; otherwise, the bar stays open 'forever'. (a) [12 marks] Write a while loop which determines the time t when the bar shuts down and the number of customers N4 who were actually in the queue at this exact time. Do so by filling in the blanks in the code chunk below: > N join while(BLANK) { N
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
