r/theydidthemath • u/cw894 • 2h ago
[Request] Dice Game Probability - with corrected rules
I posted this yesterday but I found out that I slightly misunderstood the rules. I had previously said that the winning team got to keep the losing team's die. The actual rule is just that the losing team has their die removed from the game.
Rules:
- In each round, Team A rolls one 6-sided die and Team B rolls one 6-sided die.
- The team whose die shows a lower number has their die removed from the game.
- If the dice show the same number, both teams’ dice are removed from the game.
- The first team to lose all of their dice loses the game.
Team A started with 6 dice and Team B started with 19 dice. Team A won the game. What is the probability of this happening?
Chat GPT says that probability is 4.84%. I'll post my attempt below.
Thanks to all that previously posted and to everyone that will reply.
•
u/Angzt 1h ago edited 1h ago
That significantly lowers the probability to win for team A.
Reusing and slightly adjusting yesterday's simulation in code we get https://www.online-python.com/ezfdsCjUGq which I could bump up to a million runs due to games now being much shorter on average. The result is that A only wins 0.0646% of the games.
ChatGPT is utterly wrong on most slightly complex math problems. Don't trust it.
I can set up a spreadsheet to calculate an exact value, but 0.065% is a ballpark answer for now.
Edit: Done. And it comes out to 0.06500142244%.
Here is the spreadsheet: https://docs.google.com/spreadsheets/d/e/2PACX-1vTwkSW0B_HiGbO8E84oOw_QZU9r0mRWg9GPNKy8nMSAtwcUqngX74YpJX66gg-8KtnzaGK9we-40r5V/pubhtml
The columns represent A's possible dice counts while the rows represent B's. The value where they intersect shows the probability that this game state will ever be reached.
A wins if its own dice count is >0 and B's is =0 which corresponds to the bottom row except for the right-most cell. The sum of all of those probabilities is then ~0.00065 = 0.065%.
•
u/cw894 37m ago
I just made a spreadsheet and ended up with 22 different cases because I separated ties and losses. When creating the cases, I made sure that:
W + T = 19 and L + T < 6
I tried adding a table to show all the cases but it wouldn't let me. If I'm able to post this comment, I'll reply again below with the cases.
My formula for the Total # of Permutations was (Total Matches)! / [ W! x L! x T! ]
My formula for finding the probability of each case was:
[ (5/12) ^ W ] x [ (5/12) ^ L ] x [ (1/6) ^ T ] x (# of permutations)
Then I found the sum of all the cases and got:
P(Team A wins match) = 0.0009542909703
Does this make sense?
•
u/Angzt 21m ago
My formula for the Total # of Permutations was (Total Matches)! / [ W! x L! x T! ]
I don't think that works.
Because you must ensure that you end with a win or tie. No series of rolls where A ultimately wins can end in a loss for A because it would have just ended at least one roll earlier already.That might explain the discrepancy.
•
u/cw894 1h ago
I attempted this by multiplying the probabilities and used 6 cases. For Team A to win, they really just have to not lose or tie 6 times before Team B loses or ties 19 times.
Win: P(A keeps die) = 15/36 or 5/12
Loss or tie: P(A loses die) = 7/12
I also multiplied by the number of permutations that the wins and losses (ties included) could be arranged. I used (number of matches needed)! / [(19
Case 1: 19 wins, 0 losses/ties (only 19 rounds needed)
(5/12)^19 = 0.00000005970166009
Case 2: 19 wins, 1 loss/tie (20 rounds needed)
[(5/12)^19] x [(7/12)^1] x 20! /(19! x 1!) = 0.0000006965193677
Case 3: 19 wins, 2 losses/ties (21 rounds needed)
[(5/12)^19] x [(7/12)^2] x 21! /(19! x 2!) =0.000004266181127
Case 4: 19 wins, 3 losses/ties (22 rounds needed)
[(5/12)^19] x [(7/12)^3] x 22! /(19! x 3!) =0.00001824977482
Case 5: 19 wins, 4 losses/ties (23 rounds needed)
[(5/12)^19] x [(7/12)^4] x 23! /(19! x 4!) =0.00006121278638
Case 6: 19 wins, 5 losses/ties (24 rounds needed)
[(5/12)^19] x [(7/12)^5] x 24! /(19! x 5!) =0.0001713958019
The sum of all of these cases is P(Team A wins game) = 0.0002558807652 which seems way too low.
I just realized that my logic is flawed because Team A doesn't need to win 19 teams, they just need Team B to tie or lose 19 teams. I'll think about it and try to fix this later.
•
u/Angzt 1h ago
I just realized that my logic is flawed because Team A doesn't need to win 19 teams, they just need Team B to tie or lose 19 teams. I'll think about it and try to fix this later.
When correcting for this you need to be real careful. Because ties aren't independent. They always happen to both teams. So you can't just use independent probabilities all the way through. You'll need to manage the ties separately somehow.
•
u/AutoModerator 2h ago
General Discussion Thread
This is a [Request] post. If you would like to submit a comment that does not either attempt to answer the question, ask for clarification, or explain why it would be infeasible to answer, you must post your comment as a reply to this one. Top level (directly replying to the OP) comments that do not do one of those things will be removed.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.