PDA

View Full Version : Probability Help - Math Geniuses Here



The Brain
06-07-2005, 01:00 PM
Trying to get the most accurate pre-flop odds for this scenario:

You are dealt two cards out of a standard deck of 52. You want to calculate the odds of getting two additional cards that you want on the flop, which will offer you 3 opportunities to get the two cards.

Here are some examples.. cards_out == the number of cards you need that are still available


So, I could calculate the odds of getting one card on the 1st flop card.. then add to the odds of getting your second card on the 2nd or 3rd flop card..


(cards_out / 50) + [100 - ( (49-cards_out/49) * (48-cards_out/48) )]


Or, I could calculate the odds of getting one card on the 1st or 2nd flop card.. then add to the odds of getting your second card on the 3rd flop card.


[100 - ( (50-cards_out/50) * (49-cards_out/49) )] + (cards_out / 48)


There is also yet another combination.. getting the card you want on the 1st flop card.. not getting what you want on the 2nd flop card.. and then getting the second card you wanted on the 3rd flop card...


(cards_out / 50) + (cards_out / 48)



Q: Which method would offer the best representation of your odds of getting two cards you need on the flop? should I perform all calculations, and then average them?? Is the difference so negligable that it doesn't matter..??

Govtcheez
06-07-2005, 01:24 PM
A: Buy a poker book. Any halfway decent one will have the answer, among others :)

MathFan
06-07-2005, 02:13 PM
Hmmm.... I'm not sure what yo mean. Could you please describe the situation in more detail? (Have never liked card games, so... :) )

The Brain
06-07-2005, 02:26 PM
Let's say you are dealt a 5 of spades and a 10 of clubs.

You want to calculate your odds of getting two pair. (two 5's and two 10's)

There are 50 cards still remaining in the deck.

There are three '5's and three '10's still out, somewhere in the deck.

You are about to be dealt three cards on the flop.

What are the odds of getting another 5 and another 10 on the flop?





card 1: will give you a 6 out of 49 chance of getting at least one of the two cards you want.

card 2: will give you a 6 out of 48 chance of getting one of the cards you wanted -OR- a 3 out of 48 chance of getting the second card if you got what you wanted on the 1st card

(at this point, you must have at least obtained one of the two cards)

card 3: 3 out of 47 of getting the second card

MathFan
06-07-2005, 02:27 PM
Now, this is how I understood your problem: You have two cards. Then, you are given three more cards. What are the odds that two of the cards you want are among the three last cards you are given.

Here is my solution. You have following possibilities for the three last cards (0 - a card you do not want; 1 - a card you want):

101
110
011

We now sum the possibility of getting each hand. That gives:

(2/50)(1/49)(48/48)+(2/50)(48/49)(1/48)+(48/50)(2/49)(1/48)~=0.00244897959

MathFan
06-07-2005, 02:30 PM
You can also go the other way around:

1-Possibility_of_getting_nothing

But then you have more choices:

001
000
010
100

So the last solution method will be more efficient.

MathFan
06-07-2005, 02:36 PM
Sorry, for posting so many times. There is yet another and simpler solution. Tell me if you want to know it. I don't know what it's called in english, but I learnt as the Hypergeometrical Method. It involves binomial coefficients.

The Brain
06-07-2005, 02:36 PM
Awesome.. just what I was looking for :)


Sure.. post it up.. !


or if you got link that would be cool :cool:

Pete
06-07-2005, 03:25 PM
Sounds like binomial distributions (in english) and involves combinations. Not that complicated really, probably come up in a google (sry i'm in a rush)

Pete

Jez
06-07-2005, 04:45 PM
>Let's say you are dealt a 5 of spades and a 10 of clubs.

That's easy - FOLD!

Sang-drax
06-07-2005, 05:17 PM
http://mathworld.wolfram.com/BinomialCoefficient.html

My solution:

The number of ways the three cards can be chosen: 3 C 50

The number of combinations including a 5 and a 10: 3 * 3 * 48
(3 fives, 3 tens and the last card could be anything)

Divide these two numbers and the resulting probability is 0.022

EDIT: I'm doing something wrong, but it's late and I'll have to get up early in the morning. Hopefully, you'll spot the mistake.

Govtcheez
06-07-2005, 05:47 PM
The problem with the way you guys are doing it is that a pair isn't necessarily "getting two additional cards that you want". The cards you want are going to be dependent on a number of things, not just whether you make a pair or set.

It may seem like I'm reading into this too much, but if this is actually a poker question and not just a mathematical exercise, the chances are greater than 2.2%.

Epo
06-07-2005, 09:03 PM
I'm guessing this to be a game of Holdem? (Never saw it posted, but that's what it sounds like)

There are two scenarios I'm seeing right off the bat. These don't however get into the fact that other players are being dealt and you don't know whether or not they may have drawn the cards you need:

Scenario 1: You get two of the same cards
This would be something like an A A, K K, 9 9, you get the idea. We're going to play with the Dictators this time (K K) because they're cool. Now, off a flop of 3 cards,

Card #1:
There are two kings remaining in the deck of 50 cards, so for this card there is a 4.00% chance of getting another king.

Therefore, by the end of one card being dealt on the flop:
There is a 96% chance of NOT getting a king
There is a 4% chance of receiving another king

Card #2 (Card #1 WAS NOT a king):
There are two kings remaining in the deck of 49 cards, so for this card there is a 4.08...% chance of getting another king. However, this scenario will happen 96.00% of the time, so in reality, there is a 3.84% chance.

Card #2 (Card #1 WAS a king):
There is one king remaining in the deck of 49 cards, so for this card there is a 2.04...% chance of getting another king. However, this scenario will only happen 4.00% of the time, so in reality, there is a 0.0816% chance of this happening.

Therefore, by the end of two cards being dealt on the flop:
There is a 92.0784% chance of having 0 kings;
There is a 7.84% chance of having 1 king; and
There is a 0.0816% chance of having 2 kings

Card #3 (NO FLOP CARDS were a king yet):
There are still two kings remaining in the deck of 48 cards, so for this card there is a 4.166...% chance of a king being dealt. However, this scenario will only happen 92.0784% of the time, so in reality there is only a 3.836...% chance of getting a king on this card.

Card #3 (1 FLOP CARD was a king):
There is still 1 king remaining in the deck of 48 cards, so for this card there is a 2.08...% chance of a king being dealt. However, this scenario will only happen 7.84% of the time, so in reality there is only a 0.163...% chance of getting another king on this card.

Therefore, by the end of three flop cards:
There is a 88.07...% chance of having 0 kings;
There is a 11.676...% chance of having 1 king; and
There is a 0.2446...% chance of having 2 kings

And that's only the scenario for getting dealt a pair...I can do a scenario of getting two seperate cards if you request it, but it might take a bit of time to post up. I'm very confident this is the appropriate procedure for determining probabilities. And remember, this only holds as long as other players aren't being dealt.

Note: I did some truncation too. The "..."s after numbers are just numbers I left out to keep it readable, but it will add up to just under 100% of outcomes.

EDIT:
This method is off. I read it more this morning and I think I missed a few cases. I'm going to write it all out by hand and then post it here.

anonytmouse
06-08-2005, 01:21 AM
Let's say you are dealt a 5 of spades and a 10 of clubs.

You want to calculate your odds of getting two pair. (two 5's and two 10's)

There are 50 cards still remaining in the deck.

There are three '5's and three '10's still out, somewhere in the deck.

You are about to be dealt three cards on the flop.

What are the odds of getting another 5 and another 10 on the flop?

I counted and got 3.5%.

Sang-drax
06-08-2005, 07:20 AM
Solving this problem by expanding the cases isn't very good. It's easy to miss a few cases and when the problem gets more complex the method becomes really impractical.

The number of ways the three cards can be chosen: 50 C 3
This is the same as I posted before.

The number of combinations exactly one 5 and exactly one 10: 3 * 3 * (50-6)
(3 fives, 3 tens and the last card could be anything but one of those six cards)

Divide these two numbers and the resulting probability is 0.0202

This is the probability to get two-pair (not full house or trips) with the two different cards you hold on your hand after the flop (three cards).

I'm not sure, but it looks reasonable. The short explanation why my previous solution didn't work is that some combinations were calculated twice.


the chances are greater than 2.2%.
The chances are creater because you can get two pairs in more ways, for example 6, 6, 5 in the flop and 5, 10 in your hand, but I think 2.02% answers Brain's question.

Govtcheez
06-08-2005, 07:55 AM
> The chances are creater because you can get two pairs in more ways, for example 6, 6, 5 in the flop and 5, 10 in your hand, but I think 2.02% answers Brain's question

His question was pretty vague - "the cards you want". Assuming this is hold 'em, cards you want are not going to be limited to just pairing something up. Like I said, if he's just doing this as a mathematical exercise, he's ok, but if he's trying to seriously analyze his odds of improving his hand, he's going to shoot himself in the foot.

*ClownPimp*
06-08-2005, 09:09 AM
Let me take a crack at this...

Sang-drax has the right answer, but its not so obvious why its the right answer.

Break the cards into three sets, one set of three, call it X, with the cards that match the suit of the first card. Second set Y with the cards that match the suit of the second card. And the third set Z, with the cards that dont match either suit. X and Y both have 3 cards in them, and Z has the remainder, 44.

Now think about being dealt three cards. The chance that the first card matches the suit of one of your first two cards is 6/50, since the card can be from either set X or Y and there are 50 cards left in the deck. Then the probability of having the second card match the suit of the card _that was not matched_ by the previous card (making the second pair) is 3/49. Then, the third card cant match the suit of the other cards because then you would have a full house, so the last card must come from set Z, and the probability getting a card from set Z is 44/48. That gives you (6/50)(3/49)(44/48).

But what if the first card did not match the suit, or the second card? As Mathfan stated there are three cases. The card that doesnt match a suit can be either the first, second or third card. Finding the probability of each of the three cases and summing them you get

(44/50)(6/49)(3/48) + (6/50)(44/49)(3/48) + (6/50)(3/49)(44/48) = .0202

Govtcheez
06-08-2005, 09:13 AM
> Then, the third card cant match the suit of the other cards because then you would have a full house

Wait, what?

edit: I think you've got suits confused with the numbers of the card.

basilisk
06-08-2005, 12:38 PM
agree with cheez on this one - if its a mathematical query on probability of a card coming up in 3 cards then fine but if you are calculating odds for whether to fold, raise or check then you also have to take into account pot odds and your position at the table (in respect to the dealer) - from this you can work out your effective odds.

anonytmouse
06-08-2005, 04:43 PM
Solving this problem by expanding the cases isn't very good. It's easy to miss a few cases and when the problem gets more complex the method becomes really impractical.

The number of ways the three cards can be chosen: 50 C 3
This is the same as I posted before.

The number of combinations exactly one 5 and exactly one 10: 3 * 3 * (50-6)
(3 fives, 3 tens and the last card could be anything but one of those six cards)

Divide these two numbers and the resulting probability is 0.0202

This is the probability to get two-pair (not full house or trips) with the two different cards you hold on your hand after the flop (three cards).

The chances are creater because you can get two pairs in more ways, for example 6, 6, 5 in the flop and 5, 10 in your hand, but I think 2.02% answers Brain's question.
Cool, my counting method would have worked, except I was tired and counted combinations that shouldn't have been counted. :(

Here was my working:


Total scenarios for the next three cards:
50 * 49 * 48 == 117,600

We want (5H or 5D or 5C) and (10H or 10D or 10S) and (one other)
Possible combinations they could come out successfully:


# 5 5 (47 * 3 * 2) = 282 // whoops, invalid combination
# 5 10 (44 * 3 * 3) = 396
# 10 5 (44 * 3 * 3) = 396
# 10 10 (47 * 3 * 2) = 282 // whoops, invalid combination
_____________________________
= 1356
* 3
= 4068

10 10 10 (3 * 2 * 1) = 6 // whoops, invalid combination
5 5 5 (3 * 2 * 1) = 6 // whoops, invalid combination

10 5 5 (3 * 3 * 2) = 18
5 10 10 (3 * 3 * 2) = 18
_____________________________
= 48

(4068 + 48) / 117,600 == 0.035 == 3.5%

If you take out the "whoops", you get:


((396 + 396) * 3) / 117,600 = 0.020204 == 2.02%

If you add the combinations where you get one 10 and two fives or one five and two tens, you get:


(((396 + 396) * 3) + (18 + 18)) / 117,600 = 0.020510 == 2.05%

So, the question being a little ambiguous, I think the answer is either 2.02% or 2.05%.

Govtcheez
06-08-2005, 08:39 PM
Hey Brain, care to come here and clarify your question?

The Brain
06-08-2005, 11:28 PM
I was just reading some, 'how to calculate poker odds' tutorials... and I was trying one of their methods for calculating odds of obtaining a given card on the flop. I was trying to take this method one step further and trying to calculate odds of getting a winning combination on the flop.. based on this (http://www.texasholdem-poker.com/odds1.php) tutorial.

I was ambiguous on my first post, mainly because I was trying to get away with a general algorithm for calculating odds for all winning combinations based on cards left in the deck that would offer you the chance to obtain a specific winning combination vs. available cards.

In response to sang-drax's suggestion, I found this (http://mathworld.wolfram.com/Poker.html) site at mathworld (although not texas holdem specific) addresses implementation of binomial coefficients in calculating poker odds.

There are many variables that determine one's play of texas holdem poker. Crunching the numbers is just one small but necessary aspect.. and plays a crucial role in my computer player AI decision making.. so I want to choose the most correct method of accurately representing one's overall odds of obtaining each winning combination before and after the flop.

Thanks for everyone's help thus far, your math examples have been very helpful. I now realize that my previous example to obtain a subsequent 5 and 10 on the flop did place a restriction on obtaining the most accurate odds of obtaining two pair. At the time it seemed to offer up the best odds since you already had those cards in your hand.

This is the most logic intensive program I have ever attempted, so please bear with the me. :)

Sang-drax
06-09-2005, 02:43 AM
edit: I think you've got suits confused with the numbers of the card.
Yes. I was referring to the numbers of the cards.

EDIT: It wasn't my post that Govt quoted. :p

*ClownPimp*
06-09-2005, 08:35 AM
> Then, the third card cant match the suit of the other cards because then you would have a full house

Wait, what?

edit: I think you've got suits confused with the numbers of the card.


Maybe I didnt write it out clearly enough hehe....

>Then, the third card cant match the suit of the other cards because then you would have a full house

You have two cards be begin with, your dealt two more cards, each matching a suit of the first to cards, so you have two pair at this point. The third card (dealt to you, not counting the first two you already had) cant match the suit of any of the cards you already have because then you would have 3 and 2 of a suit (full house right?).

Govtcheez
06-09-2005, 08:44 AM
A full house is three of the same number and 2 of a different number. Suits have no bearing on it at all.

*ClownPimp*
06-09-2005, 12:42 PM
Good point :P

(doesnt play poker)

edit:

> I think you've got suits confused with the numbers of the card.

doh... one of my worst brain farts to date :P

apparently I've never seen a card deck either.