FCBLComish
FCBLComish
Joined: Apr 11, 2010
  • Threads: 2
  • Posts: 390
December 19th, 2018 at 4:51:16 PM permalink
Quote: michael99000

I bet Kurt Von Haller made more money selling his book than he did playing roulette



If he made $1 selling books, then this statement is true. Come to think of it, even if he lost money on his book it is probably still true.
Beware, I work for the dark side.... We have cookies
Wizard
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1164
  • Posts: 19507
December 19th, 2018 at 5:21:43 PM permalink
If the question is how long will it take for every number to appear in double-zero roulette, the answer is 160.6602765, on average. This is the sum of the inverse of every integer from 1 to 38.
It's not whether you win or lose; it's whether or not you had a good bet.
mustangsally
mustangsally
Joined: Mar 29, 2011
  • Threads: 25
  • Posts: 2463
December 19th, 2018 at 6:03:32 PM permalink
Quote: Wizard

If the question is how long will it take for every number to appear in double-zero roulette, the answer is 160.6602765, on average. This is the sum of the inverse of every integer from 1 to 38.

the OP questions 37. Where it came from

that is just 1/p where p=1/37

handy tables
0 Roulette (155.4586903)
# of numbersaverage # of spinscumulative sum
111
21.0277777782.027777778
31.0571428573.084920635
41.0882352944.173155929
51.1212121215.29436805
61.156256.45061805
71.1935483877.644166437
81.2333333338.877499771
91.27586206910.15336184
101.32142857111.47479041
111.3703703712.84516078
121.42307692314.2682377
131.4815.7482377
141.54166666717.28990437
151.60869565218.89860002
161.68181818220.58041821
171.76190476222.34232297
181.8524.19232297
191.94736842126.13969139
202.05555555628.19524694
212.17647058830.37171753
222.312532.68421753
232.46666666735.1508842
242.64285714337.79374134
252.84615384640.63989519
263.08333333343.72322852
273.36363636447.08686488
283.750.78686488
294.11111111154.897976
304.62559.522976
315.28571428664.80869028
326.16666666770.97535695
337.478.37535695
349.2587.62535695
3512.3333333399.95869028
3618.5118.4586903
3737155.4586903

The average is not the mode (The "mode" is the value that occurs most often)
or median (The "median" is the "middle" value or close to 50%)
median = spin 147 @ 0.501522154
mode = 133 @ 0.0106293156

00 Roulette (160.6602765)
# of numbersaverage # of spinscumulative sum
111
21.0270270272.027027027
31.0555555563.082582583
41.0857142864.168296868
51.1176470595.285943927
61.1515151526.437459079
71.18757.624959079
81.2258064528.85076553
91.26666666710.1174322
101.31034482811.42777702
111.35714285712.78491988
121.40740740714.19232729
131.46153846215.65386575
141.5217.17386575
151.58333333318.75719908
161.65217391320.409373
171.72727272722.13664572
181.8095238123.94616953
191.925.84616953
20227.84616953
212.11111111129.95728064
222.23529411832.19257476
232.37534.56757476
242.53333333337.1009081
252.71428571439.81519381
262.92307692342.73827073
273.16666666745.9049374
283.45454545549.35948285
293.853.15948285
304.22222222257.38170508
314.7562.13170508
325.42857142967.56027651
336.33333333373.89360984
347.681.49360984
359.590.99360984
3612.66666667103.6602765
3719122.6602765
3838160.6602765

median = spin 152 @ 0.501599171
mode = 138 @ 0.010333952

still interesting one brings up this question
Sally
I Heart Vi Hart
TomG
TomG
Joined: Sep 26, 2010
  • Threads: 9
  • Posts: 1541
December 19th, 2018 at 6:17:54 PM permalink
Quote: Wizard

If the question is how long will it take for every number to appear in double-zero roulette, the answer is 160.6602765, on average. This is the sum of the inverse of every integer from 1 to 38.



The sum of the inverse of every integer from 1 to 38 is 4.2279020133. Using the inverse of every integer, it would take like 10^70 of them to get to 160. (160.66 is the harmonic series up to 38 times 38; using 37 for single zero roulette it is is 155)

(I learned this one when calculating the expected longest drought for a Super Bowl or World Series)
mustangsally
mustangsally
Joined: Mar 29, 2011
  • Threads: 25
  • Posts: 2463
December 19th, 2018 at 7:22:29 PM permalink
Quote: TomG

(160.66 is the harmonic series up to 38 times 38; using 37 for single zero roulette it is is 155)

being specific using pari/gp calculator found here
https://pari.math.u-bordeaux.fr/gp.html
a=sum(k=1,37,37/(37-(k-1)))

0 Roulette
(19:17) gp > a=sum(k=1,37,37/(37-(k-1)));
(19:20) gp > a
%6 = 2040798836801833/13127595717600
(19:20) gp > a=sum(k=1,37,37./(37-(k-1)));
(19:20) gp > a
%8 = 155.45869028140164699369367483727361613


00 Roulette
(19:17) gp > a=sum(k=1,38,38/(38-(k-1)));
(19:17) gp > a
%2 = 2053580969474233/12782132672400
(19:17) gp > a=sum(k=1,38,38./(38-(k-1)));
(19:17) gp > a
%4 = 160.66027650522331312865836875179452467


this is the short way to an answer
Sally
I Heart Vi Hart
Wizard
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1164
  • Posts: 19507
December 20th, 2018 at 2:01:39 AM permalink
Quote: TomG

The sum of the inverse of every integer from 1 to 38 is 4.2279020133. Using the inverse of every integer, it would take like 10^70 of them to get to 160. (160.66 is the harmonic series up to 38 times 38; using 37 for single zero roulette it is is 155)



You're right. I forgot to say to multiply by 38.
Last edited by: Wizard on Dec 20, 2018
It's not whether you win or lose; it's whether or not you had a good bet.
masterj
masterj
Joined: Dec 19, 2018
  • Threads: 2
  • Posts: 11
December 20th, 2018 at 2:14:13 AM permalink
Thanks guys!
Wizard
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1164
  • Posts: 19507
December 20th, 2018 at 2:33:00 AM permalink
Quote: mustangsally

the OP questions 37. Where it came from

that is just 1/p where p=1/37
The average is not the mode (The "mode" is the value that occurs most often)
or median (The "median" is the "middle" value or close to 50%)
median = spin 147 @ 0.501522154
mode = 133 @ 0.0106293156



I agree on the median. Here is my transition matrix.

0.027 0.973 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.0541 0.9459 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0.0811 0.9189 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0.1081 0.8919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0.1351 0.8649 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0.8378 0.1622 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8649 0.1351 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8919 0.1081 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9189 0.0811 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9459 0.0541 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.973 0.027
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1


If the table is too big, cell (x,x) = x/37 and cell (x,x+1) = (37-x)/37), and every other cell is zero.
It's not whether you win or lose; it's whether or not you had a good bet.
7craps
7craps
Joined: Jan 23, 2010
  • Threads: 17
  • Posts: 1644
December 21st, 2018 at 11:35:05 AM permalink
Quote: Wizard

I agree on the median. Here is my transition matrix.

to point out little differences in building a transition matrix (both are correct, one needs some special attention after calculations)

The Wizard's transition matrix (where rows sum to 1) starts with the 1st spin already completed.
I was taught to always start at 0 to make sure one does not forget to add 1 to calculations of the matrix.
(both methods are perfectly fine to use)

My TM is A, the Wizards is B (in the photo below - Wizard's values have been rounded down)
the column 1,2,3,4 is the row number and not the 'state name' for Matrix A but is correct for Matrix B
(Matrix A row names is just the row value - 1)


after raising the Wizards TM to the 146th power
(in the photo below)
we find the median (0.50141 - values have been rounded)
we must add 1 to 146 = 147 for the median (for the example 37 number Roulette)


distribution to only 160 spins
using R code section 3r.
https://sites.google.com/view/krapstuff/coupon-collecting
> tMax.dist.cum(37, 160)
Row Draw X Draw X Prob cumulative: (X or less)
[1,] 36 0 0
[2,] 37 1.30398646e-15 1.30398646e-15
[3,] 38 2.34717563e-14 2.47757428e-14
[4,] 39 2.18963997e-13 2.4373974e-13
[5,] 40 1.41020849e-12 1.65394823e-12
[6,] 41 7.04758973e-12 8.70153796e-12
[7,] 42 2.91274839e-11 3.78290219e-11
[8,] 43 1.0362069e-10 1.41449712e-10
[9,] 44 3.26113904e-10 4.67563616e-10
[10,] 45 9.26201149e-10 1.39376477e-09
[11,] 46 2.40983412e-09 3.80359888e-09
[12,] 47 5.81187695e-09 9.61547584e-09
[13,] 48 1.31152608e-08 2.27307366e-08
[14,] 49 2.79063823e-08 5.0637119e-08
[15,] 50 5.63461642e-08 1.06983283e-07
[16,] 51 1.08539739e-07 2.15523022e-07
[17,] 52 2.00382556e-07 4.15905578e-07
[18,] 53 3.55945139e-07 7.71850717e-07
[19,] 54 6.10432194e-07 1.38228291e-06
[20,] 55 1.01371507e-06 2.39599799e-06
[21,] 56 1.63439194e-06 4.03038993e-06
[22,] 57 2.56428073e-06 6.59467066e-06
[23,] 58 3.92320027e-06 1.05178709e-05
[24,] 59 5.86384932e-06 1.63817202e-05
[25,] 60 8.57655591e-06 2.49582762e-05
[26,] 61 1.22936442e-05 3.72519204e-05
[27,] 62 1.72931556e-05 5.4545076e-05
[28,] 63 2.39016655e-05 7.84467415e-05
[29,] 64 3.24959609e-05 0.000110942702
[30,] 65 4.35033766e-05 0.000154446079
[31,] 66 5.74006425e-05 0.000211846721
[32,] 67 7.47111458e-05 0.000286557867
[33,] 68 9.60005844e-05 0.000382558452
[34,] 69 0.000121871045 0.000504429497
[35,] 70 0.000152953612 0.000657383109
[36,] 71 0.000189899666 0.000847282775
[37,] 72 0.000233371083 0.00108065386
[38,] 73 0.000284029587 0.00136468345
[39,] 74 0.000342525541 0.00170720899
[40,] 75 0.000409486459 0.00211669545
[41,] 76 0.000485505566 0.00260220101
[42,] 77 0.000571130666 0.00317333168
[43,] 78 0.000666853627 0.0038401853
[44,] 79 0.000773100711 0.00461328601
[45,] 80 0.000890223971 0.00550350999
[46,] 81 0.0010184939 0.00652200389
[47,] 82 0.00115809345 0.00768009734
[48,] 83 0.00130911356 0.0089892109
[49,] 84 0.00147155014 0.010460761
[50,] 85 0.0016453027 0.0121060637
[51,] 86 0.00183017435 0.0139362381
[52,] 87 0.00202587342 0.0159621115
[53,] 88 0.00223201628 0.0181941278
[54,] 89 0.00244813147 0.0206422593
[55,] 90 0.00267366499 0.0233159243
[56,] 91 0.00290798647 0.0262239107
[57,] 92 0.0031503962 0.0293743069
[58,] 93 0.00340013282 0.0327744397
[59,] 94 0.00365638142 0.0364308212
[60,] 95 0.00391828208 0.0403491032
[61,] 96 0.00418493855 0.0445340418
[62,] 97 0.00445542691 0.0489894687
[63,] 98 0.00472880426 0.053718273
[64,] 99 0.00500411709 0.0587223901
[65,] 100 0.00528040947 0.0640027995
[66,] 101 0.00555673069 0.0695595302
[67,] 102 0.00583214262 0.0753916728
[68,] 103 0.00610572634 0.0814973992
[69,] 104 0.0063765884 0.0878739876
[70,] 105 0.00664386631 0.0945178539
[71,] 106 0.00690673349 0.101424587
[72,] 107 0.00716440359 0.108588991
[73,] 108 0.00741613413 0.116005125
[74,] 109 0.00766122955 0.123666355
[75,] 110 0.00789904366 0.131565398
[76,] 111 0.00812898147 0.13969438
[77,] 112 0.00835050049 0.14804488
[78,] 113 0.00856311152 0.156607992
[79,] 114 0.00876637894 0.165374371
[80,] 115 0.00895992057 0.174334291
[81,] 116 0.00914340706 0.183477698
[82,] 117 0.00931656105 0.192794259
[83,] 118 0.00947915584 0.202273415
[84,] 119 0.00963101392 0.211904429
[85,] 120 0.00977200518 0.221676434
[86,] 121 0.0099020449 0.231578479
[87,] 122 0.0100210917 0.241599571
[88,] 123 0.010129145 0.251728716
[89,] 124 0.010226243 0.261954959
[90,] 125 0.01031246 0.272267419
[91,] 126 0.0103879038 0.282655323
[92,] 127 0.0104527134 0.293108036
[93,] 128 0.0105070562 0.303615092
[94,] 129 0.0105511257 0.314166218
[95,] 130 0.0105851391 0.324751357
[96,] 131 0.0106093345 0.335360692
[97,] 132 0.0106239689 0.345984661
[98,] 133 0.0106293156 0.356613976
[99,] 134 0.0106256625 0.367239639
[100,] 135 0.0106133093 0.377852948
[101,] 136 0.0105925662 0.388445514
[102,] 137 0.0105637515 0.399009266
[103,] 138 0.0105271901 0.409536456
[104,] 139 0.0104832116 0.420019667
[105,] 140 0.0104321489 0.430451816
[106,] 141 0.0103743366 0.440826153
[107,] 142 0.0103101097 0.451136263
[108,] 143 0.0102398025 0.461376065
[109,] 144 0.0101637472 0.471539812
[110,] 145 0.0100822729 0.481622085
[111,] 146 0.00999570494 0.49161779
[112,] 147 0.00990436365 0.501522154
[113,] 148 0.00980856384 0.511330718
[114,] 149 0.00970861406 0.521039332
[115,] 150 0.00960481601 0.530644148
[116,] 151 0.00949746401 0.540141612
[117,] 152 0.00938684459 0.549528456
[118,] 153 0.00927323608 0.558801692
[119,] 154 0.00915690833 0.567958601
[120,] 155 0.00903812243 0.576996723
[121,] 156 0.00891713057 0.585913854
[122,] 157 0.00879417581 0.594708029
[123,] 158 0.00866949209 0.603377522
[124,] 159 0.00854330407 0.611920826
[125,] 160 0.00841582721 0.620336653


remember, we can only raise a square matrix to a power (as in B^146)
Enjoy
winsome johnny (not Win some johnny)
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 83
  • Posts: 3560
December 21st, 2018 at 2:08:01 PM permalink
How about a math proof?

Assume there are N numbers, and K of them have already come up at least once.
This is equivalent to, "If you have N balls, K of which are red and the other N-K are white, how many draws with replacement (i.e. when you draw a ball, you put it back) should it take before you draw a white ball?"

The probability of doing it in exactly D draws is (K / N)D-1 x (N - K) / N
= (KD-1 (N - K)) / ND
The expected number is
1 x (N - K) / N
+ 2 x K (N - K) / N2
+ 3 x K2 (N - K) / N3
+ 4 x K3 (N - K) / N4
+ ...
= (N - K) / N x (1 + 2 (K / N) + 3 (K / N)2 + 4 (K / N)3 + ...)
= (N - K) / N x (1 + (K / N) + (K / N)2 + (K / N)3 + ...)2
= (N - K) / N x (1 / (1 - (K / N))2, since K < N
= (N - K) / N x (1 / ((N - K) / N))2
= (N - K) / N x (N / (N - K))2
= (N - K) / N x N2 / (N - K)2
= N / (N - K)
At the start, K = 0; after each number is drawn for the first time, K increases by 1.
The total number is the number needed to get the first number + the number to get the
second different number once you have already drawn one + the number needed to get the
third different number once you have already drawn two different numbers + ... + the number
needed to get the Nth different number once you have already drawn N-1 different numbers
This is is N / N + N / (N-1) + N / (N-2) + ... + N / 2 + N
= N x (1 / N + 1 / (N-1) + ... + 1 / 3 + 1 / 2 + 1)


  • Jump to: