Anyway, I was playing with the numbers since this is such a small game and I'm curious. I ran a bunch of montecarlo simulations on how reliably and/or fast we can expect to find mafia if we randomly sample N players from the full pool and stick to choosing our kills solely from that pool. For every random sample of size N between 1 and 11, I wanted to know:
- What's the probability there's mafia in that sample.
- How many mafia are there on average in that sample.
- When there *is* at least one mafia, how many random shots does it take to find the first?
I'm not sure if this is useful, maybe just a curiosity, but here are my findings:
Code:
>>> Sample size: 1
On average there are 0.27703 mafia members in random group (in 27703 of 100k simulations)
On average the first mafia member was found after 0.0 random choices
>>> Sample size: 2
On average there are 0.5463 mafia members in random group (in 49105 of 100k simulations)
On average the first mafia member was found after 0.4412585276448427 random choices
>>> Sample size: 3
On average there are 0.8165 mafia members in random group (in 65938 of 100k simulations)
On average the first mafia member was found after 0.8399708817373897 random choices
>>> Sample size: 4
On average there are 1.09598 mafia members in random group (in 79075 of 100k simulations)
On average the first mafia member was found after 1.1901738855516915 random choices
>>> Sample size: 5
On average there are 1.36525 mafia members in random group (in 88048 of 100k simulations)
On average the first mafia member was found after 1.4854284026894422 random choices
>>> Sample size: 6
On average there are 1.63678 mafia members in random group (in 93920 of 100k simulations)
On average the first mafia member was found after 1.711914395229983 random choices
>>> Sample size: 7
On average there are 1.90853 mafia members in random group (in 97554 of 100k simulations)
On average the first mafia member was found after 1.8616766098776063 random choices
>>> Sample size: 8
On average there are 2.18431 mafia members in random group (in 99427 of 100k simulations)
On average the first mafia member was found after 1.9634103412553934 random choices
>>> Sample size: 9
On average there are 2.45294 mafia members in random group (in 100000 of 100k simulations)
On average the first mafia member was found after 2.00874 random choices
>>> Sample size: 10
On average there are 2.72703 mafia members in random group (in 100000 of 100k simulations)
On average the first mafia member was found after 1.99893 random choices
>>> Sample size: 11
On average there are 3.0 mafia members in random group (in 100000 of 100k simulations)
On average the first mafia member was found after 1.99702 random choices
What it could *possibly* mean is we could gamble on the N=4 or 5 results, hope that by selecting that number of random players and sticking to it we fall into the 79%-88% percent of games where there's mafia *and* we find them within our second random choice lol