News:

Precision Simulator update 10.181 (1 February 2025) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

Math problem: What are the chances of getting 4 Jacks in Skat?

Started by Will, Tue, 26 Nov 2019 02:31

Will

Disclaimer: This question has *nothing* to do with aviation!

Skat is a German card game played with a 32-card deck, which contains four each of 7, 8, 9, 10, Jack, Queen, King, and Ace. There are three players, each of whom is dealt a hand containing 10 cards, and the remaining two cards are placed face down on the table in a discard pile called the "Skat." The players then bid to see who plays alone (as the "solo player") against the other two, who compete as a team against the solo player. The solo player may pick up the Skat, use those cards to improve his or her hand, and then discard two cards back down into the Skat.

Thus, the solo player has access to 12 cards, and out of them, assembles the best 10-card hand.

The four Jacks are the most powerful cards in the game.

Hence: What are the odds that the solo player has all four Jacks?

I understand how to calculate the odds if the question were worded differently. The most commonly discussed combinatorial problem goes like this: if I draw four cards from the deck, what are the chances that I draw all four Jacks? The answer is straightforward: Before drawing any cards, there are 4 Jacks in a deck of 32 cards, so the odds of drawing a Jack when picking one card are 4/32. Then after that, there are 3 Jacks left in the 31 remaining cards, so the chances of getting a Jack on the second draw are 3/31... etc. Putting it all together, the odds of getting all 4 Jacks when drawing (just) four cards are:

4/32 * 3/31 * 2/30 * 1/29 = 0.00002780867 = 0.002780867% chance

But that isn't the Skat question, because the solo player isn't dealt just four cards, but instead has 12 cards in total. So when looking at 12 cards drawn randomly from a deck of 32, what are the chances that those 12 cards contain all four Jacks?
Will /Chicago /USA

mgeiss

It also depends on the order in which the cards are dealt. This pattern would go on, and the final answer would also depend on when the two extra cards are being put aside:

If you are the first one to get a card, your chances of getting a Jack with your first card are 4/32 = 0,125
If you are the second one, your chances of getting a Jack with your first card are 28/32 * 4/31 = 0,113
If you are the third one, your chances of getting a Jack with your first card are 28/32 * 27/31 * 4/30 = 0,102

Cheers,
Matthias

Steve - Browny

Hi Will,

I've done the calculations and get:
- The chance of having 0 jacks in your 12 cards is 14.56%
- The chance of having 1 jack within 12 cards is 10.80% (having at least one jack - having at least two jacks)
- Having 2 jacks in your 12 cards is 18.32%
- Having 3 jacks in your 12 cards is 25.29%
- Having all 4 jacks in your 12 cards is 31.03%

It doesn't matter what order the cards are dealt as each one has an equal chance of being in anyone's hand. You could take the first 12 cards or the last 12 cards or a combination of any and it would all be the same chance.

I've done up a spreadsheet that calculates the likelihood of each of the jacks with up to 32 cards if you're interested.

You are getting 37.5% of the deck in your hand.

I worked it out working out the odds of not drawing a jack. The first card is 28/32. If you don't draw a jack, the probability that the second card is neither a jack is 27/31, but if you did draw a jack on the first card, the probability the second card is not a jack now becomes 28/31. Adding all these trees together for the four jacks gives you the 31.03%.

So it is more likely to have all 4 Jacks than any particular combination. It becomes more likely to have 4 than 3 after 9 cards.

Hope this helps. Let me know if you need clarification on something or want the spreadsheet

mgeiss

The chance is much lower.

The number of all possible 12-card-combinations out of 32 is 225792840.
The number of 12-card-combinations which include all four jacks is 3108105.

So the chance of getting all four jacks in 12 cards out of 32 is 3108105/225792840 = 0,0138 = 1,38%
Cheers,
Matthias

Will

Steve, you are showing it getting progressively more likely to get more Jacks, and I don't think that's correct. It would be less likely to get four Jacks than three, I believe.

Just plating many hands of Skat gives one the experience that having all four Jacks happens pretty rarely. In fact, the Skat app on my phone stores all previously played games and lets you look at outcome statistics. The real-world presence of all four Jacks for the three players are this (after 13,600 played hands):

Player 1: 0.46%
Player 2: 0.55%
Player 3: 0.50%

So it looks like having all four Jacks is happening in about 1 of every 200 hands. But of course, knowing the formula for calculating the actual odds would be helpful; among other things, I could see if the computer's random number generator is doing it's job well or not.
Will /Chicago /USA

Steve - Browny

My bad,

Was thinking about this in bed late last night and didn't think about it and sounds pretty crazy.

meiss is correct that it is 1.38%

It's a hypergeometric distribution with the following formula (these are the combinations style so trying to represent it using two lines of two brackets:

(4)  x  ( 32 - 4 )
(4)      ( 12 - 4 )
____________
      (32)
      (12)

You're choosing 4 exact cards from 4 cards, then multiplying it by the remaining number of cards (28) and choosing 8 of them (12 - 4) and dividing it over the total number of combinations of choosing 12 cards out of 32.

This hypergeometric formula is built into Excel, you jut plug the numbers in: =HYPGEOM.DIST(4,12,4,32,FALSE)

Steve

mgeiss

After thinking about it for a while, I assume it's not the final answer because I still think that we need to take the other two players into account, and that's why we differ significantly from the ca. 0,5% in Will's statistics.

We can't just calculate the chances using the hypergeometric distribution, because that would only be correct if a single player is drawing 12 cards out of 32. We also need to factor in the chances that both of the other two players did not get a jack.
Cheers,
Matthias

Steve - Browny

Using the hypergeometric distribution does in this case. pick any 12 cards and give the rest to the other players. What are the chances that all the jacks are in your hands. It's all random so is equally likely no matter where they sit at the table, how you deal the cards etc. It would only be relevant if you had a partner.

I simulated a random deck of 32 cards 10,000 times and was averaging around 1.4% (results were usually between 1.2% - 1.5%).
I got this by assigning each value (7, 8, 9, 10, jack etc) a number (0,1,2 etc) and put them into groups by sorting the random numbers and getting the remainder of the sort when dividing by 8 (8 different values [7 through to ace]) and if that sort ID number came up 4 times within the first 12 cards, then the player successfully gets all 4 jacks. I use a specific card value ID (same remainder) so it isn't just any 4 cards of the same value so it is specific to jacks.

Based on your observation, an idea I did was that I changed the simulation to only use 10 cards and I got numbers floating around Will's numbers. The same happens when using the hypergeometric function in Excel if the players only get 10 cards out of the 32. So you get an extra 1% chance of getting 4 jacks if a you get to use the 2 cards in the middle as a part of your hand.

If you map the numbers 1 to 32 to cards (eg 1 = 7 spades, 2 = 7 clubs, 3 = 7 of diamonds etc), generate random numbers between 1 and 32 so they are in random order, then see if the jack cards are in the first 12 and mark it as true or false. If you do this heaps of times and count it all up, you get around 1.5%.

mgeiss

EDIT: I need to rethink...  :D I'll get back to this when my calculations are done.
Cheers,
Matthias

Will

The two cards that are in the middle (the "Skat") are available only to the solo player. To refresh everyone's memory, each player gets 10 cards, and then after the solo player is identified, he or she picks up the Skat and then sets two additional cards back down on the table. So by the time gameplay starts, everyone has 10 cards in their hand.

But two players only get 10 cards, while the solo player also gets to use what's in the Skat. Thus the solo player has access to 12 cards, while the opponents only have access to 10 cards each.

Perhaps we need to ask two questions:

1. What are the chances that any player's initial 10 cards will contain all four Jacks?

2. What are the chances that the solo player (using the Skat, for a total of 12 cards) will have all four Jacks?
Will /Chicago /USA

Steve - Browny

#10
Hi Will,

I expanded my simulation to shuffle 100,000 decks of cards. Player 1 (solo player) gets the first 12 cards, player 2 gets the second 12 and player 3 gets the next 12 with the scat being the last 2 cards.

1. Calculated of 1.752% (same as the hypergeometric formula as above but only using 10 cards and multiplied by 3 for the three players) that any player gets all four jacks with no player getting any advantage (evenly distributed). This was confirmed with the simulation.
2. Solo player without the scat 0.584%; Solo player with the skat 1.377%
This was also confirmed with the simulation

Bonus:
3. Skat has at least a jack = 23.790%
4. Skat has 2 jacks = 1.210%
5. A Player has no jacks in their hand = 20.342%
6. Solo player with skat has no jacks = 13.473%

All these were similar with the simulation

Will

QuoteSolo player without the scat 0.584%

This matches the statistics from my app. See my post above.

But can you help me prove it? If it's a hypergeometric distribution, what are the steps that one takes to prove that with 10 cards, there's a 0.584% chance of getting all four Jacks?

I can find hypergeometric calculators online, but they don't tend to "show your work," as our 7th grade math teachers admonished us to do. They just present the result. What computations are going on behind the scenes?
Will /Chicago /USA

Steve - Browny

#12
Hi Will,

So it uses this formula:

(4)  x  ( 32 - 4 )
(4)      ( 12 - 4 )
____________
      (32)
      (12)

On top is all the chances we have to get it with the skat, but without it would just be 10 - 4 on the top and 32 choose 10 on the bottom so would be:

(4)  x  (28)
(4)      (6)
____________
      (32)
      (10)

The reason it's this is because we need to choose 4 jacks from 4 jacks (only 1 card combination) and then choose 6 other cards from the remaining 28 cards (376,740 different card combinations). This is a successful hand that will win. But the total number of hands that are possible is having 32 cards and choosing 10 of them (64,512,240 different card combinations).

You've got to work out how many ways to get your 10 cards that have the 4 jacks in them, then divide them by how many possible ways you can have the 10 cards.

Did this explain it better?

If you need the detail on how the 24 choose 6 look up combinations: https://en.wikipedia.org/wiki/Combination

Will

I'm afraid I don't know how to compute this:

(4)  x  (28)
(4)      (6)
____________
      (32)
      (10)

What is the order of operations here?
Will /Chicago /USA

Steve - Browny

It's

4 choose 4   x   28 choose 6
          32 choose 10

Expanding the choose functions to factorials it becomes

4!/(4!x(4-4)!)  x  28!/(6!x(28-6)!)
        32!/(10!x(32-10)!)


4!/(4!x(4-4)!)  =  4!/(4!x0!)  =   24/(24x1) = 1
28!/(6!x(28-6)!)  =  28!/(6!x22!) =  376,740
32!/(10!x(32-10)!)  =  32!/(10!x22!)  =  64,512,240

Therefore its:
1 x 376,740
64,512,240

= 0.005839
= 0.584%

As it is all multiplication and division, there is no particular order of operations. The layout in your post that I originally posted is standard notation (the brackets above one another are supposed to be one). You could write it as the first one in this post. On your calculator you'll see the nCr. In your calculator you'd type 28 nCr 6 so your calculator should say 28C6 then press equals and it shows you how many combinations that you can choose 6 cards from 28 cards