1

Question

Coins are located in boxes, but the content of each box is unknown. A box has a probability $p$ of containing a coin, but a probability $1-p$ of forcing its opener to quit the game (and lose all coins).

What number of boxes $k$ would need to be opened for the largest expected coin gain?

Additional question: If $n$ players play this game, what would be the best number of box openings you should make in order to maximize your winning probability (how many boxes would need to be opened to make the probability of having the most coins greatest), assuming each player opens some random number of boxes, between $0$ and $2k$.

I came up with this problem in my head, and am unsure about my approach to the first part. The second part seems difficult to me, and I don't really have any idea.

Attempt

As for the first problem, I think the coin gain can be written as a random variable which is a sum of indicators, $$X=X_1+X_2+\dots +X_k$$

So the expected coin gain is $$\mathbb{E}[X]=\mathbb{E}[X_1]+\mathbb{E}[X_2]+\dots +\mathbb{E}[X_k]$$

Now, by definition, for each $1\leq i\leq k$, $$\mathbb{E}[X_i]=p^i$$

And therefore we have $$\mathbb{E}[X]=p+p^2+\dots +p^k = \frac{p(p^k-1)}{p-1}$$

We are seeking the $k$ which maximizes this expression. But here something fails, since this is a decreasing function of $k$, making $k=1$ its maximum, which doesn't make sense. I think there is something I am missing in my attempt.

I appreciate solutions and ideas for both questions, as well as help understanding the flaw in my attempt. Thanks.

HappyDay
  • 1,039
  • If you plan to stop after $1$ success, your expected gain is $p$. If you plan to stop after $2$ successes, your expected gain is $2p^2$, which is greater than $p$ if $p>\frac12$. And so on – Henry Feb 25 '23 at 23:30
  • The multiplayer part isn't quite clear. If every player opens a random number of boxes, there's nothing left to decide. So I assume you mean that we're to assume that all other players open a number of boxes uniformly randomly distributed between $0$ and $2k$? What $k$ is this? The optimal $k$ from the single-player version? Or an analogous $k$ in the multi-player version? If it's the $k$ were trying to optimize, does that mean we can influence the other players' behaviour by our choice? – joriki Feb 26 '23 at 07:16
  • You say : $E[X]=E[X_1]+ ..+E[X_n]$ with $E[X_i]$ positive for each $i$. No. If this formula was correct, the good strategy would be to open all boxes. But when you open a 'loosing' box, you loose all your coins. So when you have already won $n$ coins, the expected gain of the following box is $+1$ with probability $p$ and $-n$ with probability $1-p$. It is $p+n(p-1)$. You have to play if this expected gain is positive. – Lourrran Feb 26 '23 at 08:31
  • @joriki, I mean all other players play that way. And the $k$ is that of the first question. – HappyDay Feb 26 '23 at 11:09
  • Still not entirely clear; for Q2 do you choose and announce the number of boxes you resolve to open first, $k$, and then everyone else opens a number of boxes each that is a uniformly random integer in $[0,2k]$? – Parcly Taxel Feb 26 '23 at 11:16
  • Yes, and that $k$ is the number of boxes from the first question ($-\frac{1}{\ln(p)}$). – HappyDay Feb 26 '23 at 11:19
  • I don't understand. If $k$ is fixed to be that number of boxes from the first question, and you announce that you're going to open that many boxes, what does your question "what would be the best number of box openings you should make in order to maximize your winning probability" refer to? – joriki Feb 26 '23 at 11:21
  • I'm sorry, I'll try clarifying. You have $n$ players, each one of them opening a uniformly random amount of boxes in $[0, -\frac{2}{\ln(p)}]$. Your goal is to end up with the most coins. How many boxes would you open? I believe the amount of boxes you would want to open would be larger than the previous $k$, since beating every other player would require playing a bit more risky, I think. – HappyDay Feb 26 '23 at 11:27

1 Answers1

1

The geometric distribution being memoryless, the optimal strategy consists of quitting after a fixed number $n$ of tries, which has expected value $np^n$ (since the only two outcomes of the game are "keep your earnings" and "lose everything"). For fixed $p$ this expression is maximised at $n=-\frac1{\ln p}$, but $n$ must be an integer, so the optimal $n$ is whichever gives the higher $np^n$ of $\lfloor n\rfloor$ and $\lceil n\rceil$.

Parcly Taxel
  • 106,430
  • The second paragraph is wrong. Optimizing your probability to have more than everyone else is different from optimizing your expected payoff. – joriki Feb 26 '23 at 07:13
  • @joriki What does $k$ in the second question mean? Does it depend on the number of boxes you open? – Parcly Taxel Feb 26 '23 at 07:15
  • I was just writing a comment under the question to ask about that because the question is unclear in that regard. But my comment here doesn't depend on that – even if you assume fixed strategies for the other players that you can't influence, optimizing your probability of beating them is different from optimizing your expected payoff. – joriki Feb 26 '23 at 07:17
  • @joriki I shall wait for clarification then. – Parcly Taxel Feb 26 '23 at 07:18
  • Thanks! I get it. The second problem (where every other player plays at random) seems like it may be fairly more difficult. – HappyDay Feb 26 '23 at 11:16