wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> Making money in Roulette
(Message started by: grad on Jul 30th, 2008, 12:21am)

Title: Making money in Roulette
Post by grad on Jul 30th, 2008, 12:21am
I go to a casino and I want to play French roulette. The wheel has 37 slots representing 36 numbers and one zero. I only make an even money bet, such as red or black or odd or even, so my odds of winning are 18 out of 37.
I only bet $50 per turn, so if I win I get back $100.
I have $1000 and I will play until I lose them all OR until I win $500 more, that is $1500 in total.

What is the probability that I leave the casino as a winner?

I haven't solve this riddle and I do not know the answer. So I post it in the hard forum.

Title: Re: Making money in Roulette
Post by towr on Jul 30th, 2008, 6:18am
[hide]
You can use the following recursion:
P(K, X) = 1   if K>=X
P(0, X) = 0   if X>0
P(K, X) = 18/37 * P(K+1, X) + 19/37 * P(K-1, X)   if 0<K<X

And the value you want is P(20, 30)
Pretty simple to have a computer write out, and even doing it by hand is feasible.


P(30, 30) = 1
P(29, 30) = 18/37 * 1 + 19/37 * P(28, 30)
P(28, 30) = 18/37 * (18/37 + 19/37 * P(28, 30)) + 19/37 * P(27, 30)
 ==>  P(28, 30) = 324/1027 + 703/1027 * P(27, 30)
etc
[/hide]

Title: Re: Making money in Roulette
Post by towr on Jul 31st, 2008, 1:16am
Finishing things off (and hoping I haven't made any mistakes in the process)

[hideb]In general, if we make forwards steps with probability a<0.5 (and backwards with probability (1-a)), we have the recursion
p(n) = a p(n+1) + (1-a) p (n-1)
 ==>
a p(n+1) - p(n) + (1-a) p (n-1)=0

For which we can find a closed solution by solving
a ln+1 - ln + (1-a) ln-1=0  [edit]typo in second term pointed out by Hippo corrected[/edit]
==>
l = [1 +/- sqrt(1 - 4 a(1-a))] / (2a)
 = [1 +/- (2a-1)] / (2a)

l1 = 1, l2 = (1-a)/a

The general solution is p(n) = A l1 + B l2n = A + B l2n, for some constants A and B
From our starting point 0 and end point e, we can find the value of these constants
p(0) = 0  ==>  A=-B
p(e) = 1  ==>  B=1/(le-1)  [where we take l=l2 for brevity]

Which gives the closed solution: p(n) = [ln - 1] / [le - 1]

In our particular case, l = 19/18, e=30, n=20
So p(20) = [(19/18)20 - 1] / [(19/18)30 - 1] ~= 0.4796
[/hideb]

Title: Re: Making money in Roulette
Post by Grimbal on Jul 31st, 2008, 2:58am
That matches my simulation in Excel.

Title: Re: Making money in Roulette
Post by Hippo on Aug 1st, 2008, 6:50pm
Good job, towr

(just small typo a ln)



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board