The Hypergeometric Probability The Hypergeometric Probability

When working out the likelihood of having a certain card in your opening hand, the Hypergeometric Probability Distribution Function comes into play. That’s a very impressive title, and it represents some extremely difficult maths. The maths is so awful, in fact, that not even professional mathematicians enjoy working with it. Instead, they use a calculator. The Hypergeometric Calculator. You can find many different ones online, but here’s the one I use the most.

Using the Calculator

The calculator has four different inputs:

Population Size Number of Successes in Population Sample Size Number of Successes in Sample



All of these have weird names, but are in fact pretty straightforward.

Population

You can think of the Population Size as the Deck Size. If you’re playing a 40-card deck, you’ll want to type the number “40” into this box. There are some more factors that we’ll use to change this number later on; for now, it’s just the exact number of cards in your maindeck.

Successes

“Successes” are the cards you want to draw. Say we’re calculating the probability of having a copy of Solemn Strike in our opening hand. In this case, the “Success” will be “Solemn Strike”. It should now be clear the the second box in our calculator –Number of Successes in Population – could now be read as Number of Solemn Strikes in Deck. Of course, this won’t be the case if you’re working out the probability of drawing into a card other than Solemn Strike.

Sample

Finally, the “Sample” is the number of cards drawn from the deck. The Sample Size can be read as Hand Size. If you’re going first, you draw 5 cards in your opening hand. This means that the Sample Size will be 5. The Number of Successes in Sample should also be quite clear now: It’s the number of cards which we want to draw in our opening hand. If we were working out the probability of having a Solemn Strike in our opening hand, we could interpret Number of Successes in Sample to read Number of Solemn Strikes in Opening Hand.

It really isn’t too difficult. The Population is the Deck, the Sample if your opening hand, and the Successes are the things that you’re looking for. With that in mind, let’s get into some examples of how the calculator can be useful.

Probability of drawing a certain card Probability of drawing a certain card

Here’s a really common problem: You play 3 copies of Brilliant Fusion in a 40-card deck. How likely are you to have 1 of those copies in your opening 5-card hand?

Easy! All we have to do is use the calculator to input the information. The Population Size is the number of cards in our deck, which is 40. Number of Successes in Population is the number of Brilliant Fusions in the deck, which is 3. We have a 5-card opener, so the Sample Size is 5. Finally, we’re only looking to draw into 1 of those Brilliant Fusions, so the Number of Successes in Sample is 1.

Population Size = 40

Number of Successes in Population = 3

Sample Size = 5

Number of Successes in Sample = 1

Plug all of those numbers into the calculator and hit Calculate. Congratulations, you just did some university-level maths! The result we get is 0.337550607, which is a pretty odd-looking number. Multiply it by 100 to get it as an easy-to-read percentage: Just short of 34%.

This means that the probability of opening a card which you play 3 copies of (going first) is 34%, roughly one in three games!

Probability of NOT drawing a certain card

One of the most commonly played cards in decks featuring Brilliant Fusion is Gem-Knight Garnet. Although it’s often critical to draw into Brilliant Fusion, you never want to open Garnet. Say that you play 2 copies of Garnet in a 40-card deck. How likely are you to NOT have 1 of those copies in your opening 5-card hand?

To start off with, let’s just work out what the probability of actually drawing into one of the Garnets is:

Population Size = 40

Number of Successes in Population = 2

Sample Size = 5

Number of Successes in Sample = 1

That comes to 0.237. To find out the probability of NOT opening a garnet, you simply have to take away the answer from 1. That means that the probability of NOT opening a garnet is 1 – 0.237, which is 0.763 (about 76%). Because of this, if you play 2 copies of Garnet, you should be safe about three quarters of the time!

Modifying the Probability

You should now have grasped the very basics of the Hypergeometric Calculator. However, there are some instances which can change how likely you are to see certain cards in your opening hand.

Search effects Search effects

Here’s another common problem. You’re playing a 40-card HERO deck. The deck features 3 copies of Elemental HERO Shadow Mist, 3 copies of A HERO Lives, and 3 copies of E – Emergency Call. How likely are you to have access to 1 Shadow Mist in your opening 5-card hand?

The important thing to note here is how both A HERO Lives and E – Emergency Call can “search” for your Shadow Mist. This means that you’re essentially playing 9 copies of Shadow Mist in that 40-card deck. Because of this, we can adjust the Number of Successes in Sample to match the number of ways we can get to Shadow Mist:

Population Size = 40

Number of Successes in Population = 3 + 3 + 3 = 9

Sample Size = 5

Number of Successes in Sample = 1

Using the Calculator, we can see that it’s 74%. No wonder HERO decks are so consistent!

Draw Effects Draw Effects

There is an old argument between casual and competitive players, focusing on the card Upstart Goblin. Many competitive players would include 3 copies of it in their decks, in order to increase the consistency of their decks. The main argument for this is that, “When you play Upstart Goblin, you cycle through 1 card of your deck. Therefore, playing 3 copies effectively reduces your maindeck size by 3“. However, 3 cards seems pretty negligible. How much more consistent can it make your deck? Using the calculator, we can find out!

You’re playing a 40-card deck, with 3 copies of Upstart Goblin in it. You want to work out how likely you are to see 1 of your 3 maindecked Brilliant Fusion in your 5-Card Opening Hand.

Population Size = 40 – 3 = 37

Number of Successes in Population = 3

Sample Size = 5

Number of Successes in Sample = 1

Before working out the result, remember that we’ve already worked out the probability for the exact same problem (ignoring the Upstart Goblins). It was the very first example, and the probability came to 33.7%.

Using the calculator, I can tell you that the probability of drawing into one of those Brilliant Fusions, given that we’re playing the 3 Upstarts, is 36.2%. Although this is only a marginal increase in consistency, in a tournament setting featuring many matches, it can make all the difference.

Going Second

Lastly, the probabilities change a little when you go second, rather than first. The difference here is seen in how the player going second get to draw an extra card on their first turn. This essentially makes their opening hand size 6, rather than 5.

All we have to do to modify this probability is change the Sample Size from 5 to 6.

You’re playing a 40-card deck with 3 copies of Brilliant Fusion in it. How likely are you to see 1 copy of Brilliant Fusion on your first turn, knowing that you’re going second?



Population Size = 40

Number of Successes in Population = 1

Sample Size = 5 + 1 = 6

Number of Successes in Sample = 1

The calculator tells us that this is 39.4%. Easy!

Adjusting for the Mean

In a game of Yugioh, you don’t always get to go first. Equally, you don’t always get to go second. Because of this, all of the probabilities that we’ve worked out are only relevant half the time (unless you have a loaded die). Luckily, there’s a way to work out the probability of opening a card on average. It’s called the Mean Probability.

To calculate the Mean, all we have to do is glue together the probabilities of us going first and second. Specifically, you just have to add them together, and then divide by 2.

Here is an example: At the very beginning of this article, we calculated that the probability of drawing into 1 Brilliant Fusion (in a 40-card deck, knowing that we play 3 copies) on the first turn of the game, is 34.7%. In the most recent example, we showed that the probability of doing this changes to 39.4% when going second. So, what’s the mean probability?

39.4 + 34.7 = 74.1

74.1 ÷ 2 = 37.05

37%. Easy! It’s important to calculate the mean when talking about cards on average, as you only get to go first about half of the time. The Mean probability lets us know how likely we are to see the card in our opening hands through an entire tournament -In this instance, about 37% of the time!

In Closing



If you read through this entire article, you should be proud of yourself! Maths is tough, and the Hypergeometric Distribution is something that many High School Maths teachers haven’t even heard of.

Probability is a huge component of Card Games. Whether you’re working out how likely you are to perform a combo, or seeing what the odds of your opponent having a Hand Trap are, chance and likelihoods are everywhere: Being able to utilize the calculator to its full extent is a skill that every master Duelist needs to have in their toolbelt. Think you can handle some more maths? Check out part 2 here!

Until next time – Stay Groovy!