Bitcoin Forum
April 20, 2024, 04:29:50 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 [70] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ... 243 »
  Print  
Author Topic: Just-Dice.com : now with added CLAMs : Play or Invest  (Read 454534 times)
Zaih
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500


View Profile
August 09, 2013, 05:07:26 AM
 #1381

Love this sort of debate/discussion. Finding myself refreshing too often hoping for another reply Tongue
1713587390
Hero Member
*
Offline Offline

Posts: 1713587390

View Profile Personal Message (Offline)

Ignore
1713587390
Reply with quote  #2

1713587390
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
organofcorti
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1007


Poor impulse control.


View Profile WWW
August 09, 2013, 05:20:44 AM
Last edit: August 09, 2013, 05:44:46 AM by organofcorti
 #1382

Infinity does pose a bit of a problem here Undecided

Infinity isn't a problem, it's awesome! Although if I'd invented it I would have called it something way cooler.

How is the house supposed to break even after an unlucky streak if the streak never ends?

An infinitely long unlucky (for the bettor) streak is infinitely unlikely. Even so, the expected payout to the bettor for the standard Martingale is still just 1, regardless of the length of the Martingale.

Edit: That's not a very good explanation. Below is a better one for a Martingale betting sequence where p = 0.5 (50% chance to win)  and a (the starting bet) = 1, and n is the number of losses in a row. It's the usual way of calculating an expected value of a random variable.

Code:
E(profit per sequence) = sum(n | 0 to Inf)  Pr(n == 0)*1 + Pr(n == 1)*1+  + Pr(n == 2)*1+ ...

                               = 1 * sum(n | 0 to Inf)  Pr(n == 0) + Pr(n == 1)+  + Pr(n == 2)+ ...
                               = 1 * 1
                               = 1


Bitcoin network and pool analysis 12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r
follow @oocBlog for new post notifications
organofcorti
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1007


Poor impulse control.


View Profile WWW
August 09, 2013, 05:21:13 AM
 #1383

Love this sort of debate/discussion. Finding myself refreshing too often hoping for another reply Tongue

I also.


Bitcoin network and pool analysis 12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r
follow @oocBlog for new post notifications
nimda
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


0xFB0D8D1534241423


View Profile
August 09, 2013, 05:34:17 AM
 #1384

Infinity does pose a bit of a problem here Undecided

Infinity isn't a problem, it's awesome! Although if I'd invented it I would have called it something way cooler.
Like

infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
ity

? Grin
Financisto
Hero Member
*****
Offline Offline

Activity: 630
Merit: 767

BTC⇆⚡⇄BTC


View Profile WWW
August 09, 2013, 05:37:37 AM
 #1385


Infinity isn't a problem, it's awesome! Although if I'd invented it I would have called it something way cooler.


Infinity is cool as it is!  Cool

By the way, I wonder which "discovery" is the greatest of all time in maths: mankind's awareness of the 0 (zero), so as the vacuum and the idea of complete absence as well, or the notion of infinity...  Roll Eyes

BitcoinTalk's ESCROW Providers: Ranking & BlacklistCompilation of (open-source) BRAINWALLET projectsBTC ⇆⚡⇄ BTCBTC aka BTC: 16MBvhaJoRBxW3Vk6apnvz3UYT9HAgraVS ⚡ PGP: 2680207AA9A1B69FE7A033D80DE0F221074384C4 ⚡ If you think freedom matters, please support the development of these privacy projects→DONATE some sats: TailsQubes OSWhonixVeraCryptPicocryptKryptorSimpleX Chat
organofcorti
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1007


Poor impulse control.


View Profile WWW
August 09, 2013, 05:46:54 AM
 #1386

Infinity does pose a bit of a problem here Undecided

Infinity isn't a problem, it's awesome! Although if I'd invented it I would have called it something way cooler.
Like

infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
ity

? Grin

Damn you! That's way better than my name for infinity, which would have probably been "Gordon". Or maybe "Geoff", if I was feeling adventurous. You win, Nim  Cry

Bitcoin network and pool analysis 12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r
follow @oocBlog for new post notifications
organofcorti
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1007


Poor impulse control.


View Profile WWW
August 09, 2013, 05:49:46 AM
 #1387


Infinity isn't a problem, it's awesome! Although if I'd invented it I would have called it something way cooler.


Infinity is cool as it is!  Cool

By the way, I wonder which "discovery" is the greatest of all time in maths: mankind's awareness of the 0 (zero), so as the vacuum and the idea of complete absence as well, or the notion of infinity...  Roll Eyes

0 = Zero
Infinity = Hero

Bitcoin network and pool analysis 12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r
follow @oocBlog for new post notifications
Financisto
Hero Member
*****
Offline Offline

Activity: 630
Merit: 767

BTC⇆⚡⇄BTC


View Profile WWW
August 09, 2013, 05:56:44 AM
 #1388

Like

infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
infinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfinfin
ity

? Grin

You've just created some kind of strange fractal out there...  Grin

BitcoinTalk's ESCROW Providers: Ranking & BlacklistCompilation of (open-source) BRAINWALLET projectsBTC ⇆⚡⇄ BTCBTC aka BTC: 16MBvhaJoRBxW3Vk6apnvz3UYT9HAgraVS ⚡ PGP: 2680207AA9A1B69FE7A033D80DE0F221074384C4 ⚡ If you think freedom matters, please support the development of these privacy projects→DONATE some sats: TailsQubes OSWhonixVeraCryptPicocryptKryptorSimpleX Chat
DomenicoRomano
Newbie
*
Offline Offline

Activity: 33
Merit: 0



View Profile
August 09, 2013, 03:29:51 PM
 #1389

Does the martingale sequence give you a better chance of winning than a single bet?

I just ran a Monte Carlo simulation.

starting bank = 1000
firstBet = 1
probability of win, each single bet = 0.5
house edge = 0.01
Amount to win = 1.01 * starting bank

Martingale rules:
  Bet firstBet
  If win bet firstBet
  If lose bet enough to win back previous losses.
  If balance = 0 then stop
  If balance = Amount to win then stop
  bet again

This sequence will continue until you have turned 1000 bitcoins into either > 1010 bitcoin or 0 bitcoins.

I ran this 1 million times and got the following results:

Number of wins (>1010 bitcoins) = 988311
Number of loses (0 bitcoins) = 11689
Probability of a win = 0.988311
Mean return of all sequences = 998.627
The mean of all the wins = 1010.43799

If you bet 1000 bitcoins in a single bet at probability of 0.979773138 you would also win 1010.43799, if you win.

So: With the martingale you have a 0.988311000 chance of winning.
     With the single bet you have a 0.979773138 chance of winning.

Martingale wins by a p = 0.008537862.

Important to note: the mean of all the sequence is less than the amount wagered.  If you do this over and over again you will be lose.
superresistant
Legendary
*
Offline Offline

Activity: 2128
Merit: 1120



View Profile
August 09, 2013, 03:34:07 PM
 #1390

Does the martingale sequence give you a better chance of winning than a single bet?

I just ran a Monte Carlo simulation.

starting bank = 1000
firstBet = 1
probability of win, each single bet = 0.5
house edge = 0.01
Amount to win = 1.01 * starting bank

Martingale rules:
  Bet firstBet
  If win bet firstBet
  If lose bet enough to win back previous losses.
  If balance = 0 then stop
  If balance = Amount to win then stop
  bet again

This sequence will continue until you have turned 1000 bitcoins into either > 1010 bitcoin or 0 bitcoins.

I ran this 1 million times and got the following results:

Number of wins (>1010 bitcoins) = 988311
Number of loses (0 bitcoins) = 11689
Probability of a win = 0.988311
Mean return of all sequences = 998.627
The mean of all the wins = 1010.43799

If you bet 1000 bitcoins in a single bet at probability of 0.979773138 you would also win 1010.43799, if you win.

So: With the martingale you have a 0.988311000 chance of winning.
     With the single bet you have a 0.979773138 chance of winning.

Martingale wins by a p = 0.008537862.

Important to note: the mean of all the sequence is less than the amount wagered.  If you do this over and over again you will be lose.

Now everyone let's play !
HollowIP
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250


View Profile
August 09, 2013, 04:34:01 PM
 #1391


Infinity isn't a problem, it's awesome! Although if I'd invented it I would have called it something way cooler.


Infinity is cool as it is!  Cool

By the way, I wonder which "discovery" is the greatest of all time in maths: mankind's awareness of the 0 (zero), so as the vacuum and the idea of complete absence as well, or the notion of infinity...  Roll Eyes

I would strongly argue that 0 is the greatest mathematical (and philosophical) discovery.
I mean 0 even creates the circle shape, and no one can argue how badass a circle is.

Or perhaps this: e^{i \pi} + 1 = 0   <such a beautiful equation.

Or, Or, perhaps 'barel'y related to numbers at all, but Godel's Incompleteness Theorem?

I may be somewhat bad with numbers, but the philosophy behind math is widely fascinating to me.

BTC-  3FofPhtcESndpyLTJTJEnpShdHgbN82pAz
HollowIP
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250


View Profile
August 09, 2013, 04:42:34 PM
 #1392

Does the martingale sequence give you a better chance of winning than a single bet?

I just ran a Monte Carlo simulation.

starting bank = 1000
firstBet = 1
probability of win, each single bet = 0.5
house edge = 0.01
Amount to win = 1.01 * starting bank

Martingale rules:
  Bet firstBet
  If win bet firstBet
  If lose bet enough to win back previous losses.
  If balance = 0 then stop
  If balance = Amount to win then stop
  bet again

This sequence will continue until you have turned 1000 bitcoins into either > 1010 bitcoin or 0 bitcoins.

I ran this 1 million times and got the following results:

Number of wins (>1010 bitcoins) = 988311
Number of loses (0 bitcoins) = 11689
Probability of a win = 0.988311
Mean return of all sequences = 998.627
The mean of all the wins = 1010.43799

If you bet 1000 bitcoins in a single bet at probability of 0.979773138 you would also win 1010.43799, if you win.

So: With the martingale you have a 0.988311000 chance of winning.
     With the single bet you have a 0.979773138 chance of winning.

Martingale wins by a p = 0.008537862.

Important to note: the mean of all the sequence is less than the amount wagered.  If you do this over and over again you will be lose.

So the martingale has a better probability for turning 1000 into 1010, but how does the math change if you were to try to go from 1000 to 2000? I wonder if the martingale would still have a higher chance of winning than a single bet?

BTC-  3FofPhtcESndpyLTJTJEnpShdHgbN82pAz
dooglus (OP)
Legendary
*
Offline Offline

Activity: 2940
Merit: 1330



View Profile
August 09, 2013, 08:15:47 PM
 #1393

So the martingale has a better probability for turning 1000 into 1010, but how does the math change if you were to try to go from 1000 to 2000? I wonder if the martingale would still have a higher chance of winning than a single bet?

Yes.  No matter what you're trying to do, two bets are better than one.  I posted previously about how to turn 1 BTC into 2 BTC, and have modified the quote here, multiplying everything by 1000:

If you want to double your money, you have a higher chance if you place multiple bets than if you place a single bet.  You have to pick the right multiple bets of course.

It's really quite easy to demonstrate:

If you place a single bet, then the chance of doubling your money is 49.5%.

Now consider this 2 bet sequence:

1. bet 414.21356 BTC with payout 3.41421356x and chance 28.99642866% to win 1414.21356 BTC for a profit of 1000 BTC
2. if you lose, bet 585.78644 BTC at the same payout and chance to win 2000 BTC for a net profit of 1000 BTC.

Your overall chance of success is 49.58492857%.  That is higher than 49.5%.

(Note that those bets aren't exactly available on Just-Dice, since chance is only available to 4 significant figures, but that's just a nit-pick.  It's still possible to double your money with a higher than 49.5% chance using 2 bets, and not using 1 bet).

In both cases you're going to run into the 'max profit' limit on Just-Dice, but we can ignore that for the purposes of this discussion.

If you're wondering where I got the numbers from, here's the calculation.  "have" is how much we start with, and "gain" is how much we want to win.  We calculate "stake", which is how much to bet on the first bet (we bet the rest on the 2nd bet if the 1st bet loses) and "payout" which is the payout multiplier for both bets:

Code:
>>> have = 1000
>>> gain = 1000
>>> stake = math.sqrt(gain*(gain+have)) - gain
>>> payout = (gain + stake) / stake
>>> stake
414.2135623730951
>>> payout
3.414213562373095

Just-Dice                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   Play or Invest                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   1% House Edge
HollowIP
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250


View Profile
August 09, 2013, 08:20:39 PM
 #1394

So the martingale has a better probability for turning 1000 into 1010, but how does the math change if you were to try to go from 1000 to 2000? I wonder if the martingale would still have a higher chance of winning than a single bet?

Yes.  No matter what you're trying to do, two bets are better than one.  I posted previously about how to turn 1 BTC into 2 BTC, and have modified the quote here, multiplying everything by 1000:

If you want to double your money, you have a higher chance if you place multiple bets than if you place a single bet.  You have to pick the right multiple bets of course.

It's really quite easy to demonstrate:

If you place a single bet, then the chance of doubling your money is 49.5%.

Now consider this 2 bet sequence:

1. bet 414.21356 BTC with payout 3.41421356x and chance 28.99642866% to win 1414.21356 BTC for a profit of 1000 BTC
2. if you lose, bet 585.78644 BTC at the same payout and chance to win 2000 BTC for a net profit of 1000 BTC.

Your overall chance of success is 49.58492857%.  That is higher than 49.5%.

(Note that those bets aren't exactly available on Just-Dice, since chance is only available to 4 significant figures, but that's just a nit-pick.  It's still possible to double your money with a higher than 49.5% chance using 2 bets, and not using 1 bet).

In both cases you're going to run into the 'max profit' limit on Just-Dice, but we can ignore that for the purposes of this discussion.

Ah, I see and understand more clearly now. Thanks for putting it that way, and I apologize for missing it previously.

Now speaking just about martingales, eliminating the all-in, 1 bet approach. Is it more profitable to have a shorter martingale such as the 2 bet sequence, or say have a 10 bet sequence? Logic is telling me that perhaps the 2 bet sequence is better than the 10 bet sequence, but I could just be misled. For all I know, they have the same probability factor.

BTC-  3FofPhtcESndpyLTJTJEnpShdHgbN82pAz
dooglus (OP)
Legendary
*
Offline Offline

Activity: 2940
Merit: 1330



View Profile
August 09, 2013, 08:26:11 PM
 #1395

Ah, I see and understand more clearly now. Thanks for putting it that way, and I apologize for missing it previously.

I only just noticed I messed up the quoting in my first post so it was hard to see that I had written anything.  It's fixed now.  I also edited the post you just replied to after you replied, giving the calculation I used to determine the stake and payout multiplier.

Now speaking just about martingales, eliminating the all-in, 1 bet approach. Is it more profitable to have a shorter martingale such as the 2 bet sequence, or say have a 10 bet sequence? Logic is telling me that perhaps the 2 bet sequence is better than the 10 bet sequence, but I could just be misled. For all I know, they have the same probability factor.

The more steps you break the bet down into, the less you are expected to risk, and so the greater your chance of winning.

I believe that in the limit as number of steps approaches infinity, the amount risked approaches zero, your expected losses approach zero, and so your chance of winning approaches your chance of winning with a single bet on a zero house edge game.

But let's keep that quiet, eh?  Wink

Just-Dice                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   Play or Invest                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   1% House Edge
infested999
Hero Member
*****
Offline Offline

Activity: 854
Merit: 500



View Profile
August 09, 2013, 09:34:33 PM
 #1396

I like how up until page 73, $81M was spent playing this dice yet, yet nobody could fully calculate the probabilities of a martingale  Tongue

              ▄███▄   ▄███▄
              █████   █████
      ▄███▄    ▀▀▀     ▀▀▀    ▄███▄
      █████     ▄██▄ ▄██▄     █████
       ▀▀▀ ▄██▄ ▀██▀ ▀██▀ ▄██▄ ▀▀▀
 ▄███▄     ▀██▀           ▀██▀     ▄███▄
 █████ ▄██▄                   ▄██▄ █████
  ▀▀▀  ▀██▀                   ▀██▀  ▀▀▀
                       ▄█
▄███▄ ▄██▄            ███ ███  ▄██▄ ▄███▄
█████ ▀██▀  ████      █████    ▀██▀ █████
 ▀▀▀         ▀███▄    ████           ▀▀▀
       ▄██▄    ████   ███     ▄██▄
 ▄███▄ ▀██▀     ▀███  ███     ▀██▀ ▄███▄
 █████            ███▄██           █████
  ▀▀▀              ▀████            ▀▀▀
                     ███
                     ███
                     ██
                   ███

████    ██
  ████    ██
    ████    ██
      ████    ██
        ████    ██
          ████    ██
          ████    ██
        ████    ██
      ████    ██
    ████    ██
  ████    ██
████    ██










White Paper
Yellow Paper
Pitch Deck
Telegram
LinkedIn
Twitter
ghibly79
Legendary
*
Offline Offline

Activity: 1218
Merit: 1006


Crypto entrepreneur and consultant


View Profile
August 10, 2013, 11:04:08 AM
 #1397

Yes but to approach zero risk (even remotely) you'll have to start betting so low that your gain over a reasonable period of time will be unsignificant. Also you'll need so many rolls that you'll still have a decent chance to lose it all.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
August 10, 2013, 12:42:32 PM
 #1398

Yes.  No matter what you're trying to do, two bets are better than one.
So, does it follow that three bets are better than two? Four bets are better than three? Five bets are better than four? Six bets are better than five? Seven bets are lucky? (Okay, what I meant was seven bets are better than six.)

The more steps you break the bet down into, the less you are expected to risk, and so the greater your chance of winning.

I believe that in the limit as number of steps approaches infinity, the amount risked approaches zero, your expected losses approach zero, and so your chance of winning approaches your chance of winning with a single bet on a zero house edge game.

But let's keep that quiet, eh?  Wink
Okay, I will keep quiet.

Yes but to approach zero risk (even remotely) you'll have to start betting so low that your gain over a reasonable period of time will be unsignificant. Also you'll need so many rolls that you'll still have a decent chance to lose it all.
That's why you want to start with a larger bank roll. Or pool lots of money (from other people) together.

Who wants to bet that I will win the 7th?

narayan
Member
**
Offline Offline

Activity: 98
Merit: 10


I do not sell Bitcoins. I sell SHA256(SHA256()).


View Profile
August 10, 2013, 12:43:36 PM
 #1399

I am sure this thread will be a better place when Dabs is banned from posting in it.

Nobody cares about your solicitation of "group bets".

BTC: 1PiPooLvcEoBLuXBHbwUnN5rShs2nas223
LTC: LRq7YPMDoERSZcte9ZPNHQkUbfiPsY55VM
DomenicoRomano
Newbie
*
Offline Offline

Activity: 33
Merit: 0



View Profile
August 10, 2013, 11:24:25 PM
Last edit: August 11, 2013, 10:10:29 AM by DomenicoRomano
 #1400

I ran my simulation with a gain of 2.0.  In that case the single bet beats a martingale by a significant margin.  Here are the results of two simulations at gain = 2.0 and gain = 1.01.

So if you want to double your money a single bet is better than a martingale sequence.  If you want to increase you money by 1% than a martingale is better than a single bet by a very small margin.

100,000 runs
Martingale with p = 0.5, 1000 bitcoin bank, 1 bitcoin starting bet. Stop if gain 2.0 or 0.
Probability to win = 0.448680
Average number of bets to win = 2800
Average win = 2001.073167
Probability of 1000 bitcoin bet winning the same with single bet = 0.494735
Single bet wins by Dp = 0.046055


100,000 runs
Martingale with p = 0.5, 1000 bitcoin bank 1 bitcoin starting bet. Stop if gain 1.01 or 0.
Probability to win = 0.987280
Average number of bets to win = 42
Average win = 1010.936452
Probability of 1000 bitcoin bet winning the with single bet = 0.979290
Martingale wins by Dp = 0.00799

I believe the difference is in the number of bets needed to reach your goal.  The average number of bets needed to double you money in this simulation was 2800.  The average number needed to increase your money by 1% was 42.

The main principle is the more you bet the more you lose.

Here is the code if you want to try this yourself or check my results.

Code: ("Matlab Martingale simulator")
function [profit n] = martin3(edge, p, bank, bankRisk, gain)
% edge     - house advantage for each bet
% p        - probabilty of winning each bet
% bank     - number of bitcoins to start with
% bankRisk - amount of current balance to risk with each
%            starting bet of a series
% gain     - Amount of money times bank which will stop the game.

  winReturn = (1 - edge)/p;
  winProfit = p / (1 - edge - p);

  singleWinGain = bankRisk*bank;
  firstBet = singleWinGain / (1 - edge);
 
  currentBet = firstBet;
  bets = [];
  lose = [];
  i = 1;
  while ((bank(i) > 0) && (bank(i) < bank(1) * gain))
    currentBet = min(currentBet, bank(i));
    bets = [bets currentBet];
    bank = [bank, bank(i) - currentBet];
  
    if (rand(1, 1) < p)
      bank(i+1) = bank(i+1) + winReturn * currentBet;
      lose = [];
      currentBet = bankRisk*bank(i+1) / (1 - edge); % If bank grows amount to bet grows
%      currentBet = firstBet; % Bet same amount independant of balance
    else
      lose = [lose currentBet];
      currentBet = winProfit * sum(lose); % win back only what was lost
%      currentBet = winProfit * sum(lose)+singleWinGain; % win back what was lost and win a bit.
    end
    i = i + 1;
  end
  n = i;
  profit = bank(n);
%  plot(bank,'x-');

Code: ("Matlab script to run simulator")
N = 1000;
e = 0.01;
p = 0.5;
bank = 1000;
bankRisk = 0.001;
gain = 1.1;

profit = [];
number = [];
for i=1:N
  [pr n] = martin3(e, p, bank, bankRisk, gain);
  profit = [profit pr];
  number = [number n];
end;

figure('Position', [0 0 1600 900])
subplot(311);
plot(number,'x');
subplot(312);
hist(number,sqrt(length(number)));
subplot(313);
plot(profit, 'x');

fprintf('mean = %f\n', mean(number));
fprintf('std = %f\n', std(number));
fprintf('min = %f\n', min(number));
fprintf('max = %f\n\n', max(number));
fprintf('mean = %f\n', mean(profit));
fprintf('std = %f\n', std(profit));
fprintf('min = %f\n', min(profit));
fprintf('max = %f\n\n', max(profit));

NWin = sum(profit > 0);
NLose = sum(profit == 0);
ProbWin = NWin / (NWin + NLose);
fprintf('ProbWin = %f\n\n', ProbWin);

meanWin = mean(profit(find(profit ~= 0)));
fprintf('mean win = %f\n\n', meanWin);

singleBetProb = (1 - e)*bank/meanWin;
fprintf('singleProbWin = %f\n\n', singleBetProb);
Pages: « 1 ... 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 [70] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ... 243 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!