# Binomial Calculating Probability of Airline Tickets

Because not all airline passengers show up for their reserved seat, an airline sells 125 tickets for a flight that holds only 115 passengers. The probability that a passenger does not show up is 0.05, and the passengers behave independently. Round your answers to four decimal places (e.g. 98.7654).

a) What is the probability that every passenger who shows up can take the flight?

b) What is the probability that the flight departs with at least one empty seat?

I am not using a statistics program to calculate my answers like I have seen many answers on here use, but by using a formula: For example: P(115) = 125 C 115 * (.95)^115 * (.05)^10 = .0475

Similarly I have:
P(116) = .0778
P(117) = .1137
P(118) = .1465
P(119) = .1637
P(120) = .1556
P(121) = .1221
P(122) = .0761
P(123) = .0353
P(124) = .0108
P(125) = .0016

So for part a) I did:
1 - P(X > 115) = 1 - .9032 = .0968

and for part b) I did:
1 - P(x >= 115) = 1 - .9507 = .0493

These numbers just do not seem correct to me. And I am confused as to why the probabilites are increasing from P(115) to P(119), (I would expect them to decrease, however I guess if they are on the rising part of the binomial distribution and then go to the falling part of the distribution at P(120)

Edit: I know understand these values are correct and fall around the most probable value P(119) which is the mean. Thank you for help in clarifying.

• If you will look at the 'Related' links to the right of your question, you will see at least one that answers almost the same question. // I will look at some of your answers to see if anything seems strange. – BruceET Sep 12 '18 at 22:58
• Well, by now you have several verifications. Problem seems strange; no wonder you wondered. Considering my 'bad luck', I think I may know this airline. – BruceET Sep 12 '18 at 23:40

The number of people who show up for the flight in the circumstances you describe is $X \sim \mathsf{Binom}(n=125, p=.95).$ The probability everyone who shows has a seat is $P(X \le 115) \approx 0.0967.$ This can be computed in R statistical software, in which pbinom is a binomial CDF.

pbinom(115, 125, .95)
[1] 0.09672946


This may seem absurdly small, but the average number of people showing is $\mu = E(X)= np = 128.25 > 125.$ So on the average flight the airline should expect to leave some people behind.

The probability there will be at least one empty seat is $P(X \le 114) = 0.0492.$ So that will seldom happen.

pbinom(114, 125, .95)
[1] 0.04921917


Here is a plot of the relevant part of the distribution of $X.$

Here are exact values from R, matching your computations, which seem quite accurate:

x = 115:125;  pdf = dbinom(x, 125, .95)
cbind(x, pdf)
x         pdf
[1,] 115 0.047510291
[2,] 116 0.077818581
[3,] 117 0.113734849
[4,] 118 0.146505907
[5,] 119 0.163741896
[6,] 120 0.155554801
[7,] 121 0.122129803
[8,] 122 0.076080861
[9,] 123 0.035256984
[10,] 124 0.010804560
[11,] 125 0.001642293


Note: Code for figure:

x = 110:125;  pdf = dbinom(x, 125, .95)
plot(x, pdf, type="h", ylim=c(0,max(pdf)), lwd=2)
abline(h=0, col="green3")


Because not all airline passengers show up for their reserved seat, an airline sells 125 tickets for a flight that holds only 115 passengers. The probability that a passenger does not show up is 0.05, and the passengers behave independently. Round your answers to four decimal places (e.g. 98.7654).

Suppose $X \sim \textrm{Bin}(125,0.5)$ is a binomial random variable. The mass function is given by

$$f(k;125,0.5) = Pr(X = k) = \binom{125}{k} \bigg(\frac{5}{100}\bigg)^{k} \bigg( \frac{95}{100} \bigg)^{125-k} \tag{1}$$

We can visualize the probability mass function then like this in Python

n=125
p=.95
x = range(n+1)
y = stats.binom.pmf(x, n, p)
plt.plot(x,y,"o", color="black")

plt.axis([-(max(x)-min(x))*0.05, max(x)*1.05, -0.01, max(y)*1.10])
plt.xticks(x)
plt.title("Binomial distribution PMF for tries = {0} & p ={1}".format(
n,p))
plt.xlabel("Variate")
plt.ylabel("Probability")


If you note then

y1 =  stats.binom.pmf(115,125,.95)

y1
Out[29]: 0.04751029149720219


to look at the cdf then

y2 = stats.binom.cdf(x,125,.95)

plt.plot(x,y2,"o", color="black")


If we take a closer look at the pdf

n=125
p=.95
x = range(100,150)
y = stats.binom.pmf(x, n, p)

y2 = stats.binom.pmf(x,125,.95)

plt.plot(x,y2,"o", color="black")


Your formula is correct. I didn't check the numbers but they look good. If $0.05$ of the people do not show up, the expected number of no-shows is $0.05\cdot 125=6.25$ so the most probable number who show up should be $119$, in agreement with your calculation.