Shuffler Part 2

2021-08-25

In part 1, there was discussion of probability basics. We tried to make sense of variation in something as simple as flipping a coin. Namely, there are a certain number of unusual events that are expected in a large sample, and it’s critical to determine whether the right number of unusual events are happening rather than no unusual events at all.

In this article, we will stick to checking the following aspects of the shuffler:

  1. The percentage of the time that black blitzers, red blitzers, and both are dealt in a hand
  2. The distribution of cards in the blinds, including the percentage of the time each card is found in the blind when one of the cards is the queen of clubs or jack of diamonds.
  3. Partner hands: Do the hands with the jack of diamonds have a better than average chance of getting other trump cards?
  4. How often does blitzing happen after a hand where everyone passes?

There will be more tables showing summaries of the data in this article. An attempt was made to limit this when possible.

Some remediation - the choose function

We use the concept of a choose function several times in this article, so we will take a moment to explain it. If you are familiar with a choose function, move on to “First step - determine the total number of unique hands”.

Consider a group of five cars, each having a different color (red, blue, green, black, white). If you are instructed to choose any two of them and the order doesn’t matter, there are 10 ways to choose the two cars.

(red, blue)
(red, green)
(red, black)
(red, white)
(blue, green)
(blue, black)
(blue, white)
(green, black)
(green, white)
(black, white)

Fortunately, there is a quick way to determine the count. In our specific case, we say 5 choose 2 is

5!2!(52)!=5432121321=202=10\frac {5!} {2! \cdot (5-2)!} = \frac {5 \cdot 4 \cdot 3 \cdot 2 \cdot 1} {2 \cdot 1 \cdot 3 \cdot 2 \cdot 1} = \frac {20} {2} = 10

First step - determine the total number of unique hands

For many of you reading this, this might be your first time seeing a choose function and considering how to count the number of ways to select a certain number of cards. Relax and do not worry about understanding every detail; instead, try to follow the main idea.

We are interested in the total number of possible hands a player could be dealt. In our case, the order the player receives the cards makes no difference, and we do not allow the player to get two of the same card (without replacement). This is “32 choose 6” and it refers to the number of ways to choose 6 items out of 32 without replacement and without respect to the order the 6 are chosen. The calculation is

N=32!6!(326)!=906,192N = \frac {32!} {6! \cdot (32-6)!} = 906,192

We will determine most probabilities based on the number of possible ways a certain hand can be dealt divided by the total number of possible hands that can be dealt (906,192).

Percentage of hands with a blitz

We need to establish an expectation for the probability of a blitzer before we can check whether the shuffler is matching that probability. This calculation will rely on the choose function discussed above. The calculation presented here is more of a long-hand approach, and this is done in an attempt to make it simpler to follow than it otherwise might be.

We need to determine the number of hands that would produce a blitz and divide it by 906,192. The number of hands that contain both black queens is 30 choose 4. To count the number of these hands, we recognize we can only change the 4 remaining cards in the hand (6 cards in the hand minus 2 black queens), so the total count of possible black blitzer hands is

BB=30!4!(304)!=27,405BB = \frac {30!} {4! \cdot (30-4)!} = 27,405

The probability of a black blitzer in any of the five hands at the table is

527,405/906,192=15.1215 \cdot 27,405/906,192 = 15.121%

Similarly, the count of red blitzers (RB) is the same as the number of black blitzers (BB). If I want to know the probability of any blitzer, the sum of BB and RB would be too high since each one counts the probability of both. Thus, the probability of any blitzer is

P(Blitzer) = P(BB) + P(RB) - P(4Q) - P(BB in one hand; RB in another)
                 = 15.121% + 15.121% - P(4Q) - P(BB; RB)

The probability of a player receiving all four queens is 28 choose 2 divided by 906192, or 0.209%. The probability of two black queens in one hand and two reds in another is more challenging to calculate. One way is presented here. We start with the probability of someone having the black queens. We will want to multiply that by the probability that neither red queen is found in the same hand with the black queens (24/30). Finally, we multiply by the probability that the same player who gets the first red queen also gets the second (5/29). Then

P(BB;RB)=15.121%(24/40)(5/29)P(BB; RB) = 15.121\% \cdot (24/40) \cdot (5/29)

Finally, we conclude that the probability any player at the table receives either blitzer is

15.121%+15.121%0.209%2.086%=27.948%15.121\% + 15.121\% - 0.209\% - 2.086\% = 27.948\%

We can compare these figures against what we are seeing dealt on the site. The results are found in the table below:

Hand Type % Expected Site %
Blacks (or Reds) in the same hand 15.121% B: 15.196%; R: 15.194%
All 4 queens in the same hand 0.209% 0.207%
Blacks in one hand, reds in another 2.086% 2.125%
Hands with the reds or blacks together 27.948% 28.058%

These results are based on the most recent 430,000 hands played on the site as of the publishing of this article.

Blinds Analysis

Each card should appear in the blinds 2 out of 32 hands (6.25% of the time). The least common card in the blinds is the ace of clubs (6.167%) and the most common is the ace of hearts (6.318%). Even without an in-depth analysis, it seems there isn’t an extreme bias in the cards in the blinds.

One other thing about the blinds seems worth investigation. It’s great that each card appears the right amount of times, but it would be a problem if the existence of one card in the blinds made another card much more common. We will limit the investigation to hands where the jack of diamonds or queen of clubs is found in the blind. Since only 1 in 16 hands have each of these cards, this reduces the data down to about 27,000 hands.

When we limit to hands with one specific card, the probability of each other card is 1 in 31 (3.226%). The table below shows the percentage of the time each trump card is found in the blinds with the queen of clubs. There is variation around the 3.226% expected, but by inspection, there does not appear to be bias in the shuffler.

Hands where the queen of clubs is in the blind

Card % Of Card
Queen Spades 3.046%
Queen Hearts 3.243%
Queen Diamonds 3.421%
Jack Clubs 3.319%
Jack Spades 3.090%
Jack Hearts 3.396%
jack Diamonds 3.133%
Ace Diamonds 3.235%
10 Diamonds 3.286%
King Diamonds 3.060%
9 Diamonds 3.079%
8 Diamonds 3.312%
7 Diamonds 3.275%

Hands where the jack of diamonds is in the blind

Next we review the rate at which each other trump card is found in the blinds with the jack of diamonds. We observe the same kind of variation around 3.226% without a strong bias for any card.

Card % Of Card
Queen Clubs 3.098%
Queen Spades 3.332%
Queen Hearts 3.408%
Queen Diamonds 3.264%
Jack Clubs 3.184%
Jack Spades 3.246%
Jack Hearts 3.278%
Ace Diamonds 3.332%
10 Diamonds 3.148%
King Diamonds 3.105%
9 Diamonds 3.271%
8 Diamonds 3.249%
7 Diamonds 3.159%

These values are all within a reasonable tolerance of the expectation. We are satisfied that there isn’t correlation in the blind cards.

Partner hand investigation

The probability of any player getting a specific card in the deal is 6 in 32. For the player who is dealt the jack of diamonds, the probability of getting any other card is 5 in 31 (16.129%). We will show that the shuffler is doing that in this section. Note there is less variability in this section than the probabilities where the queen of clubs or jack of diamonds are found in the blinds. This is because we include every hand where the jack of diamonds was not in the blinds in this section, and that is the vast majority of hands.

Card % Hand With Card
Queen Clubs 16.20%
Queen Spades 16.12%
Queen Hearts 16.04%
Queen Diamonds 16.14%
Jack Clubs 16.20%
Jack Spades 16.16%
Jack Hearts 16.08%
Ace Diamonds 16.09%
10 Diamonds 16.06%
King Diamonds 16.10%
9 Diamonds 16.11%
8 Diamonds 16.18%
7 Diamonds 16.07%

The partner seems to be getting an equal share of every card other than the jack of diamonds.

Hands following everyone passing

There has been a lot of suspicion about blitzing on a hand after everyone passes around. The probability of a blitz should be the same after everyone passes around as it is on every other hand. The next hand will be checked in two ways. First, the next hand will be the next hand dealt on the site, regardless of which table gets it. The second will be the next hand at the same table.

Proponsity to deal blitzers after everyone passes

The review of these two ways of thinking of the “next hand” is found in the table below. We can compare the hands after everyone passes to the expectation and to the entire set of hands dealt. There does not appear to be anything irregular happening, but we test this more rigorously inthe next section.

Hand Type % Expected Site All Hands% Site After Everyone Passes - Same Table Site After Everyone Passes - Any Table
Blacks (or Reds) in the same hand 15.121% B: 15.196%; R: 15.194% B: 14.979; R: 15.005 B: 14.878%; R: 15.159
All 4 queens in the same hand 0.209% 0.207% 0.219% 0.216%
Blacks in one hand, reds in another 2.086% 2.125% 2.073% 2.144%
Hands with the reds or blacks together 27.948% 28.058% 27.693% 27.677%

Confidence intervals for two same color queens and all four queens

The percentages for the two same color queens do look a little off, particularly the one that looks at the next hand on the same table. We would like to determine 95% confidence intervals for those values. It’s a standard way of checking whether the values we are observing are way out of line given our sample size.

The formula to determine the 95% confidence interval of a proportion is

Lowerbound=p1.96p(1p)/NUppderbound=p+1.96p(1p)/NLower bound = p - 1.96\sqrt{p*(1-p)/N} \\ Uppder bound = p + 1.96\sqrt{p*(1-p)/N}

In the formula, p refers to the true probability of an event (or an estimate if the true probability is unavailable), and N refers to the sample size available. In our case, we have about 41,000 hands that occurred after everyone passed. Thus, the confidence interval is for two queens of the same color is

p=(302928275)/(4321)/906192=15.121%Lowerbound=15.121%1.9615.121%(115.121%)/41000=14.774%p = (30*29*28*27*5)/(4*3*2*1)/906192 = 15.121\% \\ Lower bound = 15.121\% - 1.96\sqrt{15.121\%*(1-15.121\%)/41000} = 14.774\%\\

The 95% confidence interval for all four queens is done similary with an upper and lower bound of 0.16% and 0.25%, respectively.

All of our values fall within the confidence intervals calculated, so the shuffler is working within a reasonable tolerance of our expectation. A lot of people have observed that it seems blitzers are more prevalent after everyone passes. It would be a good exercise to record each hand after everyone blitzes for at least a couple hundred of these hands. Note that the confidence interval on a couple hundred hands would be quite a bit wider what is shown above. Further, note that we are talking about the deal in this article and not the hand the picker has after receiving the blinds.

In the next article, there will be discussion of streaks in Sheepshead hands.