2

I tought of this problem a while ago

Imagine you own a casino. At the start of every day (12:00am) each hour there is 25% chance that all the guests will leave and you will need to turn off the power, so you should expect it to be, on average, 4 hours after midnight. Your little casino does well and you decide to open another one,with same probability of 25% that guests will leave after an hour. The problem is that the main power switch turns off and on both of your casinos, so you will need to turn it off only when both of them are empty. Whats the expected number of hours now? What about when you have 10 casinos? How do I get the formula for N number of casinos?

  • clearly, both casinos have the same expected value and since both casinos run independently, the expected value is the same for all casinos. – Syd Amerikaner Aug 18 '19 at 23:13
  • That is true but expected value of them both being empty should be higher. One casino might be empty after 3 hours but other is not. – Heroofmetal Aug 18 '19 at 23:21
  • This needs clarifying. Are you saying that each hour, on the hour, there is a 1/4 chance that everyone will leave immediately? What happens after that? If everyone leaves casino 1 at 1am, but people remain in casino 2 during 1am-2am, could it be that at 2am, some people enter casino 1, making it no longer empty? Can people enter between the hours? – toe-pose Apr 26 '20 at 18:51
  • "Are you saying that each hour, on the hour, there is a 1/4 chance that everyone will leave immediately?"-Yes "If everyone leaves casino 1 at 1am, but people remain in casino 2 during 1am-2am, could it be that at 2am, some people enter casino 1, making it no longer empty?"-Once people leave a casino they dont come back – Heroofmetal Apr 26 '20 at 19:11

2 Answers2

1

First note that the situation with one casino is finding the expected value of a geometric random variable with the probability of success being $25\%.$ The random variable telling you when everyone has left all your casinos is the maximum of the random variables for each casino.

Formally, then, we define $X_i, 1\leq i \leq N$ to be geometric with $p=0.25$ (we may as well assume independent since the people in the casinos presumably don't communicate in any way with the other casinos) and $Y = \max\{X_i, 1\leq i\leq N\},$ and note we want $E[Y].$

To investigate this expected value, see the answers to Expectation of the maximum of i.i.d. geometric random variables

In particular, the answers there give the approximation $$E[Y] = E[\max\{X_i\}] \approx \frac{1}{2} - \frac{H_N}{\ln(1-p)}$$ where $H_n = \sum_{k=1}^n \frac{1}{k}$ is the $n$th harmonic number. For example, $p=0.25$ and $N=10$ yields $E[Y] \approx 10.6812679$

0

The probability that a single casino has all its guests leave follows a geometric distribution $X$ with mass function:

$$ p(x) = (3/4)^{x-1}\cdot(1/4) $$

where x is the number of hours after midnight all the guests leave.

In general, if we want all $n$ casinos to be empty when we shut off the power, we seek to find the expected value of the time it takes for all the casinos to be empty. Let $Y = \max(X_1,X_2,...,X_n)$. We want to find $E(Y)$.

The cumulative distribution function of the $i^{th}$ casino $X_i$ is $F(x_i) = 1 - (3/4)^{x_i}$.

$Y$ only occurs if all of the all the $n$ casinos individually has had all its guests leave. Thus, it is an order statistic with

$$ F(y) = F(x)^n = (1-(3/4)^x)^n $$

and so its mass function is

$$ p(y) = F(y) - F(y-1) $$ $$ p(x_{max}) = F(x)^n - F(x-1)^n $$ $$ p(x_{max}) = (1-(3/4)^x)^n-(1-(3/4)^{x-1})^n $$

And so

$$ E(Y) = \sum_{x=1}^\infty x\cdot p(y) = \sum_{x=1}^\infty x\cdot ((1-(3/4)^x)^n-(1-(3/4)^{x-1})^n) $$

For the case $n = 10$, the answer (according to Desmos) is about $10.681$.

Bryden C
  • 642
  • 6
  • 20