Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Probability (http://archives2.twoplustwo.com/forumdisplay.php?f=23)
-   -   Hold'em Probability Puzzler (http://archives2.twoplustwo.com/showthread.php?t=25763)

 Huh 12-10-2002 01:44 PM

Hold\'em Probability Puzzler

How many two-card hands, on average, will it take for you to see every card in a standard deck? I'll post my answer in a couple of days in a separate post. I'm curious to see how people get there.

Huh?

 Carl_William 12-10-2002 08:19 PM

Re: Hold\'em Probability Puzzler

Dear Huh,
You wrote:

"How many two-card hands, on average, will it take for you to see every card in a standard deck? I'll post my answer in a couple of days in a separate post. I'm curious to see how people get there.

Huh? "

I appreciate the challenge -- maybe I can solve it. Anyway -- I enjoy thinking about things like this -- maybe an excellent clue would be to solve it for a very small deck -- say 2 cards (too simple), 3 cards, 4 cards (etc.) and then proceed to 52 cards. Thanks again for the excellent post.

Most warm regards,
Carl William

PS: one could do a Bernoulli trial (binomial random variable) and determine the probability that 2 specific cards will or will not be dealt. But I think this is a counting technique problem not unlike the birthday classroom problem where the probability is determined (on average) that two or more people in a class were born on the same birthdate (i.e., month and day of month).

 PseudoPserious 12-10-2002 08:33 PM

Possible Solution

I'll give it a shot...

Let's call N the number of cards you've already seen. Basically, we're looking for the average number of hands it takes to go from N=0 to N=52.

Call A(N) the average number of hands it takes to see a new card, given that you've already seen N cards.

Call P(N) the probability of having seen exactly N cards at some point during the game.

A(N)*P(N) is the expected number of hands you'll be dealt for each value of N.

If you sum A(N)*P(N) over N=0 to 51, you'll get the average number of hands it takes to see the entire deck.

Tackling A(N) first:

Given that you've seen N cards, the probability of being dealt two cards you've already seen is (N/52)*((N-1)/51). Thus, the probability on any one deal of seeing a new card is:

M(N) = 1 - (N/52)*((N-1)/51)).

We're looking for the average number of independent trials (hands) it takes for us to see our first success (our first hand with a new card). This is the geometric distribution. The mean of the geometric distribution with probability of success p is 1/p.

So, A(N) = 1/M(N)

Now for P(N):

You will NOT see exaclty N cards at some time during the game if and only if (a) you have seen exactly N-1 cards and (b) the next time you are dealt an unseen card, you are dealt two unseen cards instead of just one.

We've already defined the probability of (a) as P(N-1).

The probability of (b) is the fraction of times that you receive two unseen cards when you are dealt at least one unseen card, given that you've seen N-1 cards. We'll call this T(N-1).

Given that you've seen (x) cards, on any one deal the probability of being dealt two unseen cards is P2(x) = ((52-x)*(51-x))/(52*51). The probability of being dealt exactly one unseen card is P1(x) = 2x(52-x)/(52*51).

So, T(N-1) = P2(N-1) / (P1(N-1) + P2(N-1))

Thus, we can find the chance of skipping a value of N by P(N-1)*T(N-1). This gives us an iterative formula for the chance of seeing exactly N cards:

P(N) = 1 - P(N-1)*T(N-1)

Along with P(0) = 1 (since we have seen no cards before the first deal) and P(1) = 0 (since the first deal will always give us two unseen cards), this allows us to calculate P(N) for all values of N.

Using the above definitions, if you sum A(N)*P(N) from N=0 to 51, you get 117.09.

So, I'd have to say just over 117 hands or so...

Cya,
PP

P.S. A quickie computer sim of 20,000 games gave an average of 117.65 hands.

 Carl_William 12-10-2002 09:02 PM

Re: Possible Solution

Dear Cya,
PP

So you solved the problem for a one card hand not a two card (holdem) hand....
You indicated about 117 hands and wrote,

"P.S. A quickie computer sim of 20,000 games gave an average of 117.65 hands."

Cya, of course if your solution is valid than you can use the same approach for holdem hands.
Unless I don't understand Huh's problem statement -- I thought Huh was talking about 2 card holdem hands. There are 1326 distinct holdem hands in a 52 card deck. Therefore it has to be 1326 or more "usually way more" deals to get dealt every holdem hand combination.

Most warm regards,

Carl William

 Carl_William 12-10-2002 09:51 PM

Re: Hold\'em Probability Puzzler

Huh,

I don't know how to solve your problem definition yet -- at least in a closed analytical form. I do know how to solve the problem using brute force (Monte Carlo technique). Just randomly deal out integer numbers from 1 to 1326 until all 1326 numbers are in this sequence sample. Then count how many (deals) it took to get this sample. Repeat this sequence sample process over and over, each time recording how many deals were required. Keep a running average of the deals required for each sequence -- when the running average converges within say plus or minus one deal you will have a pretty accurate answer to your problem.

Regards
Carl William

 PseudoPserious 12-10-2002 10:00 PM

Re: Possible Solution

Hey Carl,

1) I'm PP, not Cya...I was saying 'see you' [img]/forums/images/icons/wink.gif[/img]

2) I think he was asking how many hold'em hands it would take on average to see every card in the deck, not how many to see every possible hold'em hand. To quote:

"How many two-card hands, on average, will it take for you to see every card in a standard deck?"

But anyways, if that's not what he was asking, that's the problem I solved [img]/forums/images/icons/smile.gif[/img]

Take care,
PP

 PseudoPserious 12-10-2002 10:04 PM

Re: Hold\'em Probability Puzzler

Heya Carl,

I'm in a bit of a rush, so I haven't thought about it very much, but why can't you can solve your interpretation of Huh's problem using the same method I did above?

PP

 Carl_William 12-11-2002 01:20 AM

Re: Hold\'em Probability Puzzler

PP, you are correct -- I misread the problen definition. One of my faults. You wrote:

"I'm in a bit of a rush, so I haven't thought about it very much, but why can't you can solve your interpretation of Huh's problem using the same method I did above?"

I will think about the correct definition. You are probably right all the way. Thank you.

Carl

 PseudoPserious 12-11-2002 10:48 AM

Re: Hold\'em Probability Puzzler

Hey Carl,

Okay, here's how I would figure out the average number deals it would take to be dealt every possible hold'em hand (1326 possible hands).

Call N the number of hands you haven't seen.

The probability of getting a hand you haven't seen is
P(N) = N / 1326

From the mean of the geometric distribution, the average number of deals it will take you to see a hand you haven't seen before is:
A(N) = 1326/N

The average to get from N=1326 (prior to the first deal) to N=0 (just after your dealt the final 1326th hand) is then
A = Sum [ 1326/N , N=1326 to 1]

This works out to, oh, quite a lot (just shy of 10300).

Cya,
Pseudo

 Huh 12-11-2002 06:27 PM

I like your problem more lol.

The original post was about seeing every card..Not every hand...But i think that is more interesting anyhow.

I got 117 also, slightly different math methods, but similar, then I wrote a small c program to take two unique rand() % 52 numbers and check off a list(0-51) a million times to check my work.

I like to look at numbers like this to randomize my play a bit (translation : raise for no good reason). I usually use some obscure fact about my previous hand so I like to look at these stats.

When I have some time I am going to look at the every possible starting hand problem. I am kindof curious about the 169 hands (lumping suited similar cards together, moreso than the 1326 hands, but both are cool.)

huh?

All times are GMT -4. The time now is 11:59 AM.