Coin flip experiment

I have been reading about the concept of an "edge" and one of the common experiments I heard was a coin flip experiment where people were allowed to bet any amount of an initial balance of $25 on a loaded coin where they knew the coin and its bias. They could do this for 30 minutes. If they lost, the bet they had made on that flip was decremented from the balance and vice versa if they succeeded. Apparently, most people failed at this and went bankrupt. I created a notebook to try and understand how one should operate when they have this "edge". In the end, I ended up with a balance of between$35 and $40. I would love to get an idea on how to analyse this problem statistically and how I could improve that result. Thanks! 1 Loading notebook preview... Notebook previews are currently unavailable. 6 responses Updated 1 Loading notebook preview... Notebook previews are currently unavailable. Kelly criterion is often used when calculating optimal bet sizes in scenarios like this. In fact Wikipedia article of Kelly criterion has a reference to study where they were flipping coins with 60% change of landing heads: In one study,[5][6] each participant was given$25 and asked to bet on a coin that would land heads 60% of the time. Participants had 30 minutes to play, so could place about 300 bets, and the prizes were capped at $250. Behavior was far from optimal. "Remarkably, 28% of the participants went bust, and the average payout was just$91. Only 21% of the participants reached the maximum. 18 of the 61 participants bet everything on one toss, while two-thirds gambled on tails at some stage in the experiment."

Thank you for the reference! I must have read that in relation to the Kelly criterion then. I've updated the simulation and attached the distribution of the profits.

So on my quest to beat the biased coin flip, I notice that there are still simulations where I lose money. Is there an approach where I can decide whether or not to bet at all while maintaining the optimality of the Kelly criterion? I suspect not, but no harm in asking :)

2
Notebook previews are currently unavailable.

Hello Nooby,

Balance of betting system with Kelly criterion shouldn't go below zero. I took a look into your code and found out what causes some simulations to lose money. Following line of code looks weird:

return int(balance) - INITIAL_BALANCE

Wouldn't that substract INITIAL_BALANCE from current balance? So I deleted it and now some simulations go to zero, but no negative returns are generated anymore.

0
Mikko, you are correct that I was returning the profit/loss. Anything less than $0 is undesirable, and in your fixed version, anything less than$25 is undesirable since that is the total balance. It was visually easier to see the results with 0 as a pivot. I've attached the updated code.