I live in city $B$. Assume that i'm going on a vacation to city $A$. Before i go there, for every night i should pay 60 dollars and after i go there, for every other night i should pay 100 dollars.

After i go there, the company i work for, might call me for something important to return to city $B$. The probability that this happens in $0.3$ for every day.

Question : How many days it's better for me to pay for ? (before going to the trip)

Note : I have no idea about this question and i don't know how that probability is related to the question.
Thanks in advance.

  • $\begingroup$ I dont have that much knowledge of probability but shouldn't there be some sort of limits or number of days? $\endgroup$ – Ishan Taneja May 31 '16 at 20:15
  • $\begingroup$ This question is a bit unclear. Are you saying that before you go to city $A$, you preemptively pay for a certain number of days to stay in city $A$? In other words, before you go to $A$, you are booking a certain number of days there at a price of $\$60$? $\endgroup$ – Em. May 31 '16 at 20:17
  • $\begingroup$ @IshanTaneja There is no limit of that kind :) $\endgroup$ – Arman Malekzadeh May 31 '16 at 20:19
  • $\begingroup$ @probablyme i mean that before i go to $A$ i can reserve a room in a hotel and for this reservation, every night's price is 60 dollars :) $\endgroup$ – Arman Malekzadeh May 31 '16 at 20:20
  • $\begingroup$ Yes, this is a strange scenario. In the real world, there is usually a limit on the number of days you can take a vacation. Hence, since there is no limit, then this suggests that the number of days until the boss calls you back follows a geometric distribution with $p = .3$, assuming the result of the boss calling you back is independent day by day. $\endgroup$ – Em. May 31 '16 at 20:23

You will definitely need to one night in the hotel, and you have a 70% chance that you will stay a second night. But you only have a $(0.70)^2 = 0.49\%$ chance of needing a 3rd night.

The exected cost of an additional night is $\$60$ if you prepay and $(0.70)^{n-1}\cdot \$100$ if you pay as you go.
When $(0.70)^{n-1} > 0.60$ pre-pay (second night night)
When $(0.70)^{n-1} < 0.60$, pay as you go (3rd and beyond).


My understanding of the question is that you plan to stay on vacation until your company calls you back, and you want to minimise the expected cost.

On the assumption that the recall events are independent, the probability that you'll be staying after $k$ recall opportunities (which, if I understand correctly, occur before the $k$-th night) is $p_k=\left(\frac7{10}\right)^k$. If you pay in advance, the cost for this night is $\$60$ independent of whether you stay (assuming that you can't get a refund, which would render the question pointless). If you don't pay in advance, the expected cost is $\$100\cdot p_k$. Thus you should pay in advance if $p_k\gt\frac35$, which is the case for $k\le1$. Thus you should pay in advance for all nights up to the second recall opportunity.

  • $\begingroup$ we don't know how many nights we're gonna stay !!! $\endgroup$ – Arman Malekzadeh May 31 '16 at 21:00
  • $\begingroup$ @ArmanMalekzade: I'm aware of that. Please point out which part of the answer you interpreted as implying that we do know. (By the way, your exclamation mark key appears to be stuck.) $\endgroup$ – joriki May 31 '16 at 21:03
  • $\begingroup$ the result of your answer is something that we can't do in real world ! u say we should pay in advance for all nights :) so, when we don't know how many nights we're gonna stay, how r we supposed to do that ? $\endgroup$ – Arman Malekzadeh May 31 '16 at 21:05
  • $\begingroup$ @ArmanMalekzade: That sounds as if I may have completely misunderstood the question. (If so, it seems Ross misunderstood it the same way.) I thought you wanted to know how many nights to pay in advance, not knowing whether you'll actually be staying for those nights. From what you write in the comment, it sounds as if we can only pay for a night if we know that we'll actually be staying for that night. If so, why isn't the answer trivially that we can't pay for any of the nights? (By the way, my result isn't to pay for all nights, but for all nights up to the second recall opportunity.) $\endgroup$ – joriki May 31 '16 at 21:08
  • $\begingroup$ i don't know the answer but i know that this question is not that easy ! $\endgroup$ – Arman Malekzadeh May 31 '16 at 21:12

The chance your boss calls specifically on day $n$ is $0.7^{n-1}\cdot 0.3$, where the factor $0.7^{n-1}$ comes from the fact that he must not have called before. As the comments say, this is a geometric distribution. You should clearly prepay the first night, as you are guaranteed to need that hotel room. If you prepay the second night, after two nights you will have spent $120$. If you only prepay the first night, you have $0.3$ chance of only staying one night and spending $60$ and $0.7$ chance of staying at least two nights and spending $160$ in the first two nights. This gives an expected cost of $0.3\cdot 60+0.7\cdot 160=130$, so you are ahead paying for two nights. You can do a similar calculation for three nights. I am sure it will be a losing proposition to pay for three nights.

  • $\begingroup$ @joriki: oops, dropped a $10$. Fixed $\endgroup$ – Ross Millikan May 31 '16 at 20:53

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.