Thread Rating:

piroukay
piroukay
  • Threads: 8
  • Posts: 19
Joined: Sep 26, 2014
September 26th, 2014 at 6:07:51 PM permalink
Hi, I have a game idea, and I don't know how to work out the odds for this.

On five card casino poker, where a player has a pair, there will be three remaining cards. What are the odds that these three cards will make any kind of three card poker hand (such as straight, flush, or straight flush)? Obviously another pair or three of a kind don't count because then the player would have two pairs or a full house.

Thanks,

Piroukay
CrystalMath
CrystalMath
  • Threads: 8
  • Posts: 1911
Joined: May 10, 2011
September 26th, 2014 at 6:52:29 PM permalink
You mention 3 card hands, but then you also mention full house and two pair. Full houses and two pair are not 3 card hands.
I heart Crystal Math.
wudged
wudged
  • Threads: 2
  • Posts: 998
Joined: Aug 7, 2013
September 26th, 2014 at 6:56:39 PM permalink
Quote: CrystalMath

You mention 3 card hands, but then you also mention full house and two pair. Full houses and two pair are not 3 card hands.



I think he wants to exclude any three card hands that could possibly combine with the original 2-card pair to make a regular 5 card hand. But then again he only mentions excluding full house and two pair, and fails to mention the possibility of a flush, straight flush, four of a kind, three of a kind..
ShineyShine
ShineyShine
  • Threads: 7
  • Posts: 189
Joined: Feb 6, 2014
September 26th, 2014 at 7:04:50 PM permalink
Quote: wudged

I think he wants to exclude any three card hands that could possibly combine with the original 2-card pair to make a regular 5 card hand. But then again he only mentions excluding full house and two pair, and fails to mention the possibility of a flush, straight flush, four of a kind, three of a kind..



Yeah i think that's what he's getting at. Obviously if you have a pair, then a flush, straight or straight flush wouldn't be a possible 5 card hand.
wudged
wudged
  • Threads: 2
  • Posts: 998
Joined: Aug 7, 2013
September 26th, 2014 at 7:06:26 PM permalink
Quote: ShineyShine

Yeah i think that's what he's getting at. Obviously if you have a pair, then a flush, straight or straight flush wouldn't be a possible 5 card hand.



Doh! Somehow between first and second sentence I forgot the starting qualification was a pair.

And three of a kind wouldn't matter since it wouldn't really be a three card hand.
ShineyShine
ShineyShine
  • Threads: 7
  • Posts: 189
Joined: Feb 6, 2014
September 26th, 2014 at 7:12:04 PM permalink
Maybe he's thinking of combining draw poker with 3 card poker.
piroukay
piroukay
  • Threads: 8
  • Posts: 19
Joined: Sep 26, 2014
September 26th, 2014 at 7:23:40 PM permalink
Quote: wudged

Doh! Somehow between first and second sentence I forgot the starting qualification was a pair.

And three of a kind wouldn't matter since it wouldn't really be a three card hand.



Yeah, this only works when there is a pair in the hand. Just a pair. The remaining three cards (which are usually ignored) making a straight, flush or straightflush.

Combining three card poker with five card poker. For example I get five cards. In this I have a pair of 7s. The remaining three cards are 4Clubs, 3Hearts and 5Spades, then these three cards make a straight, 3, 4, 5.)

The option of the three cards being used only comes into play when there is a pair, nothing more.
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
September 27th, 2014 at 12:05:00 AM permalink
piroukay,

Welcome to the forum.

I have a text file that is 2,598,960 lines long, that I created for a prior project. Each line contains a possible poker hand, and each hand in the file is unique.

It would be an easy matter to write a little script (program) to read that file and filter out all of the hands that only have a specific pair. (Writing these hands to a new file, if need be.) I could then read that new file and count the number of these hands that meet your criteria... specifically, a flush or a straight (or a straight flush) with the other three cards. It won't be a problem. This would give you the exact probability.

However, it's very late here and I'm about ready for bed. And I'm working out of town this weekend... I have to get up at dawn tomorrow. Thus, I won't be able to get to this for at least a couple of days. If you can wait that long, that'll be great, but I suspect that someone else will read your post and respond with the answer before then... probably by figuring it out mathematically, without the need for a "brute force" approach, that I would have to use.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6289
Joined: Jun 22, 2011
September 27th, 2014 at 10:00:12 AM permalink
Quote: EdCollins

piroukay,

Welcome to the forum.

I have a text file that is 2,598,960 lines long, that I created for a prior project. Each line contains a possible poker hand, and each hand in the file is unique.


Ed - you only really need 134,459 hands. For example, you don't need both a royal flush in spades and one in hearts, and you don't need both (2 of spades, 3 of spades, 3 of hearts, 6 of spades, 7 of clubs) and (2 of diamonds, 3 of diamonds, 3 of spades, 6 of diamonds, 7 of clubs (or hearts, for that matter)).

I am assuming that you cannot use one of the cards in the pair to make the 3-card hand - for example, 3s 3h 5h 9h Kd does not count as "a pair and a 3-card flush" (but 3s 3h 5h 9h Kh would).
This requires that the pairs be examined separately.

First, there are (50)C(3) = 19,600 possible sets of 3 cards from 50 (52 minus the 2 in the pair).

For each pair, there are 12 cards in each suit in the pair, and 13 cards in each of the other two suits.
This makes (12)C(3) + (12)C(3) + (13)C(3) + (13)C(3) = 1012 3-card flushes; this includes any possible straight flushes.

Straights have to be checked separately for each pair.
Aces: 234, 345, 456, 567, 678, 789, 89T, 9TJ, TJQ, JQK = 10 groups
2s: 345, 456, 567, 678, 789, 89T, 9TJ, TJQ, JQK, QKA = 10 groups
3s: 456, 567, 678, 789, 89T, 9TJ, TJQ, JQK, QKA = 9 groups
4s: A23, 567, 678, 789, 89T, 9TJ, TJQ, JQK, QKA = 9 groups
5s: A23, 234, 678, 789, 89T, 9TJ, TJQ, JQK, QKA = 9 groups
6s: A23, 234, 345, 789, 89T, 9TJ, TJQ, JQK, QJA = 9 groups
7s: A23, 234, 345, 456, 89T, 9TJ, TJQ, JQK, QJA = 9 groups
8s: A23, 234, 345, 456, 567, 9TJ, TJQ, JQK, QJA = 9 groups
9s: A23, 234, 345, 456, 567, 678, TJQ, JQK, QJA = 9 groups
10s: A23, 234, 345, 456, 567, 678, 789, JQK, QJA = 9 groups
Jacks: A23, 234, 345, 456, 567, 678, 789, 89T, QKA = 9 groups
Queens: A23, 234, 345, 456, 567, 678, 789, 89T, 9TJ = 9 groups
Kings: A23, 234, 345, 456, 567, 678, 789, 89T, 9TJ, TJQ = 10 groups
Each group has 4 cards for the low number (1 of each suit), 4 for the middle number, and 4 for the high number, or 4 x 4 x 4 = 64 sets of cards for each group. However, 4 of those 64 sets have all three cards in the same suit, and they have already been counted in the flushes, so each group has 60 sets of 3 cards.

A pair of Aces, 2s, or Kings will have 1012 + 600 = 1072 3-card hands out of 19,600.
Any other pair will have 1012 + 540 = 1556 3 card-hands out of 19,600.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
September 27th, 2014 at 10:03:02 AM permalink
Quote: EdCollins

I have a text file that is 2,598,960 lines long, that I created for a prior project.

me too
I do not know why I have it
it is abouts 68.5MB in size

Quote: EdCollins

but I suspect that someone else will read your post and respond with the answer before then...
probably by figuring it out mathematically, without the need for a "brute force" approach, that I would have to use.

yes, it would make for a nice math exercise, maybe too difficult for most though
learning a way to calculate it can then be used to calculate other similar type problems

now OP started with this
Quote: piroukay

Hi, I have a game idea, and I don't know how to work out the odds for this.

I thought he was going to ask how to calculate it
wrong was I (eye)

Quote: piroukay

What are the odds that these three cards will make any kind of three card poker hand (such as straight, flush, or straight flush)?

looks like just the answer is wanted


so, I have an answer
but do not know if it is correct without looking more into it (the math parts)

vacation time still for me

your example is like this in me text file (the first 22 combos before a sort)
2C | 3C | 4C | 5C | 6C | 
2C | 3C | 4C | 5C | 7C |
2C | 3C | 4C | 5C | 8C |
2C | 3C | 4C | 5C | 9C |
2C | 3C | 4C | 5C | TC |
2C | 3C | 4C | 5C | JC |
2C | 3C | 4C | 5C | QC |
2C | 3C | 4C | 5C | KC |
2C | 3C | 4C | 5C | AC |
2C | 3C | 4C | 5C | 2D | <<< here I see the 1st pair with a SF
2C | 3C | 4C | 5C | 3D | <<< here I see the 2nd pair with a flush
2C | 3C | 4C | 5C | 4D | <<< here I see the 3rd pair with a flush
2C | 3C | 4C | 5C | 5D | <<< here I see the 4th pair with a SF
2C | 3C | 4C | 5C | 6D |
2C | 3C | 4C | 5C | 7D |
2C | 3C | 4C | 5C | 8D |
2C | 3C | 4C | 5C | 9D |
2C | 3C | 4C | 5C | TD |
2C | 3C | 4C | 5C | JD |
2C | 3C | 4C | 5C | QD |
2C | 3C | 4C | 5C | KD |
2C | 3C | 4C | 5C | AD |

I love dice games too

Sally
I Heart Vi Hart
miplet
miplet
  • Threads: 5
  • Posts: 2114
Joined: Dec 1, 2009
September 27th, 2014 at 6:06:56 PM permalink
Quote: ThatDonGuy


For each pair, there are 12 cards in each suit in the pair, and 13 cards in each of the other two suits.
This makes (12)C(3) + (12)C(3) + (13)C(3) + (13)C(3) = 1012 3-card flushes; this includes any possible straight flushes.


I believe the OP doesn't to include flushes where one of the cards matches the pair for trips so its (12)c(3)*4.
“Man Babes” #AxelFabulous
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
September 27th, 2014 at 8:27:08 PM permalink
Don,

I'm glad you noticed and realized that not all pairs are equal. As I was falling asleep last night, I also realized this must be true.

As you pointed out, a pair of eights, for example, can help fill a straight three ways (via 678, 789, or 89T). But an ace (or a two or a king) can only fill it out two ways (via A23 or KQA). So if you're looking for more valid hands, you'd like to have your pair be AA, or 22, or KK... so your odd card can potentially help fill more straights.

My answer is different than yours but if miplet is correct and you misread the problem, then that's why. Good work.

For any pair of Aces or 2s, or Kings, I come up with a total of 880 different flushes / straight flushes, and 600 different straights, for a total of 1,480 valid three-card poker hands. Out of 14,080 possible hands containing a pair, that's .10511364.

For any other pair, it's a bit less: The number of flushes / straight flushes is the same... 880... but there are only 540 possible straights. This gives us a total of 1,420 valid three-card poker hands. Again, out of 14,080 possible hands containing a pair, that's .10085227.
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
September 27th, 2014 at 8:34:40 PM permalink
Quote: ThatDonGuy

Ed - you only really need 134,459 hands. For example, you don't need both a royal flush in spades and one in hearts, and you don't need both (2 of spades, 3 of spades, 3 of hearts, 6 of spades, 7 of clubs) and (2 of diamonds, 3 of diamonds, 3 of spades, 6 of diamonds, 7 of clubs (or hearts, for that matter)).


Oh yea, I realized that. Thanks. But I did already have a text file of all possible five-card poker hands to start with. It was "easiest" for me (i.e. fastest) to just pick out two specific pairs (Ad, and Ac, is initially what I used) and pretend that was my starting pair and then to read the large poker hand file and then, (for my first filter step) to simply pull out all of the hands that contained this specific pair, and no other pair, and no other ace.

After that I just counted the number of flushes and straights from this reduced group.

I admire you math guys and how you're able to arrive at the answer mathematically. My schooling and math skills don't quite go that far. Again, nice job.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6289
Joined: Jun 22, 2011
September 28th, 2014 at 8:49:48 AM permalink
Quote: EdCollins

My answer is different than yours but if miplet is correct and you misread the problem, then that's why. Good work.


I did say that I assumed that any straight/flush could not include cards in the pair, but I see that your original problem did want those treated as "higher than a pair". Your numbers are correct under the circumstances.
piroukay
piroukay
  • Threads: 8
  • Posts: 19
Joined: Sep 26, 2014
October 2nd, 2014 at 3:11:04 PM permalink
Yeah, forgot to detail that point. That if a player has a pair, they then cannot use either of those two cards (from the pair) to use in the three card poker hand. So if there was pair of 2s, and the remaining three cards were 3, 4, 9, the player cannot then use one of the twos to make a straight.

The three remaining cards after the pair has been realized must stand alone to make the three card poker hand. If there is a pair, then if THE REMAINING THREE CARDS make a 3 card poker hand they win a nominal amount (based on the odds of this. Has to be profitable for the casino of course :)
  • Jump to: