▲ ▲ ▲ Mathematical proof that you'll loose money in casino [Thoughts]

ideamaker(49)
Published in
#blog
Words
325
Reading
2 min
9y
Listen to this post
~2 min

Heyo, Steemians!
And today I'm gonna show you how casino works from the mathematical point of view.

bellagio-table-games-roulette.tif

Lets go!

Suppose that on every dollar bet you can win your bet multiplied on some_magic_constant with 50% probability:

[bet] -> [bet] x [constant]

Obviously, constant should be > 1 or it is not interesting (you obviously loose in money every time).
Okay, we are "honest" casino and make this multiplier equal to 1.99!
And now you win 1.99 dollar from 1 dollar bet with 50% probability.
Is it tempting for you? ;-) Ready to gamble?
Wait!

I'm gonna prove you that you loose!

Indeed, let's count expected value of your deposit after every game (suppose you have a dollar before)

E[money] = 0.5 * 0 + 0.5 * 1.99 = 0.995 win from every dollar you spent.

So, if you 're a gambling person and repeat you game many times (thats how expected value works), you will always inevitable loose.

Casino is always in profit!

Well, after all that you can say:

"You know, I don't trust to maths, bro".

You choice! Let's check this out in practise!
I write a code especially for you:

#include 
#include 
#include 

int main(void)
{
    int TEST_AMOUNT = 100000;
    double sum = 0;
    double magic = 1.99; //magic constant

    srand(time(NULL));

    for(int i = 0; i < TEST_AMOUNT; ++i)
    {
        double deposit = 1.0;
        double bet     = 0.1;

        while(deposit - bet > 0) //while we can make a bet
        {
          deposit -= bet;
          int dice = rand();

          if(dice % 2){
             deposit += bet * magic; 
             break;    // strategy?
          }
          else
             bet *= 2; // strategy?
        }
        sum += deposit;
    }

    printf("Average: %lf\n", sum/TEST_AMOUNT);
}

It's easy to understand: we have some deposit here and start bet size.
We make many tests, throw a random dice with 50% prob. and try to gamble in clever way.
Every time you loose you raise the bet.
However that doesn't help and average deposit size after game is less than starting deposit.

I offer you a challenge: can you think up a strategy to win a casino here in code?

It's not allowed to change:

  • magic constant
  • win probability
  • number of tests
  • deposit

It's allowed to change:

  • start bet
  • the strategy of changing bet
  • conditions of leaving the game

If you found it - post here in comments.
P.S. if you really-really found it write me secret e-mail :-)

Image source:
https://www.bellagio.com

Thank you for your attention! Follow my blog ideamaker@ideamaker for more.

▲ ▲ ▲ Mathematical proof that you'll loose money in casino [Thought... | Ecency