thebeardking
thebeardking
  • Threads: 1
  • Posts: 2
Joined: Oct 16, 2011
October 16th, 2011 at 12:01:42 PM permalink
My friend and I have been playing backgammon and are pretty evenly matched but we have noticed that quite frequently one of us will go on a long winning streak. In our last 100 games I have had 10 wins in a row, 7 wins in a row and 6 wins in a row. Is this likely to have happened by random chance? i.e. If i flipped a coin 100 times what's the most heads/tails i would expect to get in a row?

Thanks Steve
EvenBob
EvenBob
  • Threads: 442
  • Posts: 29634
Joined: Jul 18, 2010
October 16th, 2011 at 12:08:06 PM permalink
In roulette, its not uncommon to see 15 reds or blacks in a row.
Or more. 10 in a row is a common occurrence.
"It's not called gambling if the math is on your side."
thebeardking
thebeardking
  • Threads: 1
  • Posts: 2
Joined: Oct 16, 2011
October 16th, 2011 at 12:13:35 PM permalink
Thanks for the quick reply. Do you know how uncommon? I'm trying to work it out mathematically - ideally I want to work out a graph that says for instance "On average you will get 15 single wins, 10 double, 5 triple etc".
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
October 16th, 2011 at 12:27:07 PM permalink
Quote: thebeardking

My friend and I have been playing backgammon and are pretty evenly matched but we have noticed that quite frequently one of us will go on a long winning streak. In our last 100 games I have had 10 wins in a row, 7 wins in a row and 6 wins in a row.
Is this likely to have happened by random chance?

Yes. Here is a run probability table for 100 trials:
For at least 1 run of a certain length or more. Example: at least 7 in a row at least 1 time. 7+ = 31.75%

To answer your thread title question of 10 in a row.
At least 1 run of length 10 or more in 100 trials: 0.044137229 or about 1 in 23
At least 2 runs of length 10 or more in 100 trials: 0.000777775 or about 1 in 1286
lengthprob for N=100
3+0.999738255
4+0.972715042
5+0.810109599
6+0.546093619
7+0.317520387
8+0.170207962
9+0.087558927
10+0.044137229
11+0.022029266
12+0.010941678
13+0.005421525

a handy streak calculator can be found at A handy Streak Calculator
Quote: thebeardking

i.e. If i flipped a coin 100 times what's the most heads/tails i would expect to get in a row?
Thanks Steve


You are looking for the longest run of either tails or heads for a fair coin for 100 trials.
Data below from a simulation.
The math for me for the longest run in N trials is too messy.

group middle freq freq/100
-----------------------------------------------
2.50 <= x < 3.50 3.00 2775 0.03%
3.50 <= x < 4.50 4.00 279971 2.80%
4.50 <= x < 5.50 5.00 1651160 16.51%
5.50 <= x < 6.50 6.00 2644439 26.44%
6.50 <= x < 7.50 7.00 2274305 22.74%
7.50 <= x < 8.50 8.00 1463360 14.63%
8.50 <= x < 9.50 9.00 817229 8.17%
9.50 <= x < 10.50 10.00 430158 4.30%
10.50 <= x < 11.50 11.00 218683 2.19%
11.50 <= x < 12.50 12.00 109456 1.09%
12.50 <= x < 13.50 13.00 54739 0.55%
13.50 <= x < 14.50 14.00 27242 0.27%
14.50 <= x < 15.50 15.00 13407 0.13%
15.50 <= x < 16.50 16.00 6691 0.07%
16.50 <= x < 17.50 17.00 3165 0.03%
17.50 <= x < 18.50 18.00 1629 0.02%
18.50 <= x < 19.50 19.00 813 0.01%
19.50 <= x < 20.50 20.00 383 0.00%
20.50 <= x < 21.50 21.00 222 0.00%
21.50 <= x < 22.50 22.00 80 0.00%
22.50 <= x < 23.50 23.00 48 0.00%
23.50 <= x < 24.50 24.00 20 0.00%
24.50 <= x < 25.50 25.00 10 0.00%
25.50 <= x < 26.50 26.00 10 0.00%
26.50 <= x < 27.50 27.00 2 0.00%
27.50 <= x < 28.50 28.00 2 0.00%
28.50 <= x < 29.50 29.00 0
29.50 <= x < 30.50 30.00 0
30.50 <= x < 31.50 31.00 1 0.00%

-----------------------------------------------
grouped data
items: 10,000,000

minimum value: 3.00
first quartile: 6.00
median: 7.00
third quartile: 8.00
maximum value: 31.00

mean value: 6.98
midrange: 17.00

range: 28.00
interquartile range: 2.00
mean abs deviation: 1.34

sample variance (n): 3.21
sample variance (n-1): 3.21
sample std dev (n): 1.79
sample std dev (n-1): 1.79

-----------------------------------------------
cumulative
-----------------------------------------------
2.50 <= x < 3.50 3.00 2775 0.03%
3.50 <= x < 4.50 4.00 282746 2.83%
4.50 <= x < 5.50 5.00 1933906 19.34%
5.50 <= x < 6.50 6.00 4578345 45.78%
6.50 <= x < 7.50 7.00 6852650 68.53%
7.50 <= x < 8.50 8.00 8316010 83.16%
8.50 <= x < 9.50 9.00 9133239 91.33%
9.50 <= x < 10.50 10.00 9563397 95.63%
10.50 <= x < 11.50 11.00 9782080 97.82%
11.50 <= x < 12.50 12.00 9891536 98.92%
12.50 <= x < 13.50 13.00 9946275 99.46%
13.50 <= x < 14.50 14.00 9973517 99.74%
14.50 <= x < 15.50 15.00 9986924 99.87%
15.50 <= x < 16.50 16.00 9993615 99.94%
16.50 <= x < 17.50 17.00 9996780 99.97%
17.50 <= x < 18.50 18.00 9998409 99.98%
18.50 <= x < 19.50 19.00 9999222 99.99%
19.50 <= x < 20.50 20.00 9999605 100.00%
20.50 <= x < 21.50 21.00 9999827 100.00%
21.50 <= x < 22.50 22.00 9999907 100.00%
22.50 <= x < 23.50 23.00 9999955 100.00%
23.50 <= x < 24.50 24.00 9999975 100.00%
24.50 <= x < 25.50 25.00 9999985 100.00%
25.50 <= x < 26.50 26.00 9999995 100.00%
26.50 <= x < 27.50 27.00 9999997 100.00%
27.50 <= x < 28.50 28.00 9999999 100.00%
28.50 <= x < 29.50 29.00 9999999 100.00%
29.50 <= x < 30.50 30.00 9999999 100.00%
30.50 <= x < 31.50 31.00 10000000 100.00%

-----------------------------------------------

guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
October 16th, 2011 at 12:33:20 PM permalink
Quote: thebeardking

Thanks for the quick reply. Do you know how uncommon? I'm trying to work it out mathematically - ideally I want to work out a graph that says for instance "On average you will get 15 single wins, 10 double, 5 triple etc".

For either heads or tails where p=0.50. The expected number of streaks (runs) per length per 100 trials.
LengthAverageOr more
112.7525.25
26.312512.5
33.1256.1875
41.5468753.0625
50.7656251.515625
60.3789060.75
70.18750.371094
80.0927730.183594
90.0458980.09082
100.0227050.044922
110.011230.022217
120.0055540.010986
130.0027470.005432
140.0013580.002686
150.0006710.001328

Simulation result data
       group         middle       freq  freq/100
------------------------------------------------
0.50 <= x < 1.50 1.00 127471930 50.48%
1.50 <= x < 2.50 2.00 63132663 25.00%
2.50 <= x < 3.50 3.00 31256267 12.38%
3.50 <= x < 4.50 4.00 15482681 6.13%
4.50 <= x < 5.50 5.00 7661983 3.03%
5.50 <= x < 6.50 6.00 3791121 1.50%
6.50 <= x < 7.50 7.00 1873678 0.74%
7.50 <= x < 8.50 8.00 928206 0.37%
8.50 <= x < 9.50 9.00 458358 0.18%
9.50 <= x < 10.50 10.00 227831 0.09%
10.50 <= x < 11.50 11.00 112425 0.04%
11.50 <= x < 12.50 12.00 55271 0.02%
12.50 <= x < 13.50 13.00 27549 0.01%
13.50 <= x < 14.50 14.00 13852 0.01%
14.50 <= x < 15.50 15.00 6758 0.00%
15.50 <= x < 16.50 16.00 3348 0.00%
16.50 <= x < 17.50 17.00 1599 0.00%
17.50 <= x < 18.50 18.00 828 0.00%
18.50 <= x < 19.50 19.00 410 0.00%
19.50 <= x < 20.50 20.00 193 0.00%
20.50 <= x < 21.50 21.00 119 0.00%
21.50 <= x < 22.50 22.00 35 0.00%
22.50 <= x < 23.50 23.00 26 0.00%
23.50 <= x < 24.50 24.00 8 0.00%
24.50 <= x < 25.50 25.00 6 0.00%
25.50 <= x < 26.50 26.00 4 0.00%
26.50 <= x < 27.50 27.00 1 0.00%
27.50 <= x < 28.50 28.00 0
28.50 <= x < 29.50 29.00 0
29.50 <= x < 30.50 30.00 0
30.50 <= x < 31.50 31.00 1 0.00%

------------------------------------------------
grouped data
items: 252,507,151

minimum value: 1.00
first quartile: 1.00
median: 1.00
third quartile: 2.00
maximum value: 31.00

mean value: 1.98
midrange: 16.00

range: 30.00
interquartile range: 1.00
mean abs deviation: 0.99

sample variance (n): 1.94
sample variance (n-1): 1.94
sample std dev (n): 1.39
sample std dev (n-1): 1.39

------------------------------------------------
cumulative
------------------------------------------------
0.50 <= x < 1.50 1.00 127471930 50.48%
1.50 <= x < 2.50 2.00 190604593 75.48%
2.50 <= x < 3.50 3.00 221860860 87.86%
3.50 <= x < 4.50 4.00 237343541 93.99%
4.50 <= x < 5.50 5.00 245005524 97.03%
5.50 <= x < 6.50 6.00 248796645 98.53%
6.50 <= x < 7.50 7.00 250670323 99.27%
7.50 <= x < 8.50 8.00 251598529 99.64%
8.50 <= x < 9.50 9.00 252056887 99.82%
9.50 <= x < 10.50 10.00 252284718 99.91%
10.50 <= x < 11.50 11.00 252397143 99.96%
11.50 <= x < 12.50 12.00 252452414 99.98%
12.50 <= x < 13.50 13.00 252479963 99.99%
13.50 <= x < 14.50 14.00 252493815 99.99%
14.50 <= x < 15.50 15.00 252500573 100.00%
15.50 <= x < 16.50 16.00 252503921 100.00%
16.50 <= x < 17.50 17.00 252505520 100.00%
17.50 <= x < 18.50 18.00 252506348 100.00%
18.50 <= x < 19.50 19.00 252506758 100.00%
19.50 <= x < 20.50 20.00 252506951 100.00%
20.50 <= x < 21.50 21.00 252507070 100.00%
21.50 <= x < 22.50 22.00 252507105 100.00%
22.50 <= x < 23.50 23.00 252507131 100.00%
23.50 <= x < 24.50 24.00 252507139 100.00%
24.50 <= x < 25.50 25.00 252507145 100.00%
25.50 <= x < 26.50 26.00 252507149 100.00%
26.50 <= x < 27.50 27.00 252507150 100.00%
27.50 <= x < 28.50 28.00 252507150 100.00%
28.50 <= x < 29.50 29.00 252507150 100.00%
29.50 <= x < 30.50 30.00 252507150 100.00%
30.50 <= x < 31.50 31.00 252507151 100.00%

Being football day, I am just too good busy to show my work or provide links to other posts that show how to do this yourself. That will be added later.
Hope this can help.
Enjoy

added:
My daughter has a web page for the "probability of runs" and "expected number of runs" and other goodies.

Here is the link below.
The Excel tables are LIVE, meaning you can change the values and see the results, even if you do not have Excel on your computer.
Expected number of runs per N trials
pacomartin
pacomartin
  • Threads: 649
  • Posts: 7895
Joined: Jan 14, 2010
October 18th, 2011 at 8:28:13 PM permalink
Quote: guido111

lengthprob for N=100
3+0.999738255
4+0.972715042
5+0.810109599
6+0.546093619
7+0.317520387
8+0.170207962
9+0.087558927
10+0.044137229
11+0.022029266
12+0.010941678
13+0.005421525



Guido's table above is absolutely correct.

Adding to the table, even small deviations from 50/50 make it even more likely that the person who is slightly better will get a significant streak. Picking a mid length streak of 7 wins in a row, and giving yourself a slight advantage over your opponent leads to the following:

50%-50%: 31.752% of getting 7+ in a row
51%-49%: 33.877% of getting 7+ in a row
52%-48%: 38.546% of getting 7+ in a row
53%-47%: 42.161% of getting 7+ in a row
...
60%-40%: 68.910% of getting 7+ in a row

The solution to this problem can be worked out as a recursive relationship, but it is not possible to express it as an algebraic formula. It takes some higher order mathematics to show that it can't be boiled down to a formula.

The gambler's fallacy is often expressed as the quantitative statement, that a gambler often believes that past events influence future event, and often relies on betting systems. But you can express the "gambler's fallacy" in more quantitative terms, by saying that most gambler's underestimate the length and frequency of streaks.

Most untrained people will not be able to fake a simple random stream including the results of coin tosses. An overwhelmingly large percentage of people don't put in long enough streaks.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 29th, 2015 at 9:20:50 AM permalink
Quote: pacomartin

60%-40%: 68.910% of getting 7+ in a row

ands at a 60/40 advantage there could easily be more than 1 such run

i only know of one that has done this (he, yes, BruceZ did it in Excel and in R... i wonder if he is left-handed?)
others have shown how to do this (in heavy math papers) with inclusion-exclusion (lots of math for those that love lots)

i show a 29.059% chance of at least 2 such 7+ run streaks
wow!

that makes 0.398508652 the probability of exactly one such run in 100 trials

and it goes from there

the 50/50
at least 1 run: 0.3175203874966 <<<< this was an ask the wizard question too
https://wizardofodds.com/ask-the-wizard/253/
Q#3

at least 2 runs: 0.0490016781438
at least 3 runs: 0.0043295727700


yes, BruceZ also mentioned B4 that this can also be easily done in a few columns in Excel
the multiple streak thing
so I be off to do just that

Mully
I Heart Vi Hart
  • Jump to: