Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Gambling > Probability
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 02-04-2005, 02:04 PM
elitegimp elitegimp is offline
Junior Member
 
Join Date: Apr 2004
Location: boulder, CO
Posts: 14
Default Re: Gambling Probablility Question. Math Wiz Please Help!

[ QUOTE ]
<ul type="square">
Re: Gambling Probablility Question. Math Wiz Please Help! elitegimp 02/04/05 12:<font color="red">16</font> PM
Re: Gambling Probablility Question. Math Wiz Please Help! pzhon 02/04/05 12:<font color="red">17</font> PM [/list]Kicker!

[/ QUOTE ]

[img]/images/graemlins/smile.gif[/img]

I was talking with a friend of mine last night about this exact type problem, and was pretty excited to get a chance to use it.

I don't totally understand why your method works (i.e. ignoring the final stage and then adding the first column). Is it because the last row doesn't sum to one? So you've got the probability that you're in stage 1, the probability that you're in stage 2, and then since those don't sum to 1 you get a probability of not being in stage 1 or 2?
Reply With Quote
  #12  
Old 02-04-2005, 02:32 PM
DiceyPlay DiceyPlay is offline
Member
 
Join Date: Jul 2004
Posts: 98
Default Re: Gambling Probablility Question. Math Wiz Please Help!

Some of the answer depends on how you look at your trials.

Suppose you're dealt 4 hands. How many 2 hands in a row are there? 2 or 3?

Let the hands be denoted by 1 2 3 4

Do you group them like this:

(1 2)(2 3)(3 4)

or like this:

(1 2)(3 4)?

AnyWhichWay, if p(win)=.48 ===&gt; p(lose)=.52 ===&gt; p(not winning 2 in a row)=[p(lose)]^2=.52^2

so,

p(not winning 2 in a row n times in a row)=[.52^2]^n

Just figure out n and plug in.

(1 2)(2 3)(3 4) - n=3
(1 2)(3 4) - n=2

In the n=3 case there may be a problem though. Part of each trial plays a role in another trial. I don't know how to reconcile this. It has to do with applying probability calculations assuming independent events and these events are clearly not independent any longer. In the n=2 version this calculation is correct (unless I've made a mistake), in the n=3 version I'm pretty sure there's a problem - but it should be a pretty reasonable approximation.

Either way this should help a little - I hope?

-DP
Reply With Quote
  #13  
Old 02-04-2005, 03:01 PM
pzhon pzhon is offline
Member
 
Join Date: Mar 2004
Posts: 66
Default Re: Gambling Probablility Question. Math Wiz Please Help!

[ QUOTE ]

I don't totally understand why your method works (i.e. ignoring the final stage and then adding the first column). Is it because the last row doesn't sum to one? So you've got the probability that you're in stage 1, the probability that you're in stage 2, and then since those don't sum to 1 you get a probability of not being in stage 1 or 2?

[/ QUOTE ]
That's it. Your system conserves the probability 1. Stage 3 is a sink. I dropped it for simplicity, to have a 2x2 matrix, but the systems are essentially the same. In order not to be in stage 3, you have to be in either stage 1 or stage 2, so I added the probabilities for those.
Reply With Quote
  #14  
Old 02-04-2005, 03:50 PM
stocktrader23 stocktrader23 is offline
Junior Member
 
Join Date: Mar 2004
Posts: 1
Default Re: Gambling Probablility Question. Math Wiz Please Help!

Thanks everyone.
Reply With Quote
  #15  
Old 02-04-2005, 07:48 PM
maurile maurile is offline
Member
 
Join Date: Mar 2003
Posts: 95
Default Re: Gambling Probablility Question. Math Wiz Please Help!

[ QUOTE ]
Assuming a 48% chance of winning any given hand, what are the odds of NOT winning 2 in a row for 10, 20, etc hands? If someone could tell me how to figure this out it would be much appreciated.

[/ QUOTE ]
This involves doing a lot of counting.

Take the 10-trial case as an example.

The probability of playing 10 trials without ever winning two in a row is equal to the sum of the probabilities of all the ways it could happen.

For example, if there were just five ways it could happen and each way had a 1% chance of occuring, the total probability would be 5%.

As it happens, there are very many ways it could happen.

* There is one way to lose every time. (LLLLLLLLLL.) The probability of this happening is 0.52^10 = 0.001446.

* There are ten ways to win just just once. (WLLLLLLLLL, LWLLLLLLLL, LLWLLLLLLL, etc.) The probability for each of these is 0.52^9 * 0.48 = 0.001334. So the total probability of winning just once is 0.001334 * 10 = 0.01334.

*There are 45 ways to win twice (you can count them yourself, but it's 10 choose 2 = 45), but 9 of these involve winning twice in a row. So there are 36 ways to win twice without winning twice in a row. Each one has a chance of 0.52^8 * 0.48^2 = 0.001232. So there's a total probability of winning twice without winning twice in a row of 0.001232 * 36 = 0.044342.

* There are 10-choose-3 = 120 ways of winning three times, but 64 of these involve winning at least twice in a row. So there are 120 - 64 = 56 ways of winning three times without winning at least twice in a row. Each has a chance of 0.52^7 * 0.48^3 = 0.001137, for a total probability of 0.001137 * 56 = 0.06367.

* There are 210 ways of winning four times, and 252 ways of winning five times. You have to figure out how many of those involve winning at least twice in a row and subtract them out. Then multiply their probabilities by the resulting frequencies . . .

* You can't win six times without winning at least twice in a row, so you're done after you figure out the probabilities for four and five times.

We're at 12.28% so far (up through winning three times). My guess is that once we add the probabilities for winning four times and five times, we'd be at around 18%-19%. But you have to do a lot of counting to get there, and I can't think of an easy shortcut.
Reply With Quote
  #16  
Old 02-05-2005, 10:59 PM
BruceZ BruceZ is offline
Senior Member
 
Join Date: Sep 2002
Posts: 1,636
Default Simpler Solution Here for P(run of length m in n trials)

I have a simpler way to do this. The probability of winning 2 hands in a row at some time in N hands
P(N) obeys a simple recurrence relation:

P(1) = 0
P(2) = (.48)^2
P(3) = P(2) + 0.52*(0.48)^2
P(N) = P(N-1) + [1-P(N-3)]*(0.52)*(0.48)^2 for N &gt;= 4.

That is, the probability of it happening in the first N is the sum of the probability of it happening in the first N-1 plus the probability of it happening on the Nth hand after not happening earlier, but to happen on the Nth hand, it must NOT happen in the first N-3 hands, and then there must always be 1 loss followed by 2 wins.

This recurrence only requires saving a single number in memory, and the complexity does not increase with the number of consecutive wins as the Markov state model does. It produces the same values that you computed, 1-P(10) = 16.535%, 1-P(20) = 2.363%, and 1-P(50) = 0.006898%.

A long time ago, I derived another recurrence relation for doing these types of problems, and I posted it along with a Markov solution. These relations were interesting because of their relationship to the Fibonacci sequence, and because they are not all that well known. Today I went to see if I could still remember how I derived these, and instead I wrote down this new simpler relation since this time I had the benefit of knowing to look specifically for a recurrence relation. I was very surprised to find such a simple solution to this problem.

Pzhon and elite, please acknowledge that you read this since this thread will probably get buried now. Also, note that the BJ winning percentage is about 43% rather than 48%, with pushes accounting for about 9% and losses about 48%.
Reply With Quote
  #17  
Old 02-05-2005, 11:36 PM
gaming_mouse gaming_mouse is offline
Senior Member
 
Join Date: Oct 2004
Location: my hero is sfer
Posts: 2,480
Default Re: Simpler Solution Here for P(run of length m in n trials)

Bruce,

Very slick. Did you solve the recurrence relation by hand, or using a computer? If by hand, how did you do it?

Thanks,
gm
Reply With Quote
  #18  
Old 02-06-2005, 01:21 AM
pzhon pzhon is offline
Member
 
Join Date: Mar 2004
Posts: 66
Default Re: Simpler Solution Here for P(run of length m in n trials)

[ QUOTE ]
I have a simpler way to do this. The probability of winning 2 hands in a row at some time in N hands
P(N) obeys a simple recurrence relation:

P(1) = 0
P(2) = (.48)^2
P(3) = P(2) + 0.52*(0.48)^2
P(N) = P(N-1) + [1-P(N-3)]*(0.52)*(0.48)^2 for N &gt;= 4.

That is, the probability of it happening in the first N is the sum of the probability of it happening in the first N-1 plus the probability of it happening on the Nth hand after not happening earlier, but to happen on the Nth hand, it must NOT happen in the first N-3 hands, and then there must always be 1 loss followed by 2 wins.

This recurrence only requires saving a single number in memory, and the complexity does not increase with the number of consecutive wins as the Markov state model does.

[/ QUOTE ]
That is a nice recurrence, but to compute P(N) you use P(N-1) and P(N-3). If you were interested in avoiding streaks of length 100, you would have to save the last 101 probabilities.

An advantage of using the matrix method rather than the recursion is that it takes fewer steps to exponentiate a matrix to a high power than to apply the recursion many times. However, there is an extension of the ideas of the recursion that allows you to compute, for example, P(2N+1) and P(2N+2) from P(N) and P(N-1).

Let Q(N)=1-P(N) be the probability that there is no consecutive pair of wins in N trials.

Let p be the probability of a win. Let q=1-p be the probability of a loss.

Q(2N+1) = pq^2 Q(N-1)^2 + q Q(N)^2
Q(2N+2) = q^2 Q(N)^2 + 2pq^2 Q(N)Q(N-1)

Similar, but slightly more complicated expressions relate Q(A), Q(A-1), Q(B), Q(B-1), Q(A+B+1), and Q(A+B+2).

[ QUOTE ]

A long time ago, I derived another recurrence relation for doing these types of problems, and I posted it along with a Markov solution. These relations were interesting because of their relationship to the Fibonacci sequence, and because they are not all that well known.


[/ QUOTE ]
While you may have discovered these independently, this is a standard example in combinatorics. One way it is stated is that the number of ways of tiling a 2xn rectangle with dominoes is the nth Fibonacci number. (There is even a product formula for the number of ways of tiling an mxn rectangle with dominoes from 1961.)
Reply With Quote
  #19  
Old 02-06-2005, 02:44 AM
gaming_mouse gaming_mouse is offline
Senior Member
 
Join Date: Oct 2004
Location: my hero is sfer
Posts: 2,480
Default Re: Simpler Solution Here for P(run of length m in n trials)

[ QUOTE ]
One way it is stated is that the number of ways of tiling a 2xn rectangle with dominoes is the nth Fibonacci number.

[/ QUOTE ]

pzhon,

What is the relationship between the domino tilings and the recurrence relationship above. Interesting....
Reply With Quote
  #20  
Old 02-06-2005, 03:49 AM
pzhon pzhon is offline
Member
 
Join Date: Mar 2004
Posts: 66
Default Re: Simpler Solution Here for P(run of length m in n trials)

[ QUOTE ]
[ QUOTE ]
One way it is stated is that the number of ways of tiling a 2xn rectangle with dominoes is the nth Fibonacci number.

[/ QUOTE ]

[/ QUOTE ]
Oops, I think I used the wrong index. That should be the n+1st Fibonacci number if F(0)=0.

[ QUOTE ]

What is the relationship between the domino tilings and the recurrence relationship above. Interesting....

[/ QUOTE ]
If you tile a 2xn strip with dominoes, the dominoes look like ==|==||. As you move across the strip, you see one vertical or two horizontal dominoes at a time. The vertical dominoes take up 1 horizontal unit while the horizontal pairs take up 2 horizontal units.

If you have no 2 wins in a row, it means your winning streaks (between the losses) have length 0 or 1, so a winning streak followed by a loss has length 1 or 2.

A related fact: If you sum the entries of Pascal's triangle along a slanted line, you can get Fibonacci numbers: 8C0 + 7C1 + 6C2 + 5C3 + 4C4 = 34 = F(9). The terms are related to a choice for the number of horizontal blocks, or wins.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.