Question: 30 Make a function called ntickets(N,gamma,p) that does the following: o calculates the number of tickets to be sold when the number of seats in

30 Make a function called ntickets(N,gamma,p) that does the following: o calculates the number of tickets to be sold when the number of seats in the flight is N and the probability of a "show" is p and gamma is the probability a plane will be truly overbooked (more people show than there are seats). You will do this in two ways: Use solely the appropriate discrete distribution Use the normal approximation o prints a named list containing nd, nc, N, p and gamma - where nd is calculated using the discrete distribution and nc is the same calculated with normal approximation. o creates a plot of Objective function Vs n, the objective function can be constructed from the defining equation by simply making the equation equal zero -- example 1-gamma-pnorm(...) = 0. The left-hand side can be called an objective function. Make two of these -- one for the discrete and one for the continuous case

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!