neneduty
Posted by neneduty
Mar 16, 2018

Probability

I have been reading this site for years. Such awesome information. I love how you guys and gals (Mustang Sally) figure all that math, GOD bless you. Sorry to bug you guys one more time. I have a question specifically for baccarat. Reading a lot of different forums, one gentleman had a link to a streak calculator but is no longer working. On this particular post he stated there is a 99.74% probability that there will be at least one run of banker of 3 long in a shoe. Meaning there will be a series of 3 banker decisions( back to back) at least once in a shoe. Can you tell me if this probability percentage is correct? Can you also tell me the probability of 2 series of three banker decisions back to back occurring at least once in a shoe? 3 series of three banker decisions back to back? Thanks again for such a wonderful site and GOD bless. Alex

Comments

Ace2
Ace2 Mar 17, 2018

I get 99.46%.



Assuming infinite deck, 81 trials ((52 x 8 - 15) / 4.94)).

mustangsally
mustangsally Mar 17, 2018

you can find info on that here:



https://wizardofvegas.com/forum/gambling/tables/5928-baccarat-streaks-question/#post81902



these are from simulation and not calculation



I think you mentioned that post before.

# of 3+	freq	prob

0 25715 0.25715% (1 in 388.88 shoes)

1 218438 2.18438%

2 810973 8.10973%

3 1753291 17.53291%

4 2442686 24.42686%

5 2297366 22.97366%

6 1498439 14.98439%

7 682613 6.82613%

8 215741 2.15741%

9 47191 0.47191%

10 6913 0.06913%

11 601 0.00601%

12 33 0.00033%



trials 10,000,000



minimum value: 0

first quartile: 3

median: 4

third quartile: 5

maximum value: 12



mean value: 4.44

sample variance 2.48

sample std 1.58




the streak calculator is here too

(do not know why that old link does not work)



Streak Calculator



Sally

Ace2
Ace2 Mar 17, 2018

Keep in mind that that post ignores ties. Meaning that BTTBTB is counted as a streak of 3 banker wins.



I calculated with only BBB (or more) counted as a valid streak.



The streak calculator also gives 99.46% as the chance of 3 or more assuming 81 trials and .458597 probability of banker win (ties not ignored). So I imagine it does the same calculation I did , a simple 4 x 4 markov chain.

mustangsally
mustangsally Mar 18, 2018

Here is my Excel in Google Sheets

if one wants to look at

Excel-Google Sheets



simple recursion method (based from a transition matrix, uses simple math only)

shows both streaks with and without a Tie breaking the streak, and that agrees with others.



Hope this all helps out

the original streak calculator page does work now.

It has a link to the new home for the streak calculator.



for multiple streaks, that is on a different Excel sheet

I have to look for that one later

old photo (I think it is for Banker)





that is why I showed the sim data

Have fun with streaks!



Sally

mustangsally
mustangsally Mar 18, 2018

I added some R code from member BruceZ (not his original)

and a few results

a streak is NOT broken by a Tie



here is the code

####################################################################################

#

# Multi-streak Calculator

#

# Probability of 1,2,3,...s or more streaks of r or more consecutive heads in

# n tosses of a coin having probability p of heads.

# Returns s probabilities in addition to the sum of the probabilities.

# The sum of the probabilities will be the average number of streaks for sufficiently

# large s.

#

# P(j, i) = P(j, i-1) + [P(j-1,i-r-1) - P(j, i-r-1)] * (1-p)p^r, for i > j*(r+1) - 1

#

# P(j, i) = p^(jr) * (1-p)^(j-1), for i = j*(r+1) - 1

#

# P(j, i) = 0, for i < j*(r+1) - 1

#

# P(0, i-r-1) = 1

#

# where j is the number of streaks, and i is the flip.

# Note that [P(j-1, i-r-1) - P(j, i-r-1)]is the probability of exactly j-1 streaks.

# j is taken modulo 2 in the code implementation.

# P is implemented as a linear array prob of size 1:n.

####################################################################################



require(compiler)

enableJIT(3)



mruns = function(r,n,p,s=1) {

output = rep(0,s)

prob = matrix(rep(0,2*n),nrow=2)

c = (1-p)*p^r



# 1 or more streaks



if (r <= n) prob[2, r] = p^r

prob[2,r+1] = prob[2,r] + c

for (i in (r+2):n) prob[2, i] = prob[2, i-1] + (1 - prob[2, i-r-1])*c

output[1] = prob[2,n]



# 2, 3, ... s or more streaks



if (s > 1) {

for (j in 2:s) {

curr = j %% 2 + 1

prev = (j+1) %% 2 + 1

first = j*(r+1) - 1

if (first <= n) { prob[curr, first] = p^(j*r)*(1-p)^(j-1) }

for ( i in (first+1):n ) {

prob[curr, i] = prob[curr, i-1] + (prob[prev, i-r-1] - prob[curr, i-r-1])*c

}

output
= prob[curr, n]

for (i in 1:n) prob[prev, i] = 0

}

}

sum = sum(output)

if (s > 5) {

cat ("Average number of streaks = ",sum,"\n","Streak length = ",r,"\n","# of BP Hands (no Ties counted) = ",n,"\n")} else{

cat ("Streak length = ",r,"\n","# of BP Hands (no Ties counted) = ",n,"\n")

}

output <- as.matrix(output)

colnames(output) <- list("p(streak)")

#print(output)



nostreak <- as.matrix(1-output)

colnames(nostreak) <- list("p(no-streak)")

#print(nostreak)



final <- cbind(output, nostreak)

print(final)

}

#calls

mruns(3,75,0.50682483,11)

mruns(3,81,0.50682483,5)

mruns(3,81,0.50682483)





results:

> ####################################################################################

> #

> # Multi-streak Calculator

> #

> # Probability of 1,2,3,...s or more streaks of r or more consecutive heads in

> # n tosses of a coin having probability p of heads.

> # Returns s probabilities in addition to the sum of the probabilities.

> # The sum of the probabilities will be the average number of streaks for sufficiently

> # large s.

> #

> # P(j, i) = P(j, i-1) + [P(j-1,i-r-1) - P(j, i-r-1)] * (1-p)p^r, for i > j*(r+1) - 1

> #

> # P(j, i) = p^(jr) * (1-p)^(j-1), for i = j*(r+1) - 1

> #

> # P(j, i) = 0, for i < j*(r+1) - 1

> #

> # P(0, i-r-1) = 1

> #

> # where j is the number of streaks, and i is the flip.

> # Note that [P(j-1, i-r-1) - P(j, i-r-1)]is the probability of exactly j-1 streaks.

> # j is taken modulo 2 in the code implementation.

> # P is implemented as a linear array prob of size 1:n.

> ####################################################################################

>

> require(compiler)

> enableJIT(3)

[1] 3

>

> mruns = function(r,n,p,s=1) {

+ output = rep(0,s)

+ prob = matrix(rep(0,2*n),nrow=2)

+ c = (1-p)*p^r

+

+ # 1 or more streaks

+

+ if (r <= n) prob[2, r] = p^r

+ prob[2,r+1] = prob[2,r] + c

+ for (i in (r+2):n) prob[2, i] = prob[2, i-1] + (1 - prob[2, i-r-1])*c

+ output[1] = prob[2,n]

+

+ # 2, 3, ... s or more streaks

+

+ if (s > 1) {

+ for (j in 2:s) {

+ curr = j %% 2 + 1

+ prev = (j+1) %% 2 + 1

+ first = j*(r+1) - 1

+ if (first <= n) { prob[curr, first] = p^(j*r)*(1-p)^(j-1) }

+ for ( i in (first+1):n ) {

+ prob[curr, i] = prob[curr, i-1] + (prob[prev, i-r-1] - prob[curr, i-r-1])*c

+ }

+ output
= prob[curr, n]

+ for (i in 1:n) prob[prev, i] = 0

+ }

+ }

+ sum = sum(output)

+ if (s > 5) {

+ cat ("Average number of streaks = ",sum,"\n","Streak length = ",r,"\n","# of BP Hands (no Ties counted) = ",n,"\n")} else{

+ cat ("Streak length = ",r,"\n","# of BP Hands (no Ties counted) = ",n,"\n")

+ }

+ output <- as.matrix(output)

+ colnames(output) <- list("p(streak)")

+ #print(output)

+

+ nostreak <- as.matrix(1-output)

+ colnames(nostreak) <- list("p(no-streak)")

+ #print(nostreak)

+

+ final <- cbind(output, nostreak)

+ print(final)

+ }

> #calls





> mruns(3,75,0.50682483,11)

Average number of streaks = 4.752991

Streak length = 3

# of BP Hands (no Ties counted) = 75

p(streak) p(no-streak)

[1,] 0.9983301858 0.001669814

[2,] 0.9831394787 0.016860521

[3,] 0.9218310200 0.078168980

[4,] 0.7768835605 0.223116439

[5,] 0.5535195824 0.446480418

[6,] 0.3172005968 0.682799403

[7,] 0.1409491141 0.859050886

[8,] 0.0472132611 0.952786739

[9,] 0.0116247654 0.988375235

[10,] 0.0020489683 0.997951032

[11,] 0.0002506223 0.999749378





> mruns(3,81,0.50682483,5)

Streak length = 3

# of BP Hands (no Ties counted) = 81

p(streak) p(no-streak)

[1,] 0.9990095 0.0009904793

[2,] 0.9892556 0.0107444008

[3,] 0.9462438 0.0537562176

[4,] 0.8339315 0.1660685162

[5,] 0.6403657 0.3596343120





> mruns(3,81,0.50682483)

Streak length = 3

# of BP Hands (no Ties counted) = 81

p(streak) p(no-streak)

[1,] 0.9990095 0.0009904793

>





example:

 Streak length =  3 

# of BP Hands (no Ties counted) = 75

p(streak) p(no-streak)

[1,] 0.9983301858 0.001669814

[2,] 0.9831394787 0.016860521

[3,] 0.9218310200 0.078168980


[1,] means at least 1 such streak

[2,] means at least 2 such streaks

[3,] means at least 3 such streaks

and so on



this turned out good

have fun

Sally

neneduty
neneduty Mar 23, 2018

Once again I thank you from the bottom of my heart. Really love all of you and the website God Bless all of you. Thanks again Alex