Math for “The Odds”
- BBmolla
-
BBmolla Open Book
- BBmolla
- Open Book
- Open Book
- Posts: 24301
- Joined: May 29, 2011
Math for “The Odds”
Hi, sorry to make a topic about this, how does the math work for the odds? How does a 35% of being scum translate into what is actually 15% (6/40)?
I’m just awful at math and don’t know what the equation for this sort of thing looks like.
https://wiki.mafiascum.net/index.php?title=The_OddsCome see me in the Great American Melodrama in Oceano- Irrelephant11
-
Irrelephant11 HeJack of All Trades
- Irrelephant11
He- Jack of All Trades
- Jack of All Trades
- Posts: 6276
- Joined: April 9, 2018
- Pronoun: He
- Location: My dog's eyes
- implosion
-
implosion he/himPolymath
- implosion
he/him- Polymath
- Polymath
- Posts: 14417
- Joined: September 9, 2010
- Pronoun: he/him
- Location: zoraster's wine cellar
Firstly as irrel points out, the 35% chance is actually based off of a 17.5% chance (7/40) as they roll scum on 34, 35, 36, 37, 38, 39, 40.
The math works out because there are two die rolls that are rerolled if they hit the same person. So suppose a person has probability p (for the 35% player, 7/40) of being scum based on one of the rolls. Then the probability they roll scum is equal to the probability that at least one of the two rolls is one of the numbers that makes them scum. If we call those probabilities A and B, then
P(player is scum) = P(A or B) = P(A) + P(B) - P(A and B)
But P(A and B) is 0 because if the same person is rolled as scum twice, you reroll. So it's actually just P(A) + P(B). And P(A) = P(B) = 7/40 in this case, so that player's actual odds of being scum are 14/40 = 35%.- BBmolla
-
BBmolla Open Book
- BBmolla
- Open Book
- Open Book
- Posts: 24301
- Joined: May 29, 2011
- mith
-
mith Godfather
- mith
- Godfather
- Godfather
- Posts: 9267
- Joined: March 27, 2002
- Location: McKinney, TX
- Contact:
This is incorrect. The formula you are using is for two outcomes, A and B, of the same random event.
Here, your A probability is, indeed, 7/40. However, B, the probability of the "35%" player being picked as scum by the second roll, is not 7/40 - it depends on the outcome of the first roll. This is easy to see by considering a hypothetical odds game where one player is assigned half the numbers. By your argument, this player would have a probability of 1 to be selected as Mafia, but it's easy to see that sometimes another scum team will be picked. (Give that player 21/40 numbers, and now their probability of being scum is >1, which is obviously absurd.)
The actual way to calculate this is:
P(34-40 is scum) = P(A in 34-40) + P(A not in 34-40)*P(B in 34-40)
= 7/40 + (P(A in 1)*P(B in 34-40 | B in 2-40) + P(A in 2-3)*P(B in 34-40 | B in 1,4-40) + etc.)
= 7/40 + (1/40*7/39 + 2/40*7/38 + etc.)
The actual odds for the game on the wiki are:
5.27830512%
10.42165748%
15.41911495%
15.41911495%
20.25851964%
20.25851964%
24.92632415%
24.92632415%
29.4073873%
33.6847326%- momo
-
momo Mafia Scum
- momo
- Mafia Scum
- Mafia Scum
- Posts: 2415
- Joined: February 23, 2017
- Location: Timezone: EST
Mith walking in like "This is incorrect. Get this bullshit of my site."Transcend-BUT READING MOMO I FEEL LIKE HE IS THE PLAYER THAT IF HE GOT PRESSURED AS TOWN HE WULD BE LIKE FUCK YALL AND MOVE ON WITH WHATEVER ELSE HE WAS DOING
Boonskies- Like, Momo is the most mislynchable player on all of mafiascum right now. I'm not day 1 lynching him.
TheGoldenParadoxAs it stands, momo is a great player or maybe the most mislynchable player on the site right now- implosion
-
implosion he/himPolymath
- implosion
he/him- Polymath
- Polymath
- Posts: 14417
- Joined: September 9, 2010
- Pronoun: he/him
- Location: zoraster's wine cellar
Yeah, i see where my logic is wrong - if rolling both dice at once and rerolling until they don't both land on the same scum, you'd wind up rerolling a higher fraction of the scenarios where the 7/40 player is scum than the fraction of scenarios where they are town, because they're relatively more likely to have both dice land on them as scum in one roll. So by that interpretation, P(A) is actually not 7/40 anymore, it's slightly lower. It's easier to reason about them as sequential events.- mith
-
mith Godfather
- mith
- Godfather
- Godfather
- Posts: 9267
- Joined: March 27, 2002
- Location: McKinney, TX
- Contact:
Yeah, if you roll both at the same time and reroll when they are the same, A and B will have the same probability but not 7/40. (And you will actually get different odds than the above.)
You can calculate this directly by noting that the probability of A hitting but not B is 7/40*33/40, and likewise B hitting but not A; then, the probability of a reroll is (1/40)^2 + (2/40)^2 + ... + (7/40)^2 = 190/1600, so the probability of not rerolling is 1410/1600 and the probability of the 35% player being scum is 14*33/1600 / 1410/1600 = 77/235 = 32.77%
The reason it's even lower this way is that relative likelihood of rerolling due to doubling up on this player is higher (because of the squares) than the other players, and in the previous method you don't lose the result of the first roll if you need to reroll.- implosion
-
implosion he/himPolymath
- implosion
he/him- Polymath
- Polymath
- Posts: 14417
- Joined: September 9, 2010
- Pronoun: he/him
- Location: zoraster's wine cellar
- implosion
-
implosion he/himPolymath
- implosion
he/him- Polymath
- Polymath
- Posts: 14417
- Joined: September 9, 2010
- Pronoun: he/him
- Location: zoraster's wine cellar
Actually there's not even a unique way (unique up to the probability that the scumteam is a given pair of players).
Imagine if there are 4 players who could be scum, with probabilities 2%, 50%, 50%, 98%. Call the players A,B,C,D. Then the following methods would both satisfy these odds:
1) Roll a 100-sided die. 1% of the time make the scumteam AB, 1% make it AC, 49% of the time make it BD, 49% of the time make it CD.
2) Roll a 100-sided die. 2% of the time make the scumteam AB, 48% of the time make it BD, 50% of the time make it CD.- mith
-
mith Godfather
- mith
- Godfather
- Godfather
- Posts: 9267
- Joined: March 27, 2002
- Location: McKinney, TX
- Contact:
Yeah, there are lots of ways you can do it. There's not a natural way in the sense of making individual scum probabilities independent of the pairings, except in the case where all players are equally likely.
One thing you can try is making the pair probabilities proportional to the product of the individual player probabilities, and then redistributing the duplicated pairs based on the remaining probability to be assigned. This isn't too bad, but if the highest probability scum is unique it will eventually get to a point where it is stuck doubling that player because everyone else has hit their goal. This is what the final table by probability of each (ordered) pair looks like:
Code: Select all
0.000% 0.126% 0.190% 0.190% 0.255% 0.255% 0.321% 0.321% 0.387% 0.454% 0.126% 0.000% 0.387% 0.387% 0.521% 0.521% 0.658% 0.658% 0.799% 0.942% 0.190% 0.387% 0.000% 0.590% 0.799% 0.799% 1.014% 1.014% 1.238% 1.469% 0.190% 0.387% 0.590% 0.000% 0.799% 0.799% 1.014% 1.014% 1.238% 1.469% 0.255% 0.521% 0.799% 0.799% 0.000% 1.088% 1.391% 1.391% 1.710% 2.046% 0.255% 0.521% 0.799% 0.799% 1.088% 0.000% 1.391% 1.391% 1.710% 2.046% 0.321% 0.658% 1.014% 1.014% 1.391% 1.391% 0.000% 1.792% 2.223% 2.695% 0.321% 0.658% 1.014% 1.014% 1.391% 1.391% 1.792% 0.000% 2.223% 2.695% 0.387% 0.799% 1.238% 1.238% 1.710% 1.710% 2.223% 2.223% 0.000% 3.474% 0.454% 0.942% 1.469% 1.469% 2.046% 2.046% 2.695% 2.695% 3.474% 0.210%
With individual probabilities, if you start the process entirely over once you get stuck, of:
5.01%
10.02%
15.03%
15.03%
20.04%
20.04%
25.05%
25.05%
30.06%
34.65%
This problem only occurs if the top probability is unique, though. If the top probabilities were both 30% (and the bottom both 10%), you eventually settle on:
Code: Select all
0.000% 0.256% 0.388% 0.388% 0.523% 0.523% 0.660% 0.660% 0.802% 0.802% 0.256% 0.000% 0.388% 0.388% 0.523% 0.523% 0.660% 0.660% 0.802% 0.802% 0.388% 0.388% 0.000% 0.591% 0.802% 0.802% 1.020% 1.020% 1.246% 1.246% 0.388% 0.388% 0.591% 0.000% 0.802% 0.802% 1.020% 1.020% 1.246% 1.246% 0.523% 0.523% 0.802% 0.802% 0.000% 1.094% 1.402% 1.402% 1.727% 1.727% 0.523% 0.523% 0.802% 0.802% 1.094% 0.000% 1.402% 1.402% 1.727% 1.727% 0.660% 0.660% 1.020% 1.020% 1.402% 1.402% 0.000% 1.812% 2.262% 2.262% 0.660% 0.660% 1.020% 1.020% 1.402% 1.402% 1.812% 0.000% 2.262% 2.262% 0.802% 0.802% 1.246% 1.246% 1.727% 1.727% 2.262% 2.262% 0.000% 2.926% 0.802% 0.802% 1.246% 1.246% 1.727% 1.727% 2.262% 2.262% 2.926% 0.000%
- mith
Copyright © MafiaScum. All rights reserved.
- implosion
- implosion
- mith
- implosion
- momo
- mith
- BBmolla
- implosion
- Irrelephant11
- BBmolla