A hotel has 100 rooms, and charge guests for their rooms in advance. The number of reservations for tomorrow night is denoted as $n$. Rooms are held until 10pm, but if a guest hasn't shown up by 10pm, then the booking is canceled, and the hotel keeps the booking charge. The hotel has learned from past experience that the probability that any booked guest actually shows up by 10pm is $p = 19/20$, and that hotel guests show up (or not) independently from one another. Let $X$ denote the number of booked guests who show up before 10pm.

Suppose the hotel earns 50 dollars in profit for every guest and no-show, but has to pay a compensation of 60 dollars to each guest who is unable to stay due to overbooking. Assuming the demand for pre-booked rooms is unlimited, how many rooms should be sold to maximize the expected profit?

So we have that $P(X=k)={n \choose k}(p)^k\times(1-p)^{n-k}$. I am having trouble trying to create a profit function. My first attempt was $$v(X) = \begin{cases} 50n-60(X-100) & X > 100\\ 50n & X \leq 100 \end{cases}$$ However, to maximize payoff, it seems that the hotel would need a proper understanding of exactly who will show up, which is random. This function also does not seem to capture the probability of guests showing up, which should weight what choices the hotel will make. What type of profit function will take into the probability of guests showing up?

  • $\begingroup$ Seems unrealistic to assume \$50 profit for a guest how shows and stays overnight and also for a no show. Also seems counterproductive to ignore annoyances of those who arrive late and are denied access and those arriving on time who are denied because of overbooking. // Given the stated rules your cost function may be OK. $\endgroup$ – BruceET Sep 21 at 6:15
  • $\begingroup$ How would I go about maximizing the expected profit? It depends on whether the hotel knows how many people will show up. $\endgroup$ – hkj447 Sep 21 at 12:48
  • $\begingroup$ Maybe you need to try various $n$s, use the binomial dist'n for each, and see which $n$ gives the most profit. // Somewhere on the site there used to be a similar problem on overbooking air flights posed in a way that makes considerably better sense. $\endgroup$ – BruceET Sep 21 at 14:44

Your profit function is correct. What you want to maximize here is the expected profit, that is: $$\mathbb E[v(X)]=\sum_{x=1}^n p(X=x)\cdot v(x)$$

We can write a R script to optimize this function:

# function to find expected profit if they book n rooms
expected_profit <- function(n){
  X = seq(0,n)
  prob = dbinom(X, size=n, prob=19/20)
  profit = ifelse(X>100, 50*n-60*(X-100), 50*n)

# plotting that function
  unlist(Map(expected_profit, seq(1,400))),

# finding the maximum
which.max(unlist(Map(expected_profit, seq(1,400))))

This gives the result $n=108$. That is, they optimize their average profit by booking 108 rooms.

| cite | improve this answer | |
  • $\begingroup$ This answer was actually incorrect, the true answer is $n=105$. I can share the results if interested. $\endgroup$ – hkj447 Sep 29 at 0:42
  • $\begingroup$ @hkj447 I would like to see the correct results. I was not able to find the error in my calculations, might be a simple coding error, since I'm quite new to R $\endgroup$ – PedroSebe Sep 29 at 13:37

It is obvious that the optimum number of bookings yielding maximum profit must be greater than the number of available rooms (i.e. 100). Thus, we only need to search for the optimum booking number with $n > 100$.

$Average Profit(n)$

$= 50n - 60\sum_{k=101}^n (k-100){n \choose k}p^k\times(1-p)^{n-k}$.

This gives the optimum booking number 108 for $p=0.95$, same as provided above by PedroSebe.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.