PDA

View Full Version : Seeing the same flop


MickeyHoldem
11-22-2004, 11:01 AM
During my last trip to my local casino the dealer flopped the same cards twice in a row. (they weren't in the same order) This led to an interesting discussion on the odds of this happening again. To make a long story short... we all agreed it was remote! (odds withheld to protect the ignorant) /images/graemlins/grin.gif

A more interesting discussion insued about how long you would have to play before you had an even money (or better) chance of seeing 2 identical flops during the same session. (not necessarily back to back) Assume you see 30 flops an hour <insert chuckles here>, how long do you have to play? (assume order does NOT matter)

gaming_mouse
11-22-2004, 12:17 PM
There are nCr(52,5)= 2598960 possible flops.

After n hands, we will have nCr(n,2) "attempts" at having two identical flops. Let nCr(n,2) = x.

Then, for a very close approximation to the solution, we need to solve:

1 - (2598959/2598960)^x = .5
(2598959/2598960)^x = .5
x*log(2598959/2598960) = log(.5)
x= log(.5)/log(2598959/2598960)
x= 1801461.44989

Returning to the definition of x, we solve for n:

(n^2 - n) = 3602922.89978
n^2 - n -3602922.89978 = 0

The positive solution is 949.56

At 30 hands/hr, that means you'll see the same flop about once every 31 hours.

gm

EDIT: woops. i made an arithemetic error calculating the logs the first time. Adjustments are above.

MickeyHoldem
11-22-2004, 12:38 PM
[ QUOTE ]
There are nCr(52,5)= 2598960 possible flops.

[/ QUOTE ]

looking at flops... not boards!

BruceZ
11-22-2004, 12:55 PM
This is the birthday problem with C(52,3) = 22100 days in the year. Solve

[ 22100*22099*22098*...*(22100-n+1) ] / 22100^n = 0.5

Your apporoximation seems to work well for the normal b-day problem.

gaming_mouse
11-22-2004, 12:57 PM
Oh, got you.

NOTE: I think I still have arithmetic errors in the above solution anyway. x should be 1898

Anyway, I will redo the solution for flops.

nCr(52,3) = 22100, call this number "f", for number of flops.

Then, this time doing an exact rather than an approximate solution, we find the first x such that:

1 - ((f-1)/f)*((f-2)/f)*...*((f-x)/f) > .5

I wrote a simple Java program that gives us x = 175.

Shockingly, that gives us n between 19 and 20.

I find this quite hard to believe. Can anyone verify this?

gm

BruceZ
11-22-2004, 01:09 PM
[ QUOTE ]
Shockingly, that gives us n between 19 and 20.

I find this quite hard to believe. Can anyone verify this?

gm

[/ QUOTE ]

I can verify that it's wrong. f=365 gives n=23 for the b-day problem, so it can't be 20 for f=22,100. I quickly found that n=70 gives 11%, and after that the intermediate values blow up in Excel, so you need a better program to get to 50%.

gaming_mouse
11-22-2004, 01:33 PM
Bruce,

Thanks. I knew that was wrong. Silly, the way I wrote the program, I was actually finding n. So the answer in this case is 175. After 175 flops, there is a 50% chance that at least 2 will be identical.

gm

BruceZ
11-22-2004, 01:33 PM
I got n = 185 tries gives 50% probability of duplication. I broke it into smaller pieces so Excel wouldn't choke.

EDIT: I now get n=175. See latter posts.

gaming_mouse
11-22-2004, 01:35 PM
Here's the code, for anyone intersted:

<font class="small">Code:</font><hr /><pre>

public class Test {

public static void main(String[] args) {
double f = 22100;
double ans =2;
double lastTerm = (f-1D)/f;

while (true) {
lastTerm *= (f-ans)/f;
if ( (1-lastTerm) &gt; .5)
break;
ans++;
}

System.out.println(ans);
}
}
</pre><hr />

gaming_mouse
11-22-2004, 01:36 PM
[ QUOTE ]
I got n = 185 tries gives 50% probability of duplication. I broke it into smaller pieces so Excel wouldn't choke.

[/ QUOTE ]

Sounds like you got rounding errors.

BruceZ
11-22-2004, 01:36 PM
[ QUOTE ]
Bruce,

Thanks. I knew that was wrong. Silly, the way I wrote the program, I was actually finding n. So the answer in this case is 175. After 175 flops, there is a 50% chance that at least 2 will be identical.

gm

[/ QUOTE ]

Here's my Excel solution:

=PERMUT(22100,70)/22100^70*PERMUT(22100-70,70)/22100^70*PERMUT(22100-70-25,70)/22100^70

70 + 70 + 70 -25 = 185.

EDIT: I fixed this formula in latter post. I now get 175.000 flops for a 50% chance of duplicating.

MickeyHoldem
11-22-2004, 01:43 PM
Yes 175 is very close to the answer I got... 176... I'm not sure if you have forgotten to count the initial flop that has zero chance... or that my computations are flawed by the limitations of these wonderful machines we rely so heavily on.

If you consider order to be important... you need to see 430 flops. (I think /images/graemlins/grin.gif)

BruceZ
11-22-2004, 01:53 PM
I get 175.000 now also, now that I've fixed my Excel kludges. The first flop isn't an issue.

=PERMUT(22100,70)/22100^70*PERMUT(22100-70,70)/22100^70*PERMUT(22100-70-70,35.000)/22100^(35.000)

= .501.

70+70+35.000 = 175.000.

This is the same as PERMUT(22100,175.000)/22100^175.000 = 50.1% chance NOT duplicating. 176 gives 49.7% chance of NOT duplicating.

BruceZ
11-22-2004, 02:18 PM
I've been doing a lot of edits on the fly to the conclusion in my last post. If you check it now, it should be final. 175 is a better answer than 176. 175 gives a 50.1% chance of not duplicating, and 176 gives a 49.7% chance of not duplicating.