PDA

View Full Version : Poker probability problem



Lheticus
2015-10-29, 07:57 PM
I have a serious sticking point with a certain poker related probability calculation. I'm not going to be making a long story short here, so strap yourselves in.

In the game of Texas Hold'em, players are dealt 2 "hole cards" and then 5 "community cards" are dealt. The best hand you can make from any combination of your hole cards and the community cards is your hand. Now, previously on a more specialized forum, I have had it put to me that the probability of, when dealt a pair...let's say for the sake of example I have the 5 of clubs and the 5 of diamonds as my "hole cards." I have been informed that in this scenario the chance I have of another 5 appearing as one of the community cards is roughly somewhere around 20%. The way I was told the math works is that 52 cards in the deck - my 2 cards is 50 cards, since there are 2 other fives in the deck it's a 1 in 25 shot, or 4%. Now, it gets slightly better because with each card revealed it becomes 2 in 49, 2 in 48, then 47 and 46. But I don't see how the chance of getting a 5 for 3-of-a-kind is able to stack additively dependant on the number of cards revealed. To me it's as if a buddy bet me to roll a natural 20, but I'd get five chances on a single bet, and my buddy says that because it's five 5% chances, I have a 25% chance of winning. I just don't get how that's possible! Can someone help?

Haruki-kun
2015-10-29, 10:13 PM
The d20 is not really a fair comparison. The rolls on a d20 do not affect each other at all, but on drawing cards from a deck, after every card you draw there is one less non-five card in the deck. I'm not sure about the exact math behind it down to specific numbers, but I'm certain they're not comparable.

Madcrafter
2015-10-29, 10:30 PM
Might've been better in the Science and Technology subforum, but we can answer it here.

This is a pretty standard drawing without replacement problem, and so is not exactly similar to your dice example. In this case, we have a deck of 50 cards, and we are drawing five.

Now since there are only actually two fives left in the deck at this point, it simplifies things by allowing us to reverse the question. In this case, the probability of getting at least one five is 1 - the probability of getting no fives. So we can express it like so:

P(X = 0) = Number of combinations of five cards with no fives / Number of combinations of five cards in the deck

Now using combinatorics, we can find that there are 1 712 304 combinations of five cards out of 48 (those that are not fives), and 2 118 760 combinations of five cards out of 50 (all the possible draws). Dividing these gives us the probability that there are no fives in the communal cards. One minus this is the chance that we get one or more fives, which comes out to be 19.184%.

The actual formula that is underlying this is probability density function of the hypergeometric distribution (https://en.wikipedia.org/wiki/Hypergeometric_distribution), which is what you'll need to use if you want to do more complicated examples (say, flushes).

EDIT: The dice on the other hand, does use replacement, so is a binomial distribution instead, and slightly easier to calculate. You can however still use the same reversal trick as above to do less work: the probability of rolling at least one 20 is 1 - the probability of rolling no twenties in your five trials.

Absol197
2015-10-29, 10:45 PM
Basically it works like this: you have your two "5"s, and you know there are two more out there.

The first card is drawn. There are fifty cards in the deck, so the chance is 2/50, or 4%. If the first card is a "5", then you get your three of a kind! But let's say it's not a "5".

The second card is up. Now there are only 49 cards left in the deck, but still two "5"s, so 2/49, or 4.08%. Like before, either it'll be a "5", in which case you're good, or it won't, in which case we need to look at card three.

If we have to go to card three, the odds that card three will be a five is 2/48, or 4.17%;

If card 4 is needed, you've got 2/47, or 4.26%;

If we need to go to card five, you've got a 2/46 chance, which is 4.35% chance.

So what was the total chance of getting it? Well, it's not just 4.35%, because that was the chance on one draw, and you got to do five draws. But it's not the sum of the five draw chances (20.85%), either.

Instead of looking at the odds of GETTING a "5", look at the odds of NOT getting a "5".

On draw one, you have a 96% chance of missing, which means you probably won't get your "5";

On the second draw, you have a 95.92% chance of missing. But, you need to consider that you already missed on the first draw, so that 95.92% chance is actually 95.92% of the original 96%. You have to miss both times in order to still not have your "5" by the end of the second draw. So you can multiply the two together to determine the total chance that you've missed so far: [96% X 95.92% = 92.08%].

For the third, fourth, and fifth draws, it's the same. The chance of missing on future draws is a percentage of the cumulative chance that you've missed on all the previous ones, because if you didn't miss, why are we still counting?

So for the third draw, the total miss chance is [96% X 95.92% X 95.83% = 88.24%];

For the fourth draw, it's [96% X 95.92% X 95.83% X 95.74 = 84.49%];

For the fifth draw, it's [96% X 95.92% X 95.83% X 95.74 X 95.65% = 80.82%].

So you have an 80.82% chance of NOT getting a "5" on your five draws. If we invert that, that means you have a 19.18% chance of getting a "5". It's close to the number you get by just adding the hit chances together, but it's not exactly the same, because you have to consider your "percent of a percent" in there.

Hopefully that helps!


EDIT: Oh no! Math ninjas, the most deadliest kind of ninjas :smalleek: !

Knaight
2015-10-30, 02:08 AM
I have a serious sticking point with a certain poker related probability calculation. I'm not going to be making a long story short here, so strap yourselves in.

In the game of Texas Hold'em, players are dealt 2 "hole cards" and then 5 "community cards" are dealt. The best hand you can make from any combination of your hole cards and the community cards is your hand. Now, previously on a more specialized forum, I have had it put to me that the probability of, when dealt a pair...let's say for the sake of example I have the 5 of clubs and the 5 of diamonds as my "hole cards." I have been informed that in this scenario the chance I have of another 5 appearing as one of the community cards is roughly somewhere around 20%. The way I was told the math works is that 52 cards in the deck - my 2 cards is 50 cards, since there are 2 other fives in the deck it's a 1 in 25 shot, or 4%. Now, it gets slightly better because with each card revealed it becomes 2 in 49, 2 in 48, then 47 and 46. But I don't see how the chance of getting a 5 for 3-of-a-kind is able to stack additively dependant on the number of cards revealed. To me it's as if a buddy bet me to roll a natural 20, but I'd get five chances on a single bet, and my buddy says that because it's five 5% chances, I have a 25% chance of winning. I just don't get how that's possible! Can someone help?

Consider a much simpler system, using the classic bag of marbles that you don't put back in the bag. Say you have 5 marbles, 3 red and 2 green, and you want the probability of grabbing at least one green marble. With 1 draw, it's only 2/5. With 2 draws, you need 1-(the probability of getting 2 red marbles in a row), or 1-3/5*2/4.

Now consider an extreme case, where you draw 4 marbles. There is absolutely no way to draw all red marbles, because even if you get all three you need a green marble to get to 4. The system is changing as you interact with it, which makes it behave differently than a system which doesn't do that.

BannedInSchool
2015-10-30, 10:00 AM
But I don't see how the chance of getting a 5 for 3-of-a-kind is able to stack additively dependant on the number of cards revealed. To me it's as if a buddy bet me to roll a natural 20, but I'd get five chances on a single bet, and my buddy says that because it's five 5% chances, I have a 25% chance of winning. I just don't get how that's possible! Can someone help?

Consider a sequence of flipping a coin. The possible two-flip sequences, all equally likely with a 25% chance of happening, are:

HH
HT
TH
TT

Looking down each column you see you have a 50% chance of getting a head on any flip, as half the results for each flip are heads. However, if we look at the number of rows in which you get at least one head, it's 3/4 of the total possibilities, so that's a 75% chance of you getting at least one head over two flips. Each sequence (row) has a 25% chance of happening, and adding them together gives the total chance. Now it's a lot easier to calculate that by the chance of flipping only tails in a sequence and then subtract that from 1, as the other posts have detailed. It's not just adding together your 50% chance of getting a head on each flip, but it is more than the 50% of getting it on just one flip.

So for hitting your set in hold'em you're also considering all the possible sequences of dealt cards and adding together all the ones you hit with each dealt card. If you looked at just hitting on the first card it'd be only 4% of the total number of sequences, but you get more chances beyond the first card and add those to your "wins", so you do end up with ~20% of the possible sequences having your two outs. It's again not quite as simple as just adding together the chance of hitting with each card, but you are accumulating ways to win so are adding results together.

ETA: For just hitting one of your two outs with one dealt card you're also adding together the probabilities of hitting each card out of all possible cards. It's adding up possible winning sequences, but a sequence with a length of just one card. So expand from just adding the probabilities of "this card OR this card" to "this sequence OR this sequence", and that's how "OR" results increase your chances.

Absol197
2015-10-30, 12:16 PM
This is a pretty standard drawing without replacement problem, and so is not exactly similar to your dice example (for which the probability is ~9.6%).

EDIT: The dice on the other hand, does use replacement, so is a binomial distribution instead, and slightly easier to calculate. You can however still use the same reversal trick as above to do less work: the probability of rolling at least one 20 is 1 - the probability of rolling no twenties in your five trials.

I keep getting 22.62% as the chance on this, instead of the 9.6% you got. Could you explain where we differ?

The first calculation I did was .95^5 as the miss chance.

Then, noting our results were different, I tried figuring out combinations: I came up with 3,200,000 total possible combinations, and 723,901 that include at least 1 "20," which when divided gives me the same result. Did I leave something out?

Knaight
2015-10-30, 12:43 PM
I keep getting 22.62% as the chance on this, instead of the 9.6% you got. Could you explain where we differ?

Assuming that what is being calculated is the odds of at least 1 20, and not exactly 1 20 (which is how I would read it), your calculation is correct.

Jay R
2015-10-30, 12:47 PM
All of this looks simple to those of us who have studied probability, and mystifying to those who haven't. So let me ask you a question.

If you walked into a mathematics class you've never had, half-way through the semester, do you think you could follow that day's lecture, without the several weeks that preceded it??

That's what you're trying to do.

If you want to understand probability, then buy and read a basic probability book, or attend a basic probability class from the beginning.

Absol197
2015-10-30, 02:04 PM
Assuming that what is being calculated is the odds of at least 1 20, and not exactly 1 20 (which is how I would read it), your calculation is correct.

That's what I thought, but when I calculate it for exactly one "20," I still get a 20.36% chance of winning, still more than double what Madcrafter got. So I'm still confused :smalltongue: .

Madcrafter
2015-10-30, 03:07 PM
That's what I thought, but when I calculate it for exactly one "20," I still get a 20.36% chance of winning, still more than double what Madcrafter got. So I'm still confused :smalltongue: .

Whoops, it's because I'm an idiot and in my haste to ninja you ascribed p=.02 instead of the proper p=.05 to rolling a particular side of the 20 sided die. I'll go take that out.

Lheticus
2015-10-30, 03:09 PM
All of this looks simple to those of us who have studied probability, and mystifying to those who haven't. So let me ask you a question.

If you walked into a mathematics class you've never had, half-way through the semester, do you think you could follow that day's lecture, without the several weeks that preceded it??

That's what you're trying to do.

If you want to understand probability, then buy and read a basic probability book, or attend a basic probability class from the beginning.

I think my precalculus class or...I could swear SOMEWHERE a math class I took in high school covered at least the basic basics of the sort of calculations probability involves. And really, you can't take poker seriously without taking the first steps to study what probability is in any case. Not sure exactly why you have such a problem, I've been able to follow the overall explanation here pretty well and am no longer confused. So thanks everyone, this was a very enthusiastic response!

BannedInSchool
2015-10-30, 04:03 PM
Some other interesting hold'em probability problems:

You can consider all your opponents' unknown hole cards to still be in the deck as possible cards to be dealt on the table. You can calculate the odds of whatever you're looking to hit being held by someone else or not with a reduced deck drawing new cards from, but it all comes out in the wash as if everything else were still in the deck. For example, if you're looking to hit a flush and your opponents do in fact have some of that suit it's less likely a card of that suit will be dealt, but if they don't then the odds go up, and it balances out to just ignoring what they may or may not be holding.

IIRC, if you're starting with pocket jacks there's a 50% chance the flop will have no jacks and at least one card queen or higher. This is why jacks are unplayable. :smallwink:

lio45
2015-10-30, 08:15 PM
EDIT: The dice on the other hand, does use replacement, so is a binomial distribution instead, and slightly easier to calculate. You can however still use the same reversal trick as above to do less work: the probability of rolling at least one 20 is 1 - the probability of rolling no twenties in your five trials.

Quite simply, for the dice, it's 1 - (19/20)^5.

(Replace that 5 by n for n consecutive rolls.)

Knaight
2015-11-02, 01:29 AM
If you walked into a mathematics class you've never had, half-way through the semester, do you think you could follow that day's lecture, without the several weeks that preceded it??

That's what you're trying to do.

It's more like picking a particular small part of one lecture in something more advanced, and trying to get just enough explanation for exactly it. That's not necessarily all that difficult, provided that the subject matter isn't completely esoteric. Give me two hours and a kid that has never so much as done algebra, and I can explain any one theorem that pops up in a standard calculus 1-3 class. That doesn't mean they'll actually be able to use it, as other crucial information will be missing and just about every problem (particularly anything real world) is going to require significantly more knowledge than just the one thing, but getting just that one thing across is doable.