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!

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.

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.

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)

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!

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!

Vultures can't be choosers.

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!

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.

May 12th, 2019 at 8:55:01 PM
permalink

this method is one way not to follow unless one wants a wrong answer.Quote:Mission146Let'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 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)

May 12th, 2019 at 9:05:02 PM
permalink

using pari/gp online calculatorQuote:DJGeniusFor 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.

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)

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.

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.

Vultures can't be choosers.

May 13th, 2019 at 8:22:36 AM
permalink

to me you tried to answer the OP question as I didQuote:Mission1467Craps, Please correct me if I'm wrong, but I think all we did was answer two different questions.

(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)

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!

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.

May 13th, 2019 at 9:05:44 AM
permalink

LOLQuote:DJGeniusBefore 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!

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)