DJGenius
DJGenius
  • Threads: 8
  • Posts: 45
Joined: Mar 5, 2010
May 12th, 2019 at 11:46:27 AM permalink
It has been some time since I posted here, but I am curious if anyone can help me figure this out.

I often use positive progression betting, mostly with roulette. Of course, I know that these betting systems cannot eliminate the house edge, however they increase my fun at the table, and I occasionally enjoy a big win on a long streak of successive wins (which is more fun than flat betting!).

The betting progression is not important, I am interested in how to calculate the probability of X number of wins in a row (or more), given a total number of trials (Y).

For example: How likely is it to get 8, 10, 12, etc. reds (or blacks, or whatever) in a row at some point in a sample size of 50 spins, 100 spins, 1000 spins, etc.

Let's assume 50/50 odds for simplicity's sake, I can always substitute in 18/37 or whatever if I know the formula.

The probability of getting 8 reds in a row is .5 to the power of 8. So somewhere around .39% But that's just the probability of getting that result right now on the next 8 spins. With a 100 or 1000 spin sample size it would surely be higher, but I'm at a loss for how exactly to calculate it.

My layperson mathematical skills are just not up to the task... unless I'm missing something obvious.

Any help is greatly appreciated!
"The Quest stands upon the edge of a knife. Stray but a little, and it will fail, to the ruin of all." - Elf Queen Galadriel, teaching Frodo about the importance of blackjack basic strategy.
pwcrabb
pwcrabb
  • Threads: 4
  • Posts: 185
Joined: May 15, 2010
Thanked by
DJGenius
May 12th, 2019 at 12:24:25 PM permalink
The math is complicated. Here is the bottom line. For a binary game in which the alternative outcomes have equal probability, clusters of like outcomes occur over infinity as follows:

Cluster size: ( N )

Proportion of infinite outcomes: { ( N ) / [ ( 2 ) ** ( N + 1 ) ] }

Example: Clusters of size 3 represent 0.1875 of all outcomes. "Winning" clusters are half of that proportion.

Example: Clusters of size 4 represent 0.1250 of all outcomes. "Winning" clusters are half of that proportion.

For limited samples of sizes 50, 1000, etc., one may use Pascal's Triangle at the appropriate level, together with some combinatoric analysis, to discover your answers. As sample sizes increase, answers approach the limits applicable for infinite size.
"I suppose I was mad. Every great genius is mad upon the subject in which he is greatest. The unsuccessful madman is disgraced and called a lunatic." Fitz-James O'Brien, The Diamond Lens (1858)
Mission146
Mission146
  • Threads: 142
  • Posts: 16832
Joined: May 15, 2012
Thanked by
DJGenius
May 12th, 2019 at 12:33:28 PM permalink
Let's do it the right way with 18/37.

Okay, if you're looking for a streak of eight reds (for example) then, as you mentioned, you would just do:

(18/37)^8 = 0.00313737367

You already have most of the problem solved right there, believe it or not. If your goal is just to know how likely it is to go fifty spins of the wheel (or however many) without this happening at least once, then all you need do is determine your number of initial spins:

(50-7) = 43

(It's 43 because, if the 43rd spin is a loss, you cannot win eight spins in a row without exceeding fifty spins)

Now, we just take the probability of NOT having such a streak in one initial spin, and take that to the 43rd power:

(1-.00313737367)^43 = 0.87361182474

Therefore, 87.361182474% of the time you will not see such a streak in 43 initial spins and 12.638817525% of the time you will see one (or more) such streaks. If you wanted to go fifty initial spins:

(1-.00313737367)^50 = 0.85460553656

Therefore, 85.460553656% of the time you will go fifty initial spins without any initial spin resulting in eight in a row winners. The remaining percentage may have one or more such streaks.

Anyway, you can substitute whatever numbers you want to calculate the probability of any such streak RIGHT NOW and the probability of going x initial spins without ever hitting such a streak.

If you wanted to know the probabilities for different numbers of the streak hitting within a certain amount of tries, then you could just use a binomial distribution calculator like this one:

http://www.vassarstats.net/binomialX.html

Okay, so we have fifty initial attempts to hit a streak of eight in a row. The probability of doing it on the first initial spin is: 0.00313737367, therefore:

N = 50
K = 0
P = .00313737367

Probability of 0 streaks: 0.85460553656 (Matches what I did above)

N = 50
K = 1
P = .00313737367

Probability of 1 and 1 or more, respectively: 0.134482768129, 0.145394463433

N = 50
K = 2
P = .00313737367

Probability of 2 and 2 or more, respectively: 0.010369639481, 0.010911695304

PRO TIP: You might think you could put the numbers in and hit, "Enter," but that just refreshes the page, for some reason. Make sure you hit the, "Calculate," button or you will lose what you put in.

Figuring the streaks this way works for anything that is a binary, hence, binomial distribution. As long as you have your probability of the streak occurring on a single attempt correct, the calculator will do the rest. Have fun!
https://wizardofvegas.com/forum/off-topic/gripes/11182-pet-peeves/120/#post815219
DJGenius
DJGenius
  • Threads: 8
  • Posts: 45
Joined: Mar 5, 2010
May 12th, 2019 at 8:42:03 PM permalink
Wow, I definitely came to the right place.

Thank you both so much for your help and all your fancy maths.

I had already figured out a few of the smaller ones “by hand” writing out every single permutation of wins and losses and counting up the number of streaks I was looking for. I was using Pascal’s triangle, though I didn’t know the name.

This will be much easier and quicker.

I will take a decent look at the approaches you have suggested and see what I can do with them.

Thanks again!
"The Quest stands upon the edge of a knife. Stray but a little, and it will fail, to the ruin of all." - Elf Queen Galadriel, teaching Frodo about the importance of blackjack basic strategy.
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
Thanked by
DJGenius
May 12th, 2019 at 8:55:01 PM permalink
Quote: Mission146

Let's do it the right way with 18/37.

Therefore, 87.361182474% of the time you will not see such a streak in 43 initial spins and
12.638817525% of the time you will see one (or more) such streaks. If you wanted to go fifty initial spins:

this method is one way not to follow unless one wants a wrong answer.

this streak stuff has already been calculated by many... correctly
and there are even threads here at WoV that go into detail how.

But many have just made streak calculators online for this. Just plug in a few numbers and go!
some have errors in them but not all do.

there are a few streak calculators here, https://sites.google.com/view/krapstuff/home

the bottom page has a javascript type that is very accurate.
the top part uses a Markov chain solution

OP should start there and try it out (as well as the author of this post to check his work)
winsome johnny (not Win some johnny)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
Thanked by
DJGenius
May 12th, 2019 at 9:05:02 PM permalink
Quote: DJGenius

For example: How likely is it to get 8, 10, 12, etc. reds (or blacks, or whatever) in a row at some point in a sample size of 50 spins, 100 spins, 1000 spins, etc.

using pari/gp online calculator
here is some code for probability of a run (at least X length)
I did run=8 (at least 8)
trials=50
prob =18/37
run=8;
trials=50;
p=18/37;
\\for exact result: use q=1-p;, for decimal: q=1.-p;
q=1.-p;
\\do not change below
states=run+1;
A=matrix(states,states);
A[states,states]=1;\\absorbing state
for(i=1,run,A[i,(i+1)]=p); \\diagonal starts at A[1,2]
for(i=1,run,A[i,1]=q); \\column starts at A[1,1]
result=A^trials;
pSuccess=result[1,states];
print(pSuccess)

returns this
? run=8;
trials=50;
p=18/37;
\\for exact result: use q=1-p;, for decimal: q=1.-p;
q=1.-p;
\\do not change below
states=run+1;
A=matrix(states,states);
A[states,states]=1;\\absorbing state
for(i=1,run,A[i,(i+1)]=p); \\diagonal starts at A[1,2]
for(i=1,run,A[i,1]=q); \\column starts at A[1,1]
result=A^trials;
pSuccess=result[1,states];
print(pSuccess)

0.06918839818266958917577060548

the exact answer in form of a/b =
2565138737019779987912536256685432326167197001332611088678610953523968/37074694665532807170105663883978228276095096806613832327136970789759157

for those that want it that way!

accurate calculators rule!
I did the code myself (was easy as many have done it before me) and tested it to have 0 errors.
good luck
winsome johnny (not Win some johnny)
Mission146
Mission146
  • Threads: 142
  • Posts: 16832
Joined: May 15, 2012
May 13th, 2019 at 5:41:25 AM permalink
7Craps,

Please correct me if I'm wrong, but I think all we did was answer two different questions. My assumption was the OP was perhaps talking about having a bankroll of fifty units, so there, you would have fifty initial spins which is what I was attempting to solve for. I think what you did (correctly, of course) was come up with the probability of the event within a framework of fifty spins total.

In essence, a streak of W-W-L would be three of your fifty spins, but it would only be one initial spin in what I was solving for because (in a reverse martingale system) the OP would only have lost one unit overall in the end.

Anyway, that was the question that I thought I was answering. If the math is still wrong even with that, please let me know.
https://wizardofvegas.com/forum/off-topic/gripes/11182-pet-peeves/120/#post815219
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
May 13th, 2019 at 8:22:36 AM permalink
Quote: Mission146

7Craps, Please correct me if I'm wrong, but I think all we did was answer two different questions.

to me you tried to answer the OP question as I did
(you have done this before in the past and I know how sensitive you can be)

you:
"Okay, if you're looking for a streak of eight reds (for example) then, as you mentioned, you would just do:
(18/37)^8 = 0.00313737367

You already have most of the problem solved right there, believe it or not. If your goal is just to know how likely it is to go fifty spins of the wheel (or however many) without this happening at least once, then all you need do is determine your number of initial spins:

(50-7) = 43 "

to me it looks like you are trying to get the average number of streaks.
there is an easier way for that, but the OP did not ask that question.

averages can be used to calculate a probability
but it takes way more math than you and I can do (I think integrating using calculus is one way?)

just hope the OP can find what he wants from our posts
winsome johnny (not Win some johnny)
DJGenius
DJGenius
  • Threads: 8
  • Posts: 45
Joined: Mar 5, 2010
Thanked by
Mission146
May 13th, 2019 at 8:36:32 AM permalink
Thank you as well 7craps for some more fancy maths and computer code.

Mission146, thanks also for following up. The question 7craps has answered was more what I was interested in, but I still appreciate your post.

Bankroll and betting progression are something I tinker with quite a lot, and will continue to play with in a more informed way, based on this new information.

Besides getting the answer I was looking for, I have also learned a couple things, which can only be good.

Before posting I was typing into google things like “probability of a number of events in a row in a given sample size” and coming up pretty dry. Had I searched for a streak calculator I might have been more successful!

The JavaScript calculator found at the above link matched all the percentages I had figured out for a small number of trials perfectly.

So that means firstly, my own math was right, and secondly, I can use the calculator to figure out the odds for the longer trial counts that I could never do myself.

Thanks again for the help guys!
"The Quest stands upon the edge of a knife. Stray but a little, and it will fail, to the ruin of all." - Elf Queen Galadriel, teaching Frodo about the importance of blackjack basic strategy.
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
May 13th, 2019 at 9:05:44 AM permalink
Quote: DJGenius

Before posting I was typing into google things like “probability of a number of events in a row in a given sample size” and coming up pretty dry. Had I searched for a streak calculator I might have been more successful!

LOL
a better search might be
"probability of a streak in a given sample size"

"streak calculator" returns (in Google) a few site calculators that are known to have errors
most would never know

FYI,
Number of Trials: 50
Run Length (X or more): 8
Trial Probability: 18/37
at least 1 run of length 8 or more: 0.0691883981827
expected (average) # of runs: 0.070802892
probability and average number look almost the same, but are two different animals.
winsome johnny (not Win some johnny)
Mission146
Mission146
  • Threads: 142
  • Posts: 16832
Joined: May 15, 2012
May 13th, 2019 at 9:36:09 AM permalink
Quote: 7craps

to me you tried to answer the OP question as I did
(you have done this before in the past and I know how sensitive you can be)

to me it looks like you are trying to get the average number of streaks.
there is an easier way for that, but the OP did not ask that question.

averages can be used to calculate a probability
but it takes way more math than you and I can do (I think integrating using calculus is one way?)

just hope the OP can find what he wants from our posts



(Quote Clipped)

I'm not being sensitive, in my post I referred several times to, "Initial spins." In other words, as soon as a loss happens it begins a new streak. The reason I believed that is what the OP wanted (it wasn't) is because he made reference to a betting system that I assumed was likely the Reverse Martingale.

Again, he was asking a different question which you answered extremely well, and that's perfectly fine with me. I don't know what the purpose of what I perceived as a condescending tone in your earlier post was all about, but any sensitivity that you're perceiving on my part is more likely as a response to the condescension rather than the mere possibility of being wrong. I'm wrong quite a bit of the time, and someone who knows better than I do often comes along and corrects my mistake, so I really have no issues with that happening.

Also, if it makes you happy, I probably wouldn't have known where to begin on the question that you did answer. Now I do know where to begin, so thank you for that.
https://wizardofvegas.com/forum/off-topic/gripes/11182-pet-peeves/120/#post815219
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
May 13th, 2019 at 5:14:30 PM permalink
Quote: DJGenius

Let's assume 50/50 odds for simplicity's sake, I can always substitute in 18/37 or whatever if I know the formula.

The probability of getting 8 reds in a row is .5 to the power of 8. So somewhere around .39% But that's just the probability of getting that result right now on the next 8 spins. With a 100 or 1000 spin sample size it would surely be higher, but I'm at a loss for how exactly to calculate it.

just an update and a FYI.
at least 8 in a row
p=18/37
spins 50: 0.0691883981827
spins 100: 0.1421953754224
spins 1000: 0.8028180750264
all the above streak probabilities are only good before the 1st spin!

say you go 100 spins and NO streak of 8 hits.
you are thinking"spins 1000: 0.8028180750264"
this is not a correct thought at this point in time, unless you are thinking of the next 1000 spins.

there are 900 spins left out of the initial 1000 spins
spins 900: 0.7678258249610
the probability has now lowered (as expected)

say you go 569 spins and NO streak of 8 hits.
you are thinking"spins 1000: 0.8028180750264"

actually there are now 431 spins remaining
spins 431: 0.5004782010791

it started out as about an 80% success rate
now it is down to a coin flip that it will not happen

enjoy
winsome johnny (not Win some johnny)
DJGenius
DJGenius
  • Threads: 8
  • Posts: 45
Joined: Mar 5, 2010
May 13th, 2019 at 7:53:43 PM permalink
Thanks yet again,

That is a good reminder not to use the stats to start thinking the wheel will need to “catch up” with some streaks if there have not been any streaks for a while, etc. etc. That would be a gamblers fallacy, now wouldn’t it?

I’m looking at it more from a general risk assessment perspective.

For example: This is how much it’s going to cost me to play 1000 spins with no winning streak, and these are the odds of that happening (at the outset, as you said).

Not that any of this will ever change the house edge, but at least I know:

1. What the odds are of hitting my desired streak in a given session,
2. What I will win if I hit it,
3. What I will lose if I don’t hit it.

So I know roughly what I am getting myself into, and can plan my sessions accordingly.

Makes sense, no?
"The Quest stands upon the edge of a knife. Stray but a little, and it will fail, to the ruin of all." - Elf Queen Galadriel, teaching Frodo about the importance of blackjack basic strategy.
Arnie
Arnie
  • Threads: 6
  • Posts: 40
Joined: May 14, 2012
July 10th, 2019 at 2:26:50 PM permalink
Quote: 7craps

Quote: DJGenius

Let's assume 50/50 odds for simplicity's sake, I can always substitute in 18/37 or whatever if I know the formula.

The probability of getting 8 reds in a row is .5 to the power of 8. So somewhere around .39% But that's just the probability of getting that result right now on the next 8 spins. With a 100 or 1000 spin sample size it would surely be higher, but I'm at a loss for how exactly to calculate it.

just an update and a FYI.
at least 8 in a row
p=18/37
spins 50: 0.0691883981827
spins 100: 0.1421953754224
spins 1000: 0.8028180750264
all the above streak probabilities are only good before the 1st spin!

say you go 100 spins and NO streak of 8 hits.
you are thinking"spins 1000: 0.8028180750264"
this is not a correct thought at this point in time, unless you are thinking of the next 1000 spins.

there are 900 spins left out of the initial 1000 spins
spins 900: 0.7678258249610
the probability has now lowered (as expected)

say you go 569 spins and NO streak of 8 hits.
you are thinking"spins 1000: 0.8028180750264"

actually there are now 431 spins remaining
spins 431: 0.5004782010791

it started out as about an 80% success rate
now it is down to a coin flip that it will not happen

enjoy



Let me see if I understand this correctly...if I go and play roulette...and lets just say I sit for 50 spins....the probability of a streak of 8 straight red or black is 6.9%?
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
July 10th, 2019 at 3:24:20 PM permalink
Quote: Arnie

if I go and play roulette...and lets just say I sit for 50 spins....the probability of a streak of 8 straight red or black is 6.9%?

I think you got it, the words you use may cause some confusion

the probability of a streak of 'at least' 8 straight red is 6.9%
the probability of a streak of 'at least' 8 straight black is 6.9%

the probability of a streak of 'at least' 8 straight red or black is 13.49%

it is all in the words you use to describe the event or events
winsome johnny (not Win some johnny)
Arnie
Arnie
  • Threads: 6
  • Posts: 40
Joined: May 14, 2012
July 10th, 2019 at 3:50:22 PM permalink
Quote: 7craps

I think you got it, the words you use may cause some confusion

the probability of a streak of 'at least' 8 straight red is 6.9%
the probability of a streak of 'at least' 8 straight black is 6.9%

the probability of a streak of 'at least' 8 straight red or black is 13.49%

it is all in the words you use to describe the event or events



Thanks.

What about craps? Lets just say I wanted to wait for don't pass to win and then bet pass until it hits. What are the odds that pass loses 8 more consecutive times (total of 9 times) Is it roughly same percentage? Again only 50 rolls
  • Jump to: