DESCRIPTION Please keep in mind the OMSI rules. Save your files often. Submit each answer individually and make sure you receive the notification of successful submission. Don't wait till the last moment to submit all answers, as there might be network traffic in the last 5 minutes causing unexpected delay and failure. Remember that clicking CopyQtoA will copy the entire question box to the answer box. In questions involving code which will PARTIALLY be given to you in the question specs, you may need to add new lines. There may not be information given as to where the lines should be inserted. MAKE SURE TO RUN THE R CODE ANSWER IN PROBLEMS THAT INVOLVE R CODE! QUESTION (Text Answer - 20 pts) For the parking space example, Sec. 4.2.2, let I be an indicator variable indicating whether the car gets to park in the first block i.e. I = 1 if N < 11 = 0 otherwise Then find Var(I) QUESTION -ext .R -run 'Rscript ./omsi_answer2.R' (R Code Answer - 20 pts) Following is the modified code on p.83. minpiecepois <- function(lambda) { nbreaks <- rpois(1,lambda) breakpts <- sort(runif(nbreaks)) lengths <- diff(c(0,breakpts,1)) breakpts } bkrodpois <- function(nreps,lambda) { bps <- replicate(nreps,minpiecepois(lambda)) var(bps) }  The return value from bkrodpois() will approximate some exact theoretical value. Write a function with call form g(lambda) that gives the theoretical value. QUESTION -ext .R -run 'Rscript ./omsi_answer3.R' (R Code Answer - 20 pts) Consider the parking space example. Say now the driver takes the k-th empty space she finds, if it is in the first block or the first empty space after the first block, otherwise. Block size is b spaces, and the probability of an empty space is p. Write simulation code to find ED. (Hint: Instead of using rgeom(), use one of the other r*() functions.) ed <- function(k,b,p,nreps) { } set.seed(9999); print(ed(6,10,0.2,10000)) QUESTION -ext .R -run 'Rscript ./omsi_answer4.R' (R Code Answer - 20 pts) Write simulation code to find mean time until bus is full, where e.g. that time T will be 3 if the bus first becomes full as it leaves stop 3. Here s is the size of the bus. et <- function(s,nreps) { } set.seed(9999); print(et(5,10000)) QUESTION -ext .R -run 'Rscript ./omsi_answer5.R' (R Code Answer - 20 pts) Write a function with call form cfd(lambda) which gives the coefficient of variation of a Poisson distribution with parameter lambda. Print cfd(3.2).