# For any given flight, an airline tries to sell as many tickets as possible. Suppose that on average, 10% of ticket holders fail to show up, all independent of one another. Knowing this, an airline will sell more tickets than there are seats available (i.e., overbook the flight) and hope that there is a sufficient number of ticket holders who do not show up to compensate for its overbooking. Using the Central Limit Theorem, determine n, the maximum number of tickets an airline should sell on a flight with 300 seats so that it can be approximately 99% confident that all ticket holders who do show up will be able to board the plane. Use the de Moivre-Laplace 1/2-correction in your calculations. Hint: You may have to solve numerically a quadratic equation.

## Let N be the numbers of passengers that show up. So p=0.9 and E[N]=0.9n and σ=(n*0.1*0.9)^1/2=0.3*n^1/2.

Using Moivre-Laplace we have P(N≥300.5)≈0.01
Next you should use CLT, solving quadratic equation and find value of n

## Well, well, well... looks like the airline wants to use some fancy math to avoid clowns like me getting on the flight! Alright, let's put on our mathematician hat and solve this!

First, let's find out how many ticket holders are expected to show up. Since the airline wants to be 99% confident that all ticket holders can board, it means they want the probability of everyone showing up to be at least 99%. So, we want to find the number of tickets that guarantees a probability of less than 1% (the complement of 99%) of overselling.

To do this, we need to use the Central Limit Theorem and make some assumptions. Let's assume that the number of ticket holders who will show up follows a binomial distribution. The success rate is 90% (100% - 10% no-show rate). The mean of the binomial distribution is n * p, where n is the number of tickets sold and p is the probability of success (probability of showing up).

To ensure that all ticket holders can board, we need to find the number of tickets sold, n, such that the mean, n * p, plus some margin of error is less than or equal to the number of seats available.

Now, here comes the quadratic equation part! The margin of error can be defined as the standard deviation of the binomial distribution, which is the square root of n * p * (1 - p). With the Central Limit Theorem, as n gets larger, the binomial distribution is well approximated by a normal distribution.

To be even more precise, we'll use the de Moivre-Laplace 1/2-correction in our calculations. This correction accounts for the discrete nature of the binomial distribution and helps improve the approximation.

With all that said, our equation becomes:

n * p + z * sqrt(n * p * (1 - p) + 1/2) <= number of seats

where z represents the z-score corresponding to the desired confidence level (in our case, 99%).

Unfortunately, solving this equation analytically is not straightforward, so we'll have to solve it numerically. But hey, it's better than solving a clown equation, right?

So, let's put our calculators to work and find the value of n that satisfies this equation! Good luck, mathematician!

## To solve this problem, we need to use the Central Limit Theorem and the de Moivre-Laplace approximation. The Central Limit Theorem states that the sum (or average) of a large number of independent and identically distributed random variables (in this case, the number of ticket holders who show up) will follow a normal distribution regardless of the shape of the original distribution.

Let's denote the maximum number of tickets the airline should sell as n, and the number of seats available as N (300 in this case). We want to find the value of n such that the airline can be approximately 99% confident that all ticket holders who show up will be able to board the plane.

First, we need to calculate the mean (μ) and the standard deviation (σ) of the number of ticket holders who show up.

The mean (μ) is the expected value, which is given by:
μ = N * (1 - p)
where N is the number of seats and p is the probability that a ticket holder shows up.

In this case, the probability that a ticket holder shows up is 1 - 0.10 = 0.90.
So, the mean (μ) is:
μ = 300 * (1 - 0.10) = 270

The standard deviation (σ) is given by:
σ = sqrt(N * p * (1 - p))
So, the standard deviation (σ) is:
σ = sqrt(300 * 0.10 * (1 - 0.10)) = sqrt(27) = 3√3

Now, we need to find the number of tickets n such that the probability of the number of ticket holders who show up exceeding the number of seats (N) is less than or equal to 1%.

Using the de Moivre-Laplace approximation, we can standardize the distribution and calculate the z-score corresponding to a 1% probability. The de Moivre-Laplace 1/2-correction is applied because we are working with discrete values (number of ticket holders).

The z-score is given by:
z = (n + 0.5 - μ) / σ

Since we want a 1% probability in the upper tail of the distribution, we find the z-score corresponding to a 99% probability using a standard normal table (or using a calculator/statistical software). The z-score for a 99% probability is approximately 2.33.

Solving the equation for the z-score:
2.33 = (n + 0.5 - μ) / σ

Rearranging the equation and substituting the values:
2.33 = (n + 0.5 - 270) / (3√3)

Simplifying the equation:
2.33 * 3√3 = (n + 0.5 - 270)
6.71√3 = (n + 0.5 - 270)

Adding 270 to both sides of the equation:
n + 0.5 = 6.71√3 + 270

Subtracting 0.5 from both sides of the equation:
n = 6.71√3 + 269.5

Now, we can calculate the value of n numerically using the equation above.

n ≈ 285.71 (rounded to the nearest whole number)

Therefore, the maximum number of tickets the airline should sell is approximately 286 to be approximately 99% confident that all ticket holders who show up will be able to board the plane.