Here is the problem:
- A bet is known to have a win rate of 25%.
- Upon winning, the bet pays $100.
- Player can choose the cost of the bet.
My understanding is that the breakeven bet size would be 25% times \$100 = $25, equal to the expected value of each bet.
However, I simulated this game with a short Python script:
The simulation results in a profit, even after 100 million trials. It seems to always result in a profit, I've ran the simulation many times. It appears that ~$33 is closer to the actual breakeven bet size (not shown, I just manually adjusted the bet size higher until the resulting profit converged to about zero).
What am I missing here? Am I calculating the breakeven bet size wrong or is there something wrong with the simulation?
Thanks in advance!!
total_value
(you will want to create a constantcost_of_bet = 25
to do this clearly) to model the cost of the bet. Upon success, addwin_value
tototal_value
to model the gain from winning. You don't have to do anything when success does not occur! BTW, why do you usenp.random.normal
? That's obscure and inefficient compared tonp.random.ranf
. $\endgroup$np.random.normal
. I found it here and thought it made sense to specify the distribution from which the randoms were being created (I compared the distributions here) $\endgroup$