On Fri, Sep 25, 2009 at 5:16 PM, Semih Ozkoseoglu

[email protected]wrote:

I get the exact same results with you but what I dont understand is why

Here is the formatted explanation:

http://img38.imageshack.us/img38/8939/roulette.png

And for completeness sake, here is a the unformatted explanation:

Okay, so you are adding 1 for every win (w), and subtracting one for

every

loss (l), which gives n*w-n*l , which can be simplified to n(w-l) So for

a

pair of win and loss, at some given number of attempts, n, we get the

formula.

[math]f(w,l) = n(w-l)[/math]

You want to know why it’s value is approximately twice as large, so

let’s

compare the two functions by dividing them. We will calculate f for

bet_rand

and bet_red, and divide them by eachother.

First we need to find the likelihood of winning and losing, our w and l,

for

bet_rand and bet_red.

bet_rand compares color_01 and color_02, each of which are randomly

selected

from values 0 through 36 (thirty seven possible values). So there is a 1

in

37 chance of color_01 being zero, and for that case, there is a 1 in 37

chance of color_02 being zero. And there is an 18 in 37 chance of

color_01

being red, and a 18 in 37 chance of color_02 being red. And there is an

18

in 37 chance of color_01 being black, and a 18 in 37 chance of color_02

being black.

So this gives us [math]\frac{18}{37} * \frac{18}{37} + \frac{18}{37} *

\frac{18}{37} + \frac{1}{37} * \frac{1}{37}[/math]

Which comes out to [math]\frac{649}{1369}[/math]

And the likelihood of losing is l = 1 - w =

[math]\frac{720}{1369}[/math]

Now, for bet_red, color_01 will always be red. So there is a 0 in 37

chance

of color_01 being zero, and for that case, there is a 1 in 37 chance of

color_02 being zero. And there is an 37 in 37 chance of color_01 being

red

(because it is manually set to red), and a 18 in 37 chance of color_02

being

red. And there is an 0 in 37 chance of color_01 being black, and a 18 in

37

chance of color_02 being black.

So this gives us [math]\frac{37}{37} * \frac{18}{37} + \frac{0}{37} *

\frac{18}{37} + \frac{0}{37} * \frac{1}{37}[/math]

Which comes out to [math]\frac{18}{37}[/math]

And the likelihood of losing is l = 1 - w = [math]\frac{19}{37}[/math]

So now we have our probabilities to feed the function.

Now, we need to find a meaningful way to compare them. What we will do

is

compare their values for some given n, we noticed that bet_rand seemed

to

grow about twice as fast as bet_red. So we will divide bet_rand’s limit

as n

approaches infinity by bet_red’s, and see if it comes out to about 2.

This

gives us

Our formula

[math]d(w,l) =

\frac{f(w_{bet_rand},l_{bet_rand})}{f(w_{bet_rand},l_{bet_rand})}[/math]

Fill in the values.

[math]=

\frac{f(\frac{649}{1369},\frac{720}{1369})}{f(\frac{18}{37},\frac{19}{37})}[/math]

Substitute the value of f(w,l)

[math]=

\frac{n(\frac{649}{1369}-\frac{720}{1369})}{n(\frac{18}{37}-\frac{19}{37})}[/math]

At this point, we can see that the value of n is irrelevant, as it

cancels

itself out.

[math]=

\frac{(\frac{649}{1369}-\frac{720}{1369})}{(\frac{18}{37}-\frac{19}{37})}[/math]

And simplifying, we get.

[math]= \frac{71}{37}[/math]

[math]\approx 1.91891891891892[/math]

So we have shown that we can expect bet_rand to grow (in a negative

direction) about 1.92 times quicker than bet_red.