Thread Rating:

mathdolt
mathdolt
  • Threads: 1
  • Posts: 3
Joined: Feb 20, 2013
February 20th, 2013 at 3:21:52 PM permalink
To get the measure of the ups and downs of passline play, I ran ten 1,000,000-round simulations in a spreadsheet program. All ten simulations produced streaks of at least 18 wins in a row and there was one instance of 22 wins in a row. I’m fairly certain the output of the random number generator was programmed correctly. Although none of the win/loss ratios conformed exactly to the 0.01414 casino edge, all ten were not far from it. Still, even 18 wins in a row seems a bit improbable even for 1,000,000 rounds. The number of required rolls before going 7-out would likely be considerable even with a high frequency of naturals on the come out roll. Some statisticians have claimed the odds against the 154-roll run that happened at Borgota in 2009 were more than 5 billion to 1. That would seem to put the veracity of my simulation data in doubt. Is my simulation data all wet?
boymimbo
boymimbo
  • Threads: 17
  • Posts: 5994
Joined: Nov 12, 2009
February 20th, 2013 at 3:41:39 PM permalink
All you really have to do is take the odds of getting one point and take it to the exponent 22. I am assuming 7,11 are passline decisions?

If that's the case, the odds of having a single positive passline decision is: 8/36 + 6/36*1/3 + 8/36*2/5 + 10/36 *5/11 = .4929293. The odds of having 22 decisions in a row is 5,737,704.75:1 but that is the odds if you start at a certain point. The odds of getting 22 passes in a row is not 5.737:1 (though I think it's pretty close) because the trial starts at the 1st roll.

I think the odds are 1- (1-(.4929293^22)^999979 = 1- .8400601 = .1599399

Someone will correct me I am sure.
----- You want the truth! You can't handle the truth!
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 20th, 2013 at 3:59:58 PM permalink
Quote: mathdolt

Is my simulation data all wet?

No


From Sally's Streak Calculator (and VBA Excel sheet linked to),
two different programs returned the same results.
http://www.pulcinientertainment.com/info/Streak-Calculator-enter.html

For at least 18 in a row pass line wins: 0.776180221094645
1.5 is the average number of runs 18+ in 1 million trials
The average number of trials to see 18 in a row: 668,047


Event	                                Run Probability	       1 in
0 runs of length 18 or more 0.223819779 4.47
at least 1 run of length 18 or more 0.776180221094645 1.29

could even be more
at least 2 runs of length 18 or more 0.441131957559661 2.27
at least 3 runs of length 18 or more 0.190365055189856 5.25
at least 4 runs of length 18 or more 0.065245344895849 15.33
at least 5 runs of length 18 or more 0.018425880846359 54.27
at least 6 runs of length 18 or more 0.004410623975975 226.73
at least 7 runs of length 18 or more 0.000914568073469 1,093.41
at least 8 runs of length 18 or more 0.000167099713893 5,984.45
at least 9 runs of length 18 or more 0.000027270073853 36,670.23
at least 10 runs of length 18 or more 0.000004019318281 248,798.41
at least 11 runs of length 18 or more 0.000000539942486 1,852,049.11



For at least 22 in a row pass line wins: 0.084581177224990
0.088373413 is the average number of runs 22+ in 1 million trials
The average number of trials to see 22 in a row: 11,315,392

Event	                                Run Probability	       1 in
0 runs of length 22 or more 0.915418823 1.09
at least 1 run of length 22 or more 0.084581177224990 11.82

at least 2 runs of length 22 or more 0.003682169900757 271.58
at least 3 runs of length 22 or more 0.000107655858051 9,288.86
at least 4 runs of length 22 or more 0.000002367580999 422,372.03
at least 5 runs of length 22 or more 0.000000041714686 23,972,372.54

added: The probability of a 22 length streak and the average number of streaks in 1 million trials are very close.
winsome johnny (not Win some johnny)
YouCanBetOnThat
YouCanBetOnThat
  • Threads: 14
  • Posts: 96
Joined: Nov 7, 2012
February 20th, 2013 at 4:00:42 PM permalink
Here's how I figured it.

On average, it takes 3.376 rolls to get a pass-line decision. That means you'll have roughly 296,208 pass-line decisions for every 1,000,000 rolls.

The pass line wins 49.3% of the time.

Put the following numbers into a streak calculator (http://www.pulcinientertainment.com/info/Streak-Calculator-enter.html):

Trials: Series Length: (n) = 296208
Streak Length (or more): (k) = 22
Probability of Success: (p) = 0.493

...and we see that in 1,000,000 rolls you'll get 22 or more pass-line wins in a row about 2.6% of the time.
YouCanBetOnThat.com, a podcast for the recreational gambler
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 20th, 2013 at 4:04:01 PM permalink
OP also used the word "rounds" instead of rolls.
Maybe he will confirm

added: your numbers look good for 1 million rolls
winsome johnny (not Win some johnny)
YouCanBetOnThat
YouCanBetOnThat
  • Threads: 14
  • Posts: 96
Joined: Nov 7, 2012
February 20th, 2013 at 4:04:37 PM permalink
Just re-reading the whole post. My calculations were based on 1,000,000 rolls (as indicated in the subject line), not 1,000,000 decisions.
YouCanBetOnThat.com, a podcast for the recreational gambler
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 20th, 2013 at 4:07:27 PM permalink
Quote: boymimbo

I think the odds are 1- (1-(.4929293^22)^999979 = 1- .8400601 = .1599399.

It is closer if use
.4929293^23 and change the other exponent 1.
(I also think you are just calculating the average number of such runs in 1 million trials)

I saw the Wizard use this method one time and got real close.
added:
The Wizard's method is here
https://wizardofvegas.com/forum/questions-and-answers/math/4582-policing-the-media/2/#post58529

1. A run of exactly 20 or more heads has probability of (1/2)^21 for any given starting point. The 21 in the exponent is because a tail must proceed the run of at least 20 heads.
2. The expected number of such runs is 1000000*(1/2)^21 = 0.476837.
3. The probability of 0 such runs is exp(-0.476837) = 0.620744.
4. The probability of at least 1 such run is 1-0.620744=0.379256.

Using the Wizards method I get 0.082323674
But in my old worksheet I have a different formula that returns 0.084581016 for the probability... even closer

Alternate Formula:
=1-EXP(-A)
A=(p^run)*(1+((trials-run)*q))
-------------------------------------------
p= probability of success
run = length of the run (streak)
q = 1-p
-------------------------------------------
A is "the expected number of runs for length X" formula.
(EXP is an Excel function
Returns e raised to the power of number. The constant e equals 2.71828182845904, the base of the natural logarithm)

This method works well when the length of the run is quite high (like over 15)
and the probability of a run and the average number of runs are close
or errors start creeping in and can get quite large for shorter run lengths

You never know when you can not get to a streak calculator
and are driving in your car and you just need to calculate this in your head,
the alternate formula does the job so you can get back to enjoying your ride and drive.
winsome johnny (not Win some johnny)
mathdolt
mathdolt
  • Threads: 1
  • Posts: 3
Joined: Feb 20, 2013
February 20th, 2013 at 6:34:59 PM permalink
My intended meaning was that a round requires a passline decision to be completed. Thus a round can be composed of 1 or many rolls.
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 20th, 2013 at 7:18:19 PM permalink
Quote: mathdolt

My intended meaning was that a round requires a passline decision to be completed. Thus a round can be composed of 1 or many rolls.

A few of us got that.
You have now both answers for rolls and rounds
as the title of the thread had "rolls" and your first post had "rounds"

to summarize since we also showed how this could be calculated,

1 million rounds (pass line decisions)
For at least 18 in a row pass line wins: 0.776180221094645
For at least 22 in a row pass line wins: 0.084581177224990 or about 1 in 12

and "1,000,000 rolls you'll get 22 or more pass-line wins in a row about 2.6% of the time" or about 1 in 39

your sims and results look just fine
winsome johnny (not Win some johnny)
mathdolt
mathdolt
  • Threads: 1
  • Posts: 3
Joined: Feb 20, 2013
February 20th, 2013 at 7:42:30 PM permalink
Thank you all for responding and answering with such clarity. Like the blind man said, I now see. A good number of hours were put into that friggin simulation database. It's a relief to know that it’s at least reasonably sound. I still wonder though about how many back-to-back passline wins the run at the Borgata actually consisted of. The information should have been retrievable from the casino video tapes.
pacomartin
pacomartin
  • Threads: 649
  • Posts: 7895
Joined: Jan 14, 2010
February 20th, 2013 at 8:37:05 PM permalink
Quote: mathdolt

Thank you all for responding and answering with such clarity. Like the blind man said, I now see. A good number of hours were put into that friggin simulation database. It's a relief to know that it’s at least reasonably sound. I still wonder though about how many back-to-back passline wins the run at the Borgata actually consisted of. The information should have been retrievable from the casino video tapes.



Intuition as far as streaks can often be very misleading. A comment made by William Wulf who should have known better received a good bit of attention a few years ago. While it is clear that his comment was made "off the cuff", it is actually very wrong.

Quote: William A. Wulf, a former president of the National Academy of Engineering


William is, no surprise, no fan of the Gambetta-Hertog theory. “If you have a million coin flips,” he says, “it’s almost certain that somewhere in those coin flips there will be 20 heads in a row.”



Quote: pacomartin

One way to approach the problem is to try and recreate the thinking of William A. Wulf. Like most people, he knows that the odds of getting 20 heads in a row with a fair coin is one in 2^20 which is a "mega" or just over a million. From there he reasoned that a million tosses of a coin will almost certainly result in at least one streak of at least 20 heads in a row.

Is that thought process valid? Well, try it on a simple case. You know that getting two heads in a row has a 1/4 probability if you flip a coin twice. So if you flip a coin four times, what is the probability that you will have a streak of two heads?

Flipping a coin four times only has 16 possible outcomes. How many of them have a streak of 2 heads? You can do this on paper. Would you call the outcome "certain"?

HHHH *
TTTT

HHHT *
TTTH

HHTH *
TTHT


HTHH *
THTT

HTTT
THHH *

HHTT *
TTHH *

HTTH
THHT *

HTHT
THTH

You could try and scale up one more integer to "three heads in a row" which has a one out of eight possibility of happening with three tosses. But now you would have to write out on a piece of paper 2^8 possibilities (which would be very time consuming).

tringlomane
tringlomane
  • Threads: 8
  • Posts: 6281
Joined: Aug 25, 2012
February 20th, 2013 at 11:57:08 PM permalink
I want to play where winning the pass line is a fair coinflip...lol And also 22 in a row is roughly 4 times less likely than 20 in a row. But yeah, your point is still valid, but OP's results also are still possible for sure.

My former grad school advisor, who is not a member of the NAE since he is a theoretical material scientist, wouldn't have probably screwed that up. At least I hope.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
Thanked by
rsactuary
June 1st, 2018 at 9:49:10 PM permalink
Quote: mathdolt

I ran ten 1,000,000-round simulations in a spreadsheet program.
All ten simulations produced streaks of at least 18 wins in a row and there was one instance of 22 wins in a row.

I agree using the streak calculator here.
https://sites.google.com/view/krapstuff/home

The bottom calculator (R code)is a Markov chain that I coded.

It agrees with some other data posted.
here is how the function was called
runs.r(18,1e6,244/495,0)
runs.r(22,1e6,244/495,0)
results in a split second
> runs.r(18,1e6,244/495,0)
[1] "for a run of 18, success probability: 0.7761802211"
[1] "1 in: 1.28836"
[1] "Number of trials: 1000000"
> runs.r(22,1e6,244/495,0)
[1] "for a run of 22, success probability: 0.08458117722"
[1] "1 in: 11.823"
[1] "Number of trials: 1000000"

That deals with the streak probability
(and of course there could be 2 or more such 18+ win streaks at 44% success probability over the 1 million rounds played)
*****
"All ten simulations produced streaks of at least 18 wins in a row"
we can use the binomial distribution probability for that
a calculator here works well too
http://vassarstats.net/binomialX.html
n=10
k=10
p=0.7761802211

returns
P: exactly 10 out of 10
0.079364396287
about 1 in 13

so this is easy math when one uses a calculator or two
good to check the results in another program

Sally
I Heart Vi Hart
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
June 2nd, 2018 at 9:42:26 PM permalink
Taking an average gives an accurate estimate.

Each trial will last an average of 1.972 decisions. 1,000,000 / 1.972 = 507,000 average trials.

The probability of 22 consecutive wins on each trial is .493 ^ 22 = x.

1 - (1 - x ) ^ 507,000 = 8.48% or 1 in 11.8
It’s all about making that GTA
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
June 2nd, 2018 at 11:16:01 PM permalink
Quote: Ace2

Taking an average gives an accurate estimate.

I have found that to be true when the number of trials is quite large.
and then we have to work with the probability of success at each trial being very small or very large and who knows??
Quote: Ace2

Each trial will last an average of 1.972 decisions. 1,000,000 / 1.972 = 507,000 average trials.

The probability of 22 consecutive wins on each trial is .493 ^ 22 = x.

1 - (1 - x ) ^ 507,000 = 8.48% or 1 in 11.8

for example
flip a fair coin 20 times.

what is the probability of a run of at least 5 Heads?

we get about a 25% chance of success (0.24987 rounded) using a calculator
(some may want exact precision
https://www.wolframalpha.com/input/?i=streak+of+5+successes+in+20+trials
maybe not)

using averages I get about 28% chance (0.279441374 rounded)
a nice 12% error

Each trial will last an average of 1.9375 (the sum of a geometric series)
20 / 1.9375 = 10.32258065
The probability of 5 consecutive wins on each trial is 0.50 ^ 5 = x.
1 - (1 - x ) ^ 10.32258065 = 0.279441374
or about 1 in 3.578568 (IF the math has no errors)

Sally
I Heart Vi Hart
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
June 3rd, 2018 at 1:28:30 PM permalink
Every approximation I can think of isn’t particularly accurate with a very low N, but gets much more accurate as N increases.

There wouldn’t be much of a reason to approximate 5 consecutive heads in 20 since it can be calculated very easily (20 excel lines, regular recursive method or Fibonacci)

The calculation for 22 consecutive pass line wins in a million would be almost as easy but it requires 1 million iterations, and excel tends to freeze up around 300k, or at least mine does.
It’s all about making that GTA
  • Jump to: