Bibbs1000
Bibbs1000
  • Threads: 2
  • Posts: 8
Joined: Nov 9, 2020
April 16th, 2021 at 11:36:47 PM permalink
I was curious about the odds of a 29 (perfect hand) in cribbage. I looked it up on Wikipedia and found the answer was 1 in 216,580. I thought it would be interesting to determine how to calculate it. Everywhere I looked in the Googles when showing this calculation it was done with the starting assumption that you know that there are 4 combinations of 4 cards that work for the hand out of 6 cards. So you take these 4 combinations x 47C2 ways of grouping the other 2 cards in your hand that you will discard and divide by the 52C6 possible hands and you get odds of 1 out of 4,708.26087 of having the correct 4 cards in your hand. But then with the 46 cards left in the deck only 1 card (the 5 in suit that matches the jack) will get you the perfect hand so multiply by 1/46 and you get the 1 in 216,580 which agrees to Wikipedia. Pretty straightforward.

But I thought: what if we didn't know that there were exactly 4 hands that would score a 29? How would we go about calculating the odds in that case? (although I am assuming that you know that the perfect hand is 555J with a turnup card of the other 5 and the turnup 5 is the same suit as the Jack)

My approach was to think of each card that you would have to be dealt in your hand of six cards: say first card was a 5, odds of this are 4/52; 2nd 5 odds are 3/51, 3rd five odds are 2/50 and for the Jack it can't be a Jack in the same suit as any of the 5's so odds only 1/49. Then for the other 2 cards in your hand that you will end up discarding they can be anything but a 5 so odds of 47/48 and 46/47. The turnup can be only the one remaining 5 so 1/46. So if I do the math I get (4x3x2x1x47x46)/(52x51x50x49x48x47x46) = 1 in 12,994,800. This is exactly 60 times higher than it should be.

So then I thought about how I approached the calcs as if I got one 5 first then another, etc. Of course the order doesn't matter. We get 6 cards and we keep 4 so thought I should divide by 6C4 = 15 and now I have odds of 1 in 866,320 which is exactly 4 times what the correct answer should be. I thought about the 4 cards I would keep in my hand and that again the order of those cards doesn't matter so I should divide by 4C4 = 4 and now I get correct answer of 1 in 216,580.

Although I came to correct answer I have a nagging suspicion that my logic is not correct. In particular it seems like I should not need to look at the 6C4 ways of grouping 4 card hands out of 6 cards AND 4C4 ways of grouping the cards within the 4 card hand retained. It feels like I'm doubling up even though the answer does work out.

If anyone good at odds happens to read this I'd like to know if I am calculating this correctly.
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
April 17th, 2021 at 12:14:28 AM permalink
Quote: Bibbs1000

My approach was to think of each card that you would have to be dealt in your hand of six cards: say first card was a 5, odds of this are 4/52; 2nd 5 odds are 3/51, 3rd five odds are 2/50 and for the Jack it can't be a Jack in the same suit as any of the 5's so odds only 1/49. Then for the other 2 cards in your hand that you will end up discarding they can be anything but a 5 so odds of 47/48 and 46/47. The turnup can be only the one remaining 5 so 1/46. So if I do the math I get (4x3x2x1x47x46)/(52x51x50x49x48x47x46) = 1 in 12,994,800. This is exactly 60 times higher than it should be.



By the time you get the second card, there are only 50 cards left in the deck, because your opponent has been given a card.
Bibbs1000
Bibbs1000
  • Threads: 2
  • Posts: 8
Joined: Nov 9, 2020
Thanked by
SOOPOO
April 17th, 2021 at 9:33:10 AM permalink
Thanks, but I don't think that matters since your opponent's cards are unknown to you. By the time you get your second card there are indeed 50 cards left in the deck, but there are still 51 cards unknown to you so odds would be based on 51 cards not 50.
unJon
unJon
  • Threads: 16
  • Posts: 4751
Joined: Jul 1, 2018
April 17th, 2021 at 9:41:30 AM permalink
Quote: Bibbs1000

Thanks, but I don't think that matters since your opponent's cards are unknown to you. By the time you get your second card there are indeed 50 cards left in the deck, but there are still 51 cards unknown to you so odds would be based on 51 cards not 50.



I don’t know how to play cribbage but agree your logic is flawed, if I’m following it.

You are neglecting where you get four fives so your Jack can be any suit (and you discard the five that matches the suit of the jack).

Your reduction for order not mattering should be 6! Or 720. That’s the number of ways to arrange six cards.

ETA: Ignore this. I reread your post and see I misunderstood first time. Will post again shortly.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
unJon
unJon
  • Threads: 16
  • Posts: 4751
Joined: Jul 1, 2018
April 17th, 2021 at 10:08:08 AM permalink
Flub. Will revert.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3007
Joined: Jun 17, 2011
April 17th, 2021 at 11:04:54 AM permalink
The easiest way is to think that your initial hand consists of six cards. There are 52*51*50*49*48*47/6/5/4/3/2/1 = 20358520 of these.
The seventh card can be one of 46 cards.

Four of your six cards have to be 5 5 5 J covering all the suits (there are 4 ways to do this, the Jack can be one of four suits). The other two cards can be any other card except the missing "5". 47*46/2. The seventh card has to be the missing "5". 1 perm.

So the "winning" perms is 4 * (47*46)/2 * 1 = 4324.

The total possible perms = 20358520 * 46 = 939491920.

The ratio of these two numbers is 1:216580.
Bibbs1000
Bibbs1000
  • Threads: 2
  • Posts: 8
Joined: Nov 9, 2020
April 17th, 2021 at 12:10:51 PM permalink
Agree. That is the method I described in the first part of my question. However I was trying to solve by looking at the odds as you received each card in your hand without knowing that there are 4 winning hands. This alternative approach must of course lead to the same answer, and I did get there. However, my logic in my approach feels slightly off but I can't put my finger on what it is that is wrong. It does get the correct answer but this is because my first answer was 60 times lower than it should be so I started looking at approaches to increase the odds of winning by looking at combinations of cards in the hand.
SOOPOO
SOOPOO 
  • Threads: 123
  • Posts: 11441
Joined: Aug 8, 2010
April 17th, 2021 at 2:22:14 PM permalink
For whatever it is worth, I did have a 29 once. I think an even rarer feat.... I had 120, was not the dealer, scored zero in the play, had a zero hand, and lost. Not sure what the odds of that’ dismal result is.
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3044
Joined: Nov 26, 2018
April 17th, 2021 at 8:07:56 PM permalink
Probably far more trouble than its worth but, I wonder what the odds are of getting a 29 in the crib? Obviously it's very unlikely that your opponent will gift you with a J-5 or 5-5 and yet ... it does happen.

For example (and assuming no flush options), suppose your opponent gets a 5-6-6-9-9-J and you get a 5-5-7-8-8-9. Then the fourth 5 (suited with the jack) flips over. Bada bing!
Have you tried 22 tonight? I said 22.
Bibbs1000
Bibbs1000
  • Threads: 2
  • Posts: 8
Joined: Nov 9, 2020
Thanked by
Gialmere
April 17th, 2021 at 11:18:02 PM permalink
Super interesting idea. Here's how I came up with an estimate.

First, I assumed that the only way that an opponent would give you a 5-5 or a 5-J in your crib was if there was a likelihood for them scoring higher with their other 4 cards. I could not figure out how to calculate the odds so I ran a simulation with 100,000 hands. The simulation works by the computer randomly getting dealt 6 cards and then looking at each of the 6C4 = 15 combinations scoring 1/46th times each of the remaining cards in the deck. The combination that scores the best is kept and the other two cards are discarded. In those 100,000 simulations only once was there a discard a 5-J(or J-5) and never was there a discard a 5-5. So we are talking about very rare events.

Then I figured out the odds of me getting two 5's (which I would need if opponent discarded 5-J) or J-5 (which I would need if opponent discarded 5-5). This I could figure out as 122,040,576/1.46581344E10 = 0.832579% for the 2 fives and 20,340,096/1.46581344E10 = 0.138763 percent for the J-5.

So the odds of me getting the 4 cards needed are (0/100,000 x .138763%)+(1/100,000 x 0.832579%) all times 1/40 (chance of the right turned up card out of the remaining deck). This works out to 1 in 480,439,694. Hugely rare.

Of course this only works if my simulation is proper. I was surprised to see zero discards of 5-5 so I have some question about my simulation. I may look at that a bit further and try some other simulation runs to see it holds after many simulations.
SOOPOO
SOOPOO 
  • Threads: 123
  • Posts: 11441
Joined: Aug 8, 2010
Thanked by
Gialmere
April 18th, 2021 at 3:55:55 AM permalink
Quote: Bibbs1000

Super interesting idea. Here's how I came up with an estimate.

First, I assumed that the only way that an opponent would give you a 5-5 or a 5-J in your crib was if there was a likelihood for them scoring higher with their other 4 cards. I could not figure out how to calculate the odds so I ran a simulation with 100,000 hands. The simulation works by the computer randomly getting dealt 6 cards and then looking at each of the 6C4 = 15 combinations scoring 1/46th times each of the remaining cards in the deck. The combination that scores the best is kept and the other two cards are discarded. In those 100,000 simulations only once was there a discard a 5-J(or J-5) and never was there a discard a 5-5. So we are talking about very rare events.

Then I figured out the odds of me getting two 5's (which I would need if opponent discarded 5-J) or J-5 (which I would need if opponent discarded 5-5). This I could figure out as 122,040,576/1.46581344E10 = 0.832579% for the 2 fives and 20,340,096/1.46581344E10 = 0.138763 percent for the J-5.

So the odds of me getting the 4 cards needed are (0/100,000 x .138763%)+(1/100,000 x 0.832579%) all times 1/40 (chance of the right turned up card out of the remaining deck). This works out to 1 in 480,439,694. Hugely rare.

Of course this only works if my simulation is proper. I was surprised to see zero discards of 5-5 so I have some question about my simulation. I may look at that a bit further and try some other simulation runs to see it holds after many simulations.

.

It depends on game score. If I’m non dealer, have 109, it is a no brainer to put 5,5 in the crib if I also have 7,8,8,9. Good luck trying to factor in game score into your calculations....!
unJon
unJon
  • Threads: 16
  • Posts: 4751
Joined: Jul 1, 2018
April 18th, 2021 at 4:53:47 AM permalink
Quote: charliepatrick


So the "winning" perms is 4 * (47*46)/2 * 1 = 4324.



Charlie, I don’t follow this. Why aren’t the winning perms:

4x3x2x1x47x46x6! ? Then divide that into possible perms six handed and spiking the last five?
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3007
Joined: Jun 17, 2011
April 18th, 2021 at 6:51:59 AM permalink
I might have incorrectly used the term "perms" rather than "combinations" which it was. Essentially you need three fives and the fourth suit Jack and any other two cards not being the fourth five. Personally I find it easier to ignore the order you are dealt the cards.

To give a simpler example the number of ways to get four of a kind with five cards is you need to (a) pick a rank (13 ways) (b) get all four of them (1 way) and (c) any other card in the pack (48 ways) - so total = 13*48 = 624. You'll see this matches the figure at https://wizardofodds.com/games/poker/ .

In this case for the six cards you need (a) pick a suit (4 ways) (b) get the Jack of that suit (1 way) (c) get the three fives in the other suits (1 way) (d) get two cards, excluding the fourth five, from the pack (47*46/2). You divide by two because you could get them in either order.

For the seventh card you need the last five (1 way).

This gives 4 * (46*46)/2 * 1.

Ironically if you had a 4324 and 29 points at bridge you'd probably open 2 Clubs (or similar depending on your system) - here's a story about a 5323 hand: https://www.bridgewebs.com/lee/29%20Point%20Hand.pdf
Bibbs1000
Bibbs1000
  • Threads: 2
  • Posts: 8
Joined: Nov 9, 2020
April 18th, 2021 at 10:37:24 PM permalink
I think there are just too many unknowns if trying to determine dependent on the score of the game because, as you note, player decisions change depending on what they need. So I was looking at this from near the start of the game and assuming that both players were trying to maximize their hand score.

I did discover that my simulation used in the above estimate was not accurate. So I tackled this another way. For the cards to end up in the crib they must of course be in the combined hands dealt to the player and the opponent. So I figured the odds of there even being a possibility of having the correct cards to put in the crib. This would be 4/52 x 3/52 x 2/50 (for the 5s) x 1/49 (for the Jack since only one suit will work) x 47/48 for other card (anything but the other 5) x 46/47 etc to x 40/41. Take that resulting total and multiply it by 12C4 for the number of ways to make the grouping of 4 cards x 4C4 ways of ordering the cards within each grouping of 4. Total of all this is 0.006094745

Next if either player has potential for 29 they will keep those cards and not discard and this would happen 4/12 x 3/11 x 2/10 x 1/9 x 1 x 1 x 6C4 ways of grouping the 4 cards = .0303030. So I will take the total in the above paragraph and multiply by (1-2 x .0303030) = .93939

Then I needed to know the probability that both players would discard either 5-5 or 5-J in this situation. I could not think of how to do this by formula so I used a simulation of 100,000 hands and found that this would occur .0759289 of the time. So this also gets multiplied by the product of above.

But there are a few situations where we still would not end up with the correct cards, most notably if the jack was of the wrong suit since only 1 suit will give us our 29 therefore multiply by .25

Also there is a possibility that both players discard a 5-5 (we need one to discard a 5-J to get the correct cards in kitty) from simulation of 100,000 this occurred 77/209 times so multiply by 1 - 77/209 = .631579

Similar issue with possibility that both players discard 5-J and from simulation of 100,000 this occurred 132/209 times so multiply by 1 - 132/209 = .368421

Finally even if we get the 4 cards we need in the kitty there is still only a 1/40 chance (only the other 5 turnup will give us our score out of the 52 card deck less 12 cards dealt) so multiply by 1/40.

Total of all the multiplications is .000000632 or 1 in 1,581,755

So this is my new best estimate. I'd feel better if I did not have to rely on simulation for some of the factors so if anyone can think of how to calculate it I'd like to hear it.

The estimate of 29 in kitty per above of 1 in 1,581,755 is 7.3 times less likely than a 29 in a player's hand. It should of course be less likely but I don't know that I can intuitively gauge whether that 7.3 times less likely is in the ballpark.
Suited89
Suited89
  • Threads: 9
  • Posts: 134
Joined: Dec 23, 2019
May 25th, 2021 at 11:50:43 AM permalink
I've had all four 5's with opponent cutting a Jack for the heel 28 + 2, 30 points, but no 555J with a 5 for 29.

Suited89
some people need to reimagine their thinking
Dieter
Administrator
Dieter
  • Threads: 16
  • Posts: 5968
Joined: Jul 23, 2014
May 25th, 2021 at 8:12:16 PM permalink
Quote: Bibbs1000

the only way that an opponent would give you a 5-5 or a 5-J in your crib was if there was a likelihood for them scoring higher with their other 4 cards.



If you're dealing to my sister, she'll hold the 9-8-8-7, throw the 5-5, and cut a 7 (a 6 on an off day).

It's obscene. She'll typically pull two or three 24 point hands a game; to the point where she just lays her hand down and says "standard 24".
May the cards fall in your favor.
Suited89
Suited89
  • Threads: 9
  • Posts: 134
Joined: Dec 23, 2019
July 12th, 2021 at 11:58:49 AM permalink
Sounds like Bill over at cardgames.io
I consider myself fairly good at the 2-handed game, and am lucky to make 105 against him.
some people need to reimagine their thinking
  • Jump to: