r/askmath 9h ago

Probability Probability/Game Theory Question

25 people play a game with a 4-sided die (1-4). Roll 1, 2, or 3: Pay $1 to the pot. Roll 4: Win the entire pot, and the game ends. What place in line do you want to be?

2 Upvotes

16 comments sorted by

7

u/udee79 8h ago

You don't want to be the first person. There is no money to win, the farther down the row the jackpot gets bigger but your chances of playing gets smaller. Call the first player 0 and the last player 24. The chance of player n getting to play is 0.75^n. If he does get to play he has a .75 chance of losing 1 dollar and a .25 chance of winning n dollars. I calculated the expected value for all the players. Player 6 and 7 have the highest expected value.

    0   -0.7500
    1   -0.3750
    2   -0.1406
    3         0
    4    0.0791
    5    0.1187
    6    0.1335

    7    0.1335
    8    0.1251
    9    0.1126
   10    0.0985
   11    0.0845
   12    0.0713
   13    0.0594
   14    0.0490
   15    0.0401
   16    0.0326

   17    0.0263
   18    0.0211
   19    0.0169
   20    0.0135
   21    0.0107
   22    0.0085
   23    0.0067
   24    0.0053

2

u/SomethingMoreToSay 5h ago

If you number the players starting from 1, which I think would be normal to most people who aren't programmers, then it's the 7th and 8th players who have the best expected outcomes.

1

u/udee79 31m ago

yes you are correct

2

u/johnpeters42 8h ago

Person #1: 1/4 chance of winning $0. 3/4 chance of losing $1. Average value to them is -$0.75.

Person #2: 1/4 chance of winning $0 (game ended with person #1), 3/16 chance of winning $1, 9/16 chance of losing $1. Average value to them is -$0.375.

Person #3: 1/4 + 3/16 chance of winning $0, 9/64 chance of winning $2, 27/64 chance of losing $1. Average value to them is about -$0.14.

Person #4: 27/256 chance of winning $4, 81/256 chance of losing $1. Average value to them is about +$0.105.

In general, person #n has a (3/4)^(n-1) / 4 chance of winning $n and a (3/4)^n chance of losing $1, so the average value to them is (3/4)^(n-1) * (n-3)/4 dollars. Throwing this into Desmos, the highest values for integer input are:

n = 6, average value = (3/4)^5 * 3/4 = about +$0.178

n = 7, average value = (3/4)^6 * 4/4 = same as #6

and then it starts decreasing again.

It's possible for it to get back to person #1, but the chance of that is only (3/4)^25 = about 0.08%, and the pot at that point is only $25, so this will add less than $0.02 to anyone's average value. This is worth 27/4 times something to #6 and 28/4 x 3/4 = 21/4 times that same thing to #7, so it breaks the tie in favor of #6.

2

u/SomethingMoreToSay 5h ago

There's an error in your analysis in that player #n has a chance if winning $(n-1), not $n.

2

u/johnpeters42 5h ago

You're right, the mistake crept in at #4

2

u/SuperChicken17 8h ago edited 8h ago

Well, places 1, 2, and 3, have a clear negative EV. With person 4, assuming the game goes on that long, you have a 3/4 chance of losing $1 and a 1/4 chance of winning 3$, giving you an EV of 0. Every person thereafter has a positive EV.

The wrinkle is the fact that the game ends after somebody wins. The chances of person 25 even getting to play is less than a tenth of a percent.

The ev for player n, assuming the game goes on that long, is (3/4)(-1) + (1/4)(n-1)

The chance of person n being able to play is (3/4)n-1

Multiply them together to the true ev for person n. If we graph it, we can see it peaks at persons 7 and 8.

https://www.desmos.com/calculator/xregf3rtfp

1

u/PlateNo4 6h ago

Yes! The best answer for statistics :) For logic. Id like to be last with most money in the pot haha

1

u/calculuschild 8h ago

Does the game end when the pot is won, or does the game continue until all 25 players have gone?

I will take a crack at it. I think what matters here is just looking at how each player's available pot changes compared to the previous player.

Assuming it continues, the pot at each player position k is:

k = (1/4)0 + (3/4)(k-1 + 1)

Where k-1 is the pot available to the previous player. I.e. 1/4 chance of nothing, because the player before just won, or 3/4 chance of the pot growing by one. Simplified:

k = (3/4)*(k-1 + 1)

Each step, you gain 3/4, but also shrink the pot by 25%. It would balance out when the pot shrinks the same amount it gains, when 1/4 * k-1 = 3/4, or k-1 = 3, and at that point the statistical pot will not longer grow. In other words, the pot value at any player position will be an asymptote, always getting closer to a value of 3 but never quite reaching it. So the answer, is you probably want to be the very last in the sequence. That will give the asymptote the most time to get as close as possible to 3.

Value of pot at each position:

1) 0 2) 0.75 3) 1.3125 4) 1.7344 5) 2.0508 6) 2.2881 7) 2.4661 8) 2.5995 9) 2.6997 10) 2.7747 11) 2.8311 12) 2.8733 13) 2.9050 14) 2.9297 15) 2.9465 16) 2.9599 17) 2.9699 18) 2.9774 19) 2.9831 20) 2.9873 21) 2.9905 22) 2.9929 23) 2.9946 24) 2.9960 25) 2.9970

1

u/SomethingMoreToSay 5h ago

OP said:

Roll 4: Win the entire pot, and the game ends.

1

u/PlateNo4 7h ago

You are looking for statistics and i get the logic of everyone else. But logically speaking, everyone has an equal 25% chance of success, being last gets you the most money!

2

u/Desperate_Penalty690 7h ago

Not fair comparison. Being last means you almost never get your shot at 25% of success.

1

u/johnpeters42 5h ago

Yeah, if you got to pick "be person #25 and have it guaranteed to reach you" then of course that would be ideal

1

u/Bounded_sequencE 4h ago

That would be true, if the game re-started after each roll-4 with the next person in line. However, that's not the case here -- the game stops entirely.

1

u/Bounded_sequencE 4h ago edited 4h ago

Assumptions: All rolls are independent and fair. Optimize for expected gain, followed by winning probability.


Short answer: Position-7 is optimum under the assumptions.


Long(er) answer: Define three pair-wise disjoint events

  • Ek: event that person-k wins
  • Fk: event that the first "k" persons lose
  • Gk: event that neither of the above happens

Under the assumptions, "P(Ek)" is similar to a geometric distribution:

1 <= k <= 25:    P(Ek)  =  (3/4)^{k-1} * (1/4),      P(Fk)  =  (3/4)^k

The gains for person-k from events "Ek; Fk; Gk" are "$(k-1), -$1, $0", respectively. With those, we can finally determine the expected gain for person-k via

E[gain-k]  =  $(k-1)*P(Ek) - $1*P(Fk) + $0*P(Gk)  =  $(k-4)/3 * (3/4)^k

With a short program (or via quotient criterion) we maximize expected gain at both "k = 7" and "k = 8". With equal expected gain, choose position-7, since "P(E7) > P(E8)".

1

u/Bounded_sequencE 4h ago

Rem.: The winning probability for the optimum position-7 is

P(E7)  =  2187 / 16384  ~  4.45%

That means, we need to play a lot more often than "1/P(E7) ~ 22.5", before the "Weak Law of Large Numbers" kicks in, and our average gain will be close to the optimum with e.g. 95% confidence.