C# – Casino Black and Red Simulation – is it Worthy?

Going to a casino is probably quite an easy way to lose money. In the long term. Let’s say that you are following the strategy – always double when you lose and you bet on numbers above 18 on the roulette. If you guess correctly, your bet is doubled. If you missed, you are doubling your bet to cover your losses.

I have decided to simulate the chances of a person, going on a casino with 10,000 money (as in the games, we do not call them dollars or euro, but money) and betting 1 million times uf he has money left. The question is – can this poor fellow win after all? He is doubling all the time and thus “covering” his losses. The answer is pretty sad – out of 10000 times going to a casino, the fellow dude won 68 times. This is definitely not a lot and not impressive.

Was he not lucky? Nope, it is pure statistics. If we change the rules of the game a bit, and we consider that the person is betting on numbers above 18 on the roulette, but whenever a 0 comes out he wins as well, then this is the result of one simulation:

The “poor” fellow won only in 11% of the cases, although he was in a better position than the casino… Unbelievable! Any ideas why? Probably the answer is in the “greed”, which is replicated by the number of spins that we do with the roulette – 1 million. If we reduce these to 1000, then the results are quite different – our guy destroys the casino:

And this is quite expected, because the odds are in his favour and he is not too greedy – he spins only 1000 times.

This is the code, I have used for the simulations:

These are the two conditions, that I was changing in the article:

The first is how many times the person bets, if he still has money in his pocket and the second is when the person wins – in this case he wins only if the random number is from 19 to 36, he loses on 0 to 18.

Cheers & Enjoy!

About

VBA Developer

Tagged with: , , ,