Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 2:30:46 AM permalink
There is an online casino promotion where you pre-choose one roulette number and every time you hit your number the casino pays $20 extra on top of your winnings up to three times. This promotion can be repeated every week.

Now the best strategy is to choose one number and make minimum bet on that number until it hits three times and then ask for $60 bonus. Given that the mean number of spins to hit any number is 37, it seems that the mean number of spins required to hit the desired number three times is 3 x 37 = 111.

However I am curious what is the probability distribution around this mean? I suppose it could be a simple analytical function. And what is the standard deviation around this mean, in other words how long session of spins should I prepare to see in a bad run?
FleaStiff
FleaStiff
  • Threads: 265
  • Posts: 14484
Joined: Oct 19, 2009
April 14th, 2011 at 4:51:29 AM permalink
Quote: Jufo81

There is an online casino promotion where you pre-choose one roulette number and every time you hit your number...


Okay. My first thoughts relate to "online" roulette wheels. Are they different? Is there a camera and a real wheel involved? I'd be hard pressed to trust an online casino to "spin" a fair wheel.

A player obviously has to declare his Special Number but must he also bet on it?

What the casino is really offering is an extra 20.00 everytime you bet on this number and it wins up to three times a week
Well, a "free" twenty dollars to induce you to play is a fine promotion but I'd have to overcome my nagging doubts about just how honest an electronic roulette wheel is.
dwheatley
dwheatley
  • Threads: 25
  • Posts: 1246
Joined: Nov 16, 2009
April 14th, 2011 at 5:07:02 AM permalink
EDIT: Upon rereading, I realized it's not binomial, it's negative binomial with r = 3, p =37/38.

The density function pr( K = k ) = (k + r - 1) Choose k * p^k * (1-p)^(r)

Put that in excel next to all the values for k = 3 to ~300 and graph it out. (you can cheat and use =negbinomdist() )

Then you can see the distribution. Nifty.

The variance is pr / (1-p)^2, so the st.dev. is 64.9
Wisdom is the quality that keeps you out of situations where you would otherwise need it
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 8:21:33 AM permalink
Quote: FleaStiff

Okay. My first thoughts relate to "online" roulette wheels. Are they different? Is there a camera and a real wheel involved? I'd be hard pressed to trust an online casino to "spin" a fair wheel.



Yes, it is a live Roulette promotion ie. live wheel. They could hardly cheat unless they showed pre-recorded footage but I doubt it.

Quote: FleaStiff

A player obviously has to declare his Special Number but must he also bet on it?



Yes he must bet a minimum of $1 on the selected number. So every time the number hits he is paid the normal $36 plus $20 extra as a bonus (which has to be turned over 5 times before cashing out).

Quote: FleaStiff


What the casino is really offering is an extra 20.00 everytime you bet on this number and it wins up to three times a week
Well, a "free" twenty dollars to induce you to play is a fine promotion but I'd have to overcome my nagging doubts about just how honest an electronic roulette wheel is.



My results have been okay. Last weekend it took me maybe 125 spins to hit the chosen number three times where the expectation is 3x37 = 111 spins. One spin takes about 2 minutes, so doing 111 spins takes a good deal of time (~4 hours) and it is quite boring to repeat the same $1 bet 111 times.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 8:27:42 AM permalink
Quote: dwheatley

EDIT: Upon rereading, I realized it's not binomial, it's negative binomial with r = 3, p =37/38.

The density function pr( K = k ) = (k + r - 1) Choose k * p^k * (1-p)^(r)

Put that in excel next to all the values for k = 3 to ~300 and graph it out. (you can cheat and use =negbinomdist() )

Then you can see the distribution. Nifty.

The variance is pr / (1-p)^2, so the st.dev. is 64.9



The roulette is European single zero so I think p = 36/37 rather than p = 37/38? Could you also show the reasoning how you determined the distribution is negative binomial?
dwheatley
dwheatley
  • Threads: 25
  • Posts: 1246
Joined: Nov 16, 2009
April 14th, 2011 at 8:56:25 AM permalink
Negative binomial counts the number of trials until you have r 'failures'. In this case, the failures are hitting your number (poor choice of words, I suppose). The probability of success (not hitting your number) is 36/37 (single-0).

So, the negative binomial with r=3 gives probability of having k trials until the 3rd failure (hit your number).
Wisdom is the quality that keeps you out of situations where you would otherwise need it
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 8:58:52 AM permalink
Quote: dwheatley

Negative binomial counts the number of trials until you have r 'failures'. In this case, the failures are hitting your number (poor choice of words, I suppose). The probability of success (not hitting your number) is 36/37 (single-0).

So, the negative binomial with r=3 gives probability of having k trials until the 3rd failure (hit your number).



Ok, cool thanks.
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
April 14th, 2011 at 11:43:38 AM permalink
Quote: dwheatley

EDIT: Upon rereading, I realized it's not binomial, it's negative binomial with r = 3, p =37/38.

The density function pr( K = k ) = (k + r - 1) Choose k * p^k * (1-p)^(r)

Put that in excel next to all the values for k = 3 to ~300 and graph it out. (you can cheat and use =negbinomdist() )

Then you can see the distribution. Nifty.

The variance is pr / (1-p)^2, so the st.dev. is 64.9


Upon reading the OP question I see it as binomial.
dwheatley approach shows a distribution that matches a binomials but with different probabilities.

These type of questions sometime make my head spin since there appears to be 2 ways to look at the question.
My son(a math genius) recently showed me when and how to use binomial and negbinomial functions in Excel, maybe I did not understand it well.. And since he is on spring break I would feel foolish on calling him for the correct use, but my sims and software seem to show binomial is the right approach.

We all should agree that the average number of spins is 111. 1 success would be 1/p so 3 would be 3/p or 3/(1/37) = 111.
From Winstats:
Binomial-Success Distribution
A binomial experiment is repeated until a specified number of successes have occurred. The random variable X is the number of trials necessary. There are two parameters for this distribution -- the probability p of success on each trial, and the awaited number of successes k.

Using Winstats,(anyone can download and use for free)I come up with a SD of 63.2139 and my 1 million sim also shows variance of 4002.46, sd 63.26.
I could still be wrong but I look for a good reason why the OP Q is NOT a binomial one.

where x=#of trials =3 a binomial function returns 0.000019742167 (simulation shows 0.000022) as the probability of 3 successes in 3 trials, where a negbinomial function returns 0.000181843
X=3 successes.
here is the binomial distribution for 200 trials
Column 1 is exact and column 4(prob[X<=x]) is cumulative (or less)
Median is 99
Mode:74,75
data deleted
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 12:18:36 PM permalink
Quote: guido111

Upon reading the OP question I see it as binomial.
dwheatley approach shows a distribution that matches a binomials but with different probabilities.



My first thought was also that the answer is binomial. However, I quickly realized it cannot be. Here's why:

Binomial distribution answers the question: Given K spins, what is the probability that it includes those 3 hits on the chosen number. For example your table shows that if I make 111 spins (mean number of spins) then there is a 0.57988 probability that I have hit the number exactly three times within those spins.

But the situation here is slightly different as the LAST spin is always the winning one. After I have hit my lucky number three times and collected the $60 reward there is no point for me to keep on playing that negative expectation game. So now the number of spins is not fixed anymore (like it would be with binomial distribution) but a variable parameter.

The Wikipedia page of Negative binomial (http://en.wikipedia.org/wiki/Negative_binomial) describes the same thing (see the first paragraph) so I am pretty sure the it is the correct distribution here.

I am currently experimenting the negative binomial distribution in Excel and I'll post the results soon.
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
April 14th, 2011 at 12:42:59 PM permalink
Quote: Jufo81

My first thought was also that the answer is binomial. However, I quickly realized it cannot be. Here's why:

Binomial distribution answers the question: Given K spins, what is the probability that it includes those 3 hits on the chosen number. For example your table shows that if I make 111 spins (mean number of spins) then there is a 0.57988 probability that I have hit the number exactly three times within those spins.

But the situation here is slightly different as the LAST spin is always the winning one. After I have hit my lucky number three times and collected the $60 reward there is no point for me to keep on playing that negative expectation game. So now the number of spins is not fixed anymore (like it would be with binomial distribution) but a variable parameter.

The Wikipedia page of Negative binomial (http://en.wikipedia.org/wiki/Negative_binomial) describes the same thing (see the first paragraph) so I am pretty sure the it is the correct distribution here.

I am currently experimenting the negative binomial distribution in Excel and I'll post the results soon.


I am not disagreeing with anyone also.
I also await a better explanation.

My simulation I did in Winstats has these rules of the simulation.
"From Winstats:
Binomial-Success Distribution
A binomial experiment is repeated until a specified number of successes have occurred. The random variable X is the number of trials necessary. There are two parameters for this distribution -- the probability p of success on each trial, and the awaited number of successes k."

Where the number of trials IS a random variable. My sim results match almost perfectly with a binomial function.

edit: I see that my results are shifted 1 trial up. Your example at 111 spins is my sim result at 110 spin.
I like the example in wikipedia.
I rest for now.

data deleted
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 12:51:12 PM permalink
Ok here are my numbers using negative binomial distribution in Excel. K is the number of total spins required to hit number three times, so K starts at 3. I also calculated the profit from for each possible number of total spins (the maximum profit is 3 x $35 + $60 bonus and goes down one unit with each missed spin).

EDIT: Whoops, I made a typing error. Here is the correct table:

The table shows that the median is 99 spins (50% of sessions end with 98 spins or less). To end up with a profit from this promotion the third hit has to occur by 168th spin and there is a 83.5% probability to end up with profit or break-even. There is only a 9.3% chance to having to make 200+ spins:


K P (spins = K) P (spins <= K) Net Result
3 1,97422E-05 1,97422E-05 $165,00
4 5,76258E-05 7,7368E-05 $164,00
5 0,000112137 0,000189505 $163,00
6 0,000181843 0,000371348 $162,00
7 0,000265393 0,000636741 $161,00
8 0,000361508 0,000998249 $160,00
9 0,000468983 0,001467232 $159,00
10 0,000586682 0,002053914 $158,00
11 0,000713532 0,002767446 $157,00
12 0,000848525 0,003615971 $156,00
13 0,00099071 0,004606681 $155,00
14 0,001139195 0,005745876 $154,00
15 0,00129314 0,007039016 $153,00
16 0,001451758 0,008490774 $152,00
17 0,00161431 0,010105084 $151,00
18 0,001780104 0,011885188 $150,00
19 0,001948492 0,01383368 $149,00
20 0,002118869 0,015952549 $148,00
21 0,002290669 0,018243219 $147,00
22 0,002463366 0,020706584 $146,00
23 0,002636467 0,023343051 $145,00
24 0,002809517 0,026152568 $144,00
25 0,002982092 0,02913466 $143,00
26 0,003153799 0,032288459 $142,00
27 0,003324274 0,035612733 $141,00
28 0,003493183 0,039105916 $140,00
29 0,003660217 0,042766133 $139,00
30 0,003825092 0,046591224 $138,00
31 0,003987547 0,050578771 $137,00
32 0,004147346 0,054726118 $136,00
33 0,004304273 0,059030391 $135,00
34 0,004458131 0,063488522 $134,00
35 0,004608744 0,068097265 $133,00
36 0,004755952 0,072853217 $132,00
37 0,004899613 0,07775283 $131,00
38 0,005039602 0,082792432 $130,00
39 0,005175807 0,08796824 $129,00
40 0,005308133 0,093276372 $128,00
41 0,005436494 0,098712867 $127,00
42 0,005560822 0,104273688 $126,00
43 0,005681056 0,109954744 $125,00
44 0,005797148 0,115751893 $124,00
45 0,005909063 0,121660955 $123,00
46 0,00601677 0,127677725 $122,00
47 0,006120253 0,133797978 $121,00
48 0,0062195 0,140017478 $120,00
49 0,00631451 0,146331988 $119,00
50 0,006405288 0,152737276 $118,00
51 0,006491846 0,159229122 $117,00
52 0,006574202 0,165803324 $116,00
53 0,006652382 0,172455706 $115,00
54 0,006726415 0,179182121 $114,00
55 0,006796336 0,185978457 $113,00
56 0,006862185 0,192840643 $112,00
57 0,006924007 0,19976465 $111,00
58 0,006981849 0,206746498 $110,00
59 0,007035763 0,213782261 $109,00
60 0,007085804 0,220868064 $108,00
61 0,00713203 0,228000094 $107,00
62 0,007174502 0,235174596 $106,00
63 0,007213283 0,242387879 $105,00
64 0,007248438 0,249636317 $104,00
65 0,007280036 0,256916353 $103,00
66 0,007308144 0,264224497 $102,00
67 0,007332834 0,27155733 $101,00
68 0,007354177 0,278911507 $100,00
69 0,007372246 0,286283753 $99,00
70 0,007387115 0,293670868 $98,00
71 0,007398859 0,301069728 $97,00
72 0,007407554 0,308477281 $96,00
73 0,007413274 0,315890555 $95,00
74 0,007416096 0,323306651 $94,00
75 0,007416096 0,330722747 $93,00
76 0,00741335 0,338136097 $92,00
77 0,007407935 0,345544032 $91,00
78 0,007399926 0,352943958 $90,00
79 0,0073894 0,360333359 $89,00
80 0,007376432 0,367709791 $88,00
81 0,007361096 0,375070887 $87,00
82 0,007343468 0,382414355 $86,00
83 0,007323621 0,389737975 $85,00
84 0,007301628 0,397039603 $84,00
85 0,007277562 0,404317165 $83,00
86 0,007251494 0,411568659 $82,00
87 0,007223496 0,418792155 $81,00
88 0,007193638 0,425985793 $80,00
89 0,007161987 0,43314778 $79,00
90 0,007128614 0,440276394 $78,00
91 0,007093584 0,447369978 $77,00
92 0,007056963 0,454426941 $76,00
93 0,007018818 0,461445759 $75,00
94 0,00697921 0,468424969 $74,00
95 0,006938204 0,475363173 $73,00
96 0,006895861 0,482259035 $72,00
97 0,006852242 0,489111277 $71,00
98 0,006807405 0,495918682 $70,00
99 0,006761409 0,502680091 $69,00
100 0,006714311 0,509394401 $68,00
101 0,006666166 0,516060568 $67,00
102 0,00661703 0,522677598 $66,00
103 0,006566955 0,529244553 $65,00
104 0,006515994 0,535760547 $64,00
105 0,006464198 0,542224744 $63,00
106 0,006411616 0,54863636 $62,00
107 0,006358296 0,554994656 $61,00
108 0,006304288 0,561298944 $60,00
109 0,006249636 0,56754858 $59,00
110 0,006194385 0,573742965 $58,00
111 0,00613858 0,579881544 $57,00
112 0,006082262 0,585963807 $56,00
113 0,006025475 0,591989281 $55,00
114 0,005968257 0,597957538 $54,00
115 0,005910648 0,603868187 $53,00
116 0,005852687 0,609720874 $52,00
117 0,00579441 0,615515283 $51,00
118 0,005735853 0,621251136 $50,00
119 0,005677051 0,626928187 $49,00
120 0,005618038 0,632546225 $48,00
121 0,005558847 0,638105072 $47,00
122 0,005499508 0,64360458 $46,00
123 0,005440054 0,649044635 $45,00
124 0,005380514 0,654425149 $44,00
125 0,005320916 0,659746064 $43,00
126 0,005261288 0,665007352 $42,00
127 0,005201657 0,670209009 $41,00
128 0,005142049 0,675351058 $40,00
129 0,005082488 0,680433546 $39,00
130 0,005023 0,685456546 $38,00
131 0,004963606 0,690420152 $37,00
132 0,00490433 0,695324482 $36,00
133 0,004845192 0,700169674 $35,00
134 0,004786214 0,704955889 $34,00
135 0,004727416 0,709683304 $33,00
136 0,004668815 0,71435212 $32,00
137 0,004610432 0,718962551 $31,00
138 0,004552282 0,723514833 $30,00
139 0,004494383 0,728009217 $29,00
140 0,004436752 0,732445969 $28,00
141 0,004379402 0,736825371 $27,00
142 0,00432235 0,741147721 $26,00
143 0,004265609 0,74541333 $25,00
144 0,004209192 0,749622522 $24,00
145 0,004153112 0,753775634 $23,00
146 0,004097381 0,757873015 $22,00
147 0,004042011 0,761915027 $21,00
148 0,003987013 0,76590204 $20,00
149 0,003932396 0,769834436 $19,00
150 0,003878171 0,773712607 $18,00
151 0,003824347 0,777536955 $17,00
152 0,003770933 0,781307887 $16,00
153 0,003717936 0,785025823 $15,00
154 0,003665364 0,788691187 $14,00
155 0,003613225 0,792304412 $13,00
156 0,003561526 0,795865938 $12,00
157 0,003510272 0,79937621 $11,00
158 0,003459469 0,802835679 $10,00
159 0,003409124 0,806244803 $9,00
160 0,00335924 0,809604042 $8,00
161 0,003309822 0,812913864 $7,00
162 0,003260875 0,81617474 $6,00
163 0,003212403 0,819387142 $5,00
164 0,003164408 0,822551551 $4,00
165 0,003116895 0,825668445 $3,00
166 0,003069865 0,82873831 $2,00
167 0,003023321 0,831761631 $1,00
168 0,002977265 0,834738896 $0,00
169 0,0029317 0,837670596 -$1,00
170 0,002886626 0,840557222 -$2,00
171 0,002842045 0,843399267 -$3,00
172 0,002797958 0,846197225 -$4,00
173 0,002754365 0,848951589 -$5,00
174 0,002711266 0,851662856 -$6,00
175 0,002668663 0,854331519 -$7,00
176 0,002626555 0,856958074 -$8,00
177 0,002584941 0,859543015 -$9,00
178 0,002543822 0,862086837 -$10,00
179 0,002503196 0,864590033 -$11,00
180 0,002463062 0,867053095 -$12,00
181 0,00242342 0,869476514 -$13,00
182 0,002384267 0,871860782 -$14,00
183 0,002345604 0,874206385 -$15,00
184 0,002307427 0,876513812 -$16,00
185 0,002269735 0,878783546 -$17,00
186 0,002232526 0,881016072 -$18,00
187 0,002195798 0,883211871 -$19,00
188 0,002159549 0,88537142 -$20,00
189 0,002123776 0,887495196 -$21,00
190 0,002088477 0,889583673 -$22,00
191 0,002053649 0,891637322 -$23,00
192 0,00201929 0,893656612 -$24,00
193 0,001985395 0,895642007 -$25,00
194 0,001951964 0,897593971 -$26,00
195 0,001918991 0,899512962 -$27,00
196 0,001886475 0,901399437 -$28,00
197 0,001854412 0,903253849 -$29,00
198 0,001822798 0,905076647 -$30,00
199 0,001791631 0,906868278 -$31,00
200 0,001760906 0,908629183 -$32,00
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 1:16:19 PM permalink
Quote: guido111



My simulation I did in Winstats has these rules of the simulation.
"From Winstats:
Binomial-Success Distribution
A binomial experiment is repeated until a specified number of successes have occurred. The random variable X is the number of trials necessary. There are two parameters for this distribution -- the probability p of success on each trial, and the awaited number of successes k."

Where the number of trials IS a random variable. My sim results match almost perfectly with a binomial function.



That description sounds like it IS negative binomial distribution, so it seems like you were using negative binomial anyway. For example binomial distribution for k = 100 trials, n = 3 successes and p=1/37 has a value of 0.22381 which is not the value you got. Your values are very close to mine but slightly different though.
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
April 14th, 2011 at 1:33:31 PM permalink
Quote: Jufo81

That description sounds like it IS negative binomial distribution, so it seems like you were using negative binomial anyway. For example binomial distribution for k = 100 trials, n = 3 successes and p=1/37 has a value of 0.22381 which is not the value you got. Your values are very close to mine but slightly different though.

Thanks!
I got it now.
You still going after the promotion?

Dummy me.
added: binomial function is only concerned with successes in n trials, where negbinomial is concerned with both failures and successes and ending on the final success.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 14th, 2011 at 1:43:18 PM permalink
Quote: guido111

Thanks!
I got it now.
You still going after the promotion?



Sure, it is expected profit of more than $50 per week so why not? I already played two weeks and reached close to expected results. The only downside is the several hours required to make the spins but it might be possible to use autoclicker and watch a movie while doing it ;)
Doc
Doc
  • Threads: 46
  • Posts: 7287
Joined: Feb 27, 2010
April 14th, 2011 at 3:12:09 PM permalink
Quote: Jufo81

Ok here are my numbers using negative binomial distribution in Excel. K is the number of total spins required to hit number three times, so K starts at 3. I also calculated the profit from for each possible number of total spins (the maximum profit is 3 x $35 + $60 bonus and goes down one unit with each missed spin). ...


I'm certainly not going to get into discussion about these distributions, but for this expression to give your profit, aren't you assuming that your first two spins are for free? I would have reduced each number in your fourth column by $2; i.e., profit for success after three spins would be $163.
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
April 14th, 2011 at 5:37:57 PM permalink
Quote: Doc

I'm certainly not going to get into discussion about these distributions


The discussion is actually quite simple.

Thanks to dwheatley for the solution and the reason why.
Good job Jufo81.

I got messed up since I never used negbidist() in Excel. Now I do.
Here are 3 screen shots of my Excel worksheet with optional formulas using the binomial()

Using Jufo81 example

And using the NEGBINOMDIST()
C4 formula is shown at top


Using the BINOMDIST()
D4 formula is shown at top


To calculate the cumulative probability directly is the 5th column Using the BINOMDIST()
13 trials / 10 failures: 1 - BINOMDIST(3-1,10+3,1/37,TRUE) = 0.004606681
E4 formula is shown at top


Enjoy
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 15th, 2011 at 3:14:28 AM permalink
Quote: Doc

I'm certainly not going to get into discussion about these distributions, but for this expression to give your profit, aren't you assuming that your first two spins are for free? I would have reduced each number in your fourth column by $2; i.e., profit for success after three spins would be $163.



No. The maximum win occurs if the very first three spins are on the selected number (the odds for this is (1/37)^3 = 1.974E-5 which matches the value of the first row in my table) and it pays 3 x $36 + $60 bonus = $168. Subtracting the $3 in bets yields +$165.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 15th, 2011 at 3:18:26 AM permalink
Quote: guido111


Dummy me.
added: binomial function is only concerned with successes in n trials, where negbinomial is concerned with both failures and successes and ending on the final success.



Yep, regular binomial keeps total number of spins N (=trials) fixed where the number of successes is a variable and summing across all numbers of successes k=0,1,...N adds to probability 1. Whereas with negative binomial the number of successes (or failures) k is fixed and the number of spins N (=number of trials) is variable and summing across all values of trials N=k,k+1,... adds to probability 1. Of course both of these are binomial expressions but they measure different things. You already know this but I just thought I clarify for other readers.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 15th, 2011 at 3:32:48 AM permalink
Quote: guido111

The discussion is actually quite simple.

Thanks to dwheatley for the solution and the reason why.
Good job Jufo81.

I got messed up since I never used negbidist() in Excel. Now I do.
Here are 3 screen shots of my Excel worksheet with optional formulas using the binomial()



Yep, your Excel values seem to be identical to my table above.

As an additional note, the Wikipedia page (http://en.wikipedia.org/wiki/Negative_binomial_distribution) also has the equation to calculate the cumulative probability without having to add up the values in Excel. The formula for cumulative distribution is:

NB(k) = 1 - Ip (k-r+1,r)

where k = number of spins, r = number of failures (=3), and Ip is regularized incomplete beta function relative to probability p = 36/37. This function has to be evaluated numerically, which can be done here:

http://functions.wolfram.com/webMathematica/FunctionEvaluation.jsp?name=BetaRegularized

So, using the numerical evaluator, for example plugging in values z = 36/37, a = 100 - 3 + 1 = 98, b = 3, gives Ip = 0.490606
and thus NB(100) = 1 - 0.490606 = 0.509394, which perfectly matches the cumulative value of the k=100 row in the Excel table. So this seems to be a handy way of calculating the cumulative probability directly withouth having to sum the rows in Excel.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
April 17th, 2011 at 7:38:40 AM permalink
This weekends results:

20 missed spins
1 spin hit selected number
74 missed spins
1 spin hit selected number
26 missed spins
1 spin hit selected number -> End

So in total 123 spins made. Probability distribution table shows that there was 64.36% chance to do better and a 35.64% chance to do equally or worse, so I hope I will get a better run next week although this week wasn't as terrible as it could have been.
  • Jump to: