An analyst for Black Moon Ltd, an airline, is doing some simulation models of the mainrisks faced by the company. One of the more important unknowns is the future price of jet fuel.The analyst decides to model the average jet fuel priceJover the next financial year, in dollars perbarrel, as a random variable with the pdff(x) =?????????x7200, 0≤x <601120, 60≤x <1001120e(100−x)/50, 100≤x(a) Devise a procedure for generating random variates according to the pdff.(b) Use your procedure to generate 100000 random variates according to the distribution, and drawa histogram with the vertical axis scaled so as to give an estimate of the pdf. (Hint.R has afunction calledifelsethat may be useful.)(c) Find the exact expected values of(i)J;(ii)max(J,50).(d) Use a simulation to estimate the above expected values. Give the estimates in the form of 95%confidence intervals.1
2 Black Moon is known for carefully adjusting the prices of its tickets in the final days andhours before a flight departs. One of its favourite tricks is to increase the asking price of a ticket by10% after each ticket sale. For example, if the fourth-to-last seat on a flight is sold for $100, thenthe third-to-last will be priced at $110, the second-to-last at $121, and the last remaining seat at$133.10.Suppose this strategy is adopted for a flight departing in exactly 120 hours’ time. At the beginningof this period there are 13 unsold seats with an advertised price of $250 (although in accordance withthe pricing strategy, only the first of these will actually be sold at that price). Potential buyers areassumed to arrive as an inhomogeneous Poisson process with rateλ(t) =16140−t, for 0≤t≤120. Theamounts that the buyers are willing to spend are distributed uniformly between $150 and $800, andindependent of each other and of the arrival times.(a) What is the expected number ofpotentialbuyers of these seats?(b) Devise a method for simulating the potential buyers. Use your method to generate one realiza-tion, and list that realization’s potential buyers in order of their arrival, including their arrivaltimes and the amounts they are willing to spend. Use the last four digits of your student ID asthe random seed.(c) Perform a simulation with 5000 realizations to estimate how many of the 13 seats will be sold.Make a histogram of this quantity, and give a 95% confidence interval for its expectation. Youshould use thesim.revenuefunction fromsimulation.R.txt.(d) Black Moon is experimenting with an alternative strategy in which the ticket price is increasedby 10% every 10 hours, regardless of how the ticket sales are going. Re-do the histogram andconfidence interval for this case.3. The Black Moon customer service counter at Auckland Airport is typically staffed byone person. We model the arrival of customers at the counter as a Poisson process of rate 0.3 perminute, and the times taken to serve customers as independent exponentially-distributed randomvariables with rate 0.5 per minute. If necessary, customers form a first-come-first-served queue.(a) What is the distribution of the number of customers present when this system is operating insteady state? What is the mean number of customers present? For what fraction of the timeare there no customers present?(b) Use the queueing-simulation web page to perform a simulation of the customer-service counter.Make estimates, with 95% confidence intervals, of(i)the mean number of customers present;(ii)the fraction of the time for which there are no customers present.(c) An alternative model of the counter, meant to reflect particularly busy periods, has a customerarrival rate of 1.1 per minute and models the customer service times using a lognormal distribu-tion instead of an exponential distribution (though the mean and standard deviation remain thesame). With this model, it is clearly not possible for a single employee to operate the counter.How many staff are needed, and what will happen if there are fewer than that?(d) Repeat the simulation of part (b) for the alternative model, using the minimum possible numberof staff and assuming that waiting customers form themselves into a single queue. What now isthe mean number of customers presen