* * * SC2 Mafia Thread * * * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Thread : Advanced Mafia Calculus e1 https://www.sc2mafia.com/forum/showthread.php?t=45739 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 1] Auteur : Tauntshaman Date : November 24th, 2019 10:44 PM Title : Advanced Mafia Calculus e1 the game is a k shot roulette such that k>=3. The min bet is 1 points. There's 1 guy who bet 10000 points There's n other players such that 1<=n<=11, who bet 100 points each. Assume everyone are cowards who only pulls the gun once. Assume the gun never jams. Assume your max bet is 11100 points. Chapter 1 Q1. Assume k=12 and n=2, how many points should you bet for maximum profit? (Hint: derive the equation once and find it's root!) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 2] Auteur : yzb25 Date : December 3rd, 2019 05:00 AM Title : Re: Advanced Mafia Calculus e1 Fuck this equation is actually really long. Was not expecting it to get this big. You got me T_T -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 3] Auteur : yzb25 Date : December 3rd, 2019 07:53 AM Title : Re: Advanced Mafia Calculus e1 Yeah, I'm pretty sure I haven't made any mistakes and this does rest on solving a quartic. The quartic in question doesn't seem to have any nice ways of being simplified. You'd just have to plug it into the quartic formula. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 4] Auteur : yzb25 Date : December 3rd, 2019 08:00 AM Title : Re: Advanced Mafia Calculus e1 One can demonstrate that the average profit can be written as a function of the player's bet, like so: E(profit)=0.25*( (10,000B)/(B+200) + (200B)/(B+10,100) - B ) Then, one can differentiate this equation w.r.t B and solving for its extrema (which will sadly be equivalent to solving a quartic). Lastly, one can plug all these extremum values for B (along with 1 and 11100) back into the function and uncover which extremum yields the largest value for E(profit). There are some issues with this approach. E(profit) merely represents the average amount of profit you're extremely likely to make after betting the same amount in this same scenario 100s of times. In reality you may run out of cash long before your average profit is E(profit)! Hence, this answer is highly theoretical. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 5] Auteur : Efekannn02 Date : December 3rd, 2019 08:15 AM Title : Re: Advanced Mafia Calculus e1 the game is a k shot roulette such that k>=3. The min bet is 1 points. There's 1 guy who bet 10000 points There's n other players such that 1<=n<=11, who bet 100 points each. Assume everyone are cowards who only pulls the gun once. Assume the gun never jams. Assume your max bet is 11100 points. Chapter 1 Q1. Assume k=12 and n=2, how many points should you bet for maximum profit? (Hint: derive the equation once and find it's root!) the root is Distorted because he is the root of all evil (tbh the same could be said to me aswell but then others call me chaotic neutral) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 6] Auteur : Tauntshaman Date : December 3rd, 2019 02:58 PM Title : Re: Advanced Mafia Calculus e1 One can demonstrate that the average profit can be written as a function of the player's bet, like so: E(profit)=0.25*( (10,000B)/(B+200) + (200B)/(B+10,100) - B ) Then, one can differentiate this equation w.r.t B and solving for its extrema (which will sadly be equivalent to solving a quartic). Lastly, one can plug all these extremum values for B (along with 1 and 11100) back into the function and uncover which extremum yields the largest value for E(profit). There are some issues with this approach. E(profit) merely represents the average amount of profit you're extremely likely to make after betting the same amount in this same scenario 100s of times. In reality you may run out of cash long before your average profit is E(profit)! Hence, this answer is highly theoretical. YOU GOT THE IDEA CONGRATS but no this is not the correct answer. Plug in your equation into desmos and it yields: 26482 However, this is only valid [9800,+infinity) due to the rule that u can't bet more than all others' bet combined. for example, in a 3-man roulette, if the other 2 ppl bet 5 and 10 pts each, and you bet 60, you bet will be automatically lowered to 5+10=15pts Obviously on [9800,10200] there isn't a critical point, thus this is no the correct answer -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 7] Auteur : yzb25 Date : December 3rd, 2019 03:58 PM Title : Re: Advanced Mafia Calculus e1 YOU GOT THE IDEA CONGRATS but no this is not the correct answer. Plug in your equation into desmos and it yields: 26482 However, this is only valid [9800,+infinity) due to the rule that u can't bet more than all others' bet combined. for example, in a 3-man roulette, if the other 2 ppl bet 5 and 10 pts each, and you bet 60, you bet will be automatically lowered to 5+10=15pts Obviously on [9800,10200] there isn't a critical point, thus this is no the correct answer I'm confused about what the permitted range of betting is. Your first post says it's between 1 and 11100, this post suggests it's between 1 and 10200. Both of these ranges include 1225. Also, regardless of what the cutoff ranges are, so long as you plug in your minimum permitted value, your maximum permitted value and then any extrema within the permitted range, you will find the highest. Or did I mess up my equation? -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 8] Auteur : yzb25 Date : December 3rd, 2019 04:01 PM Title : Re: Advanced Mafia Calculus e1 I'm confused about what the permitted range of betting is. Your first post says it's between 1 and 11100, this post suggests it's between 1 and 10200. Both of these ranges include 1225. Also, regardless of what the cutoff ranges are, so long as you plug in your minimum permitted value, your maximum permitted value and then any extrema within the permitted range, you will find the highest. Or did I mess up my equation? Also that's one freaky ass graph. I kinda like it. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 9] Auteur : Kenny Date : December 3rd, 2019 04:02 PM Title : Re: Advanced Mafia Calculus e1 The answer is 5, because 5 is the default value and a good compromise of risk and reward -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 10] Auteur : Kenny Date : December 3rd, 2019 04:04 PM Title : Re: Advanced Mafia Calculus e1 Also if you bet 1 you get 100% profit because you're gonna win more than 1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 11] Auteur : yzb25 Date : December 3rd, 2019 04:23 PM Title : Re: Advanced Mafia Calculus e1 Now that I think about it, it makes sense that betting between 1 and 2 thousand is the best. It's high enough to drown out your opponent's gains if the 10,000 loses, while still being a very small bet relative to 10,000. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 12] Auteur : Varcron Date : December 3rd, 2019 04:34 PM Title : Re: Advanced Mafia Calculus e1 My great math skills lead me to believe that the answer is 42, as 42 is always the correct answer. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 13] Auteur : Kenny Date : December 3rd, 2019 04:36 PM Title : Re: Advanced Mafia Calculus e1 Now that I think about it, it makes sense that betting between 1 and 2 thousand is the best. It's high enough to drown out your opponent's gains if the 10,000 loses, while still being a very small bet relative to 10,000.The guy attempting to bet 10k can always only put in as much as all other players combined. You do not get 10k from him if you don't bet 10k yourself. Hence the only way to gain 100% profit is to bet 1. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 14] Auteur : yzb25 Date : December 3rd, 2019 04:54 PM Title : Re: Advanced Mafia Calculus e1 The guy attempting to bet 10k can always only put in as much as all other players combined. You do not get 10k from him if you don't bet 10k yourself. Hence the only way to gain 100% profit is to bet 1. So, after all the bets are made, if someone's bet is larger than the sum of the other bets, their bet gets reduced to the sum of the other bets? Am I right in thinking that the loser's pot is split proportionately to how much each person bet? omg that explains what Taunt was saying I'm sorry XD -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 15] Auteur : DJarJar Date : December 3rd, 2019 07:07 PM Title : Re: Advanced Mafia Calculus e1 What about the order? With 12 shots and 4 players, on average each player will die 1/4 of the time, sure. But won’t the person going first, on average, pull the trigger the most and therefore get a larger share of the pot? Or is the order also random? -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 16] Auteur : Tauntshaman Date : December 3rd, 2019 08:12 PM Title : Re: Advanced Mafia Calculus e1 What about the order? With 12 shots and 4 players, on average each player will die 1/4 of the time, sure. But won’t the person going first, on average, pull the trigger the most and therefore get a larger share of the pot? Or is the order also random? if u assume everyone only pull once than order doesn't matter. for example, in a 3 shot roulette with 3 players: the first player has 1/3 chance to die the gun has 1/3 chance to fire in the first round, hence the chance of second player getting to pull is 2/3. and out of that 2/3 there's a 1/2 chance the gun will fire, 2/3*1/2=1/3 similarly, the third player has 1/3 chance to pull and 1/1 chance for the gun to fore, thus making it 1/3 also ...and the share is only dependent on your initial bet and extra pulls, not the "forced" ones -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 17] Auteur : Marshmallow Marshall Date : December 3rd, 2019 10:21 PM Title : Re: Advanced Mafia Calculus e1 My great math skills lead me to believe that the answer is 42, as 42 is always the correct answer. The answer is 2 Celsius degrees, obviously. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 18] Auteur : DJarJar Date : December 4th, 2019 12:29 AM Title : Re: Advanced Mafia Calculus e1 if u assume everyone only pull once than order doesn't matter. for example, in a 3 shot roulette with 3 players: the first player has 1/3 chance to die the gun has 1/3 chance to fire in the first round, hence the chance of second player getting to pull is 2/3. and out of that 2/3 there's a 1/2 chance the gun will fire, 2/3*1/2=1/3 similarly, the third player has 1/3 chance to pull and 1/1 chance for the gun to fore, thus making it 1/3 also ...and the share is only dependent on your initial bet and extra pulls, not the "forced" ones let's say the 6th shot is the kill-shot. So person 1 pulls twice total and lives Person 2 pulls twice total and dies person 3 pulls once and lives person 4 pulls once and lives Doesn't person 1 get a bonus for pulling more times? -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 19] Auteur : yzb25 Date : December 4th, 2019 03:26 AM Title : Re: Advanced Mafia Calculus e1 If my understanding is correct, that'd mean that when B<9800 the equation radically simplified because the 10,000's are replaceed with "200+B" in the original equation I posted: E(profit)=0.25*( (B+200)B/(B+200) + (200B)/(2B+300) - B ) ---> E(profit)=0.25*( 200B/2B+300 ) The maxima evidently becomes 9800. You can prove this without the graph again by deriving for extremums (realizing there's no extremums) and then evaluating all the endpoints of each function. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 20] Auteur : Kenny Date : December 4th, 2019 05:15 AM Title : Re: Advanced Mafia Calculus e1 But with a bet of 9800 you get less than 1% profit on average -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 21] Auteur : yzb25 Date : December 4th, 2019 07:32 AM Title : Re: Advanced Mafia Calculus e1 But with a bet of 9800 you get less than 1% profit on average Certainly, it depends on your measurement system and your priorities. The difference in E(profit) between 9800 and 250 is only 10. God knows how many bets you'd have to make before you notice the difference in profit between 9800 and 250 given that the variance of the former is so absurdly high, even if E(profit) is 66% higher. It might make more sense to bet less to have a more stable flow of income. Given how low E(profit) will be irrespective of your bet, it's probably not even worth playing. Things become far less exciting if the bets are bounded lmao. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 22] Auteur : DJarJar Date : December 4th, 2019 11:06 PM Title : Re: Advanced Mafia Calculus e1 If my understanding is correct, that'd mean that when B<9800 the equation radically simplified because the 10,000's are replaceed with "200+B" in the original equation I posted: E(profit)=0.25*( (B+200)B/(B+200) + (200B)/(2B+300) - B ) ---> E(profit)=0.25*( 200B/2B+300 ) The maxima evidently becomes 9800. You can prove this without the graph again by deriving for extremums (realizing there's no extremums) and then evaluating all the endpoints of each function. shouldn't the value for when the 10K guy dies be: (B+200)B/(2B+300) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 23] Auteur : Kenny Date : December 5th, 2019 12:38 AM Title : Re: Advanced Mafia Calculus e1 shouldn't the value for when the 10K guy dies be: (B+200)B/(2B+300)why -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 24] Auteur : DJarJar Date : December 5th, 2019 01:54 AM Title : Re: Advanced Mafia Calculus e1 Oh right, it's just the proportion of your bet versus the non-dying bettors. The bet of the guy who died is irrelevant there. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 25] Auteur : Date : January 2nd, 2020 09:06 AM Title : Re: Advanced Mafia Calculus e1 Pls no I have some statistics homework due this Monday and I still haven’t had a look at it lmao -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 26] Auteur : DJarJar Date : January 2nd, 2020 02:48 PM Title : Re: Advanced Mafia Calculus e1 but this is from a month ago mag you dirty NECROer -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 27] Auteur : Light_Yagami Date : January 15th, 2020 01:03 PM Title : Re: Advanced Mafia Calculus e1 What about the order? With 12 shots and 4 players, on average each player will die 1/4 of the time, sure. But won’t the person going first, on average, pull the trigger the most and therefore get a larger share of the pot? Or is the order also random? The Order Is Also Random Generated.. If U Make The Game U Arent Promised The Gun First.. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Post 28] Auteur : DJarJar Date : January 15th, 2020 01:54 PM Title : Re: Advanced Mafia Calculus e1 more necroing! -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-