“I play collectible card games, like Magic or YuGioh or Pokemon.” This is the statement I usually have to admit when I start that awkward conversation with people not in the life. At this point, their puzzled looks typically grow in confusion… except the time I explained my hobby to my fraternity members. “Oh Magic,” they said, “I’ve played that before.” To be fair, my fraternity was Gamma Iota Sigma, the insurance and risk management frat. Had they been the Alpha Betas this would be a different story.

So how did they know about Magic? Well, under the umbrella of insurance there is a degree called actuarial science. These are the guys and gals that figure out the probability of damages happening in an insurance case, the probability of certain dollar amounts of damages, and how the company should price premiums for the insured. Needless to say, they folks are kind of smart and love their probs.

In a world of imperfect information, probability analysis is the best we have to make educated guesses. Evaluating a board state or predicting what cards your opponent might have in hand aren’t much different than figuring out the likelihood that a 16-year-old boy might crash his parents’ car. Actuaries play trading card games because the hobby rewards people with these skills. Lucky for us common folk, you don’t have to be a master of statistics to win at cards; however, it helps to know some tricks to improve your deck building and play skill.

Hypergeometric Distribution

This is, by and far, the most important function you can use as a card player when running stats on your deck. You can read about this theory in detail here. But let’s say you’re like me: it would take reading the opening paragraph of that article five times before you (maybe) gained a clue about what was going on. In that case, here are three quick and dirty points you need to know about Hypergeometric Distribution:

  • It measures successes over a finite number of draws from a finite pool of resources , where the pool of resources is not replenished after each draw.
  • The outcome of each draw can only be categorized as success or failure.
  • The probability of success is different for each draw.

Why Do We Need This?

If you want to figure out if Bottle of Wishes is the first shield in the row, you don’t need all this fancy math crap. You can just do three divided by forty—full playset of Bottles, divided by total cards in the deck (in this case the minimum) —and you would discover the odds are 7.5%. But that only measures the first shield. What if you want to know the odds of Bottle of Wishes being any of the five shields? This is where we need hypergeometric distribution.

Math is Hard

Computers do math well, so let them do the work. You could go back to the Wikipedia article and try your hand at the formulas there, or you can open a blank document in MS Excel and use the function HYPGEODIST (or HYPGEO.DIST in earlier versions of MS Excel). The function requires the following information (translated into card language):

  • Sample_s = how many successes you want (how many copies of a particular card you want to see)
  • Number_s = how many successes exist in the total population (how many copies of the card exist in your deck)
  • Population_s = how many draws from the population (how many cards you will draw from your deck to hit the particular card)
  • Number_pop = total population (total size of your deck)
  • Cumulative = TRUE (if the function ask for this you want cumulative calculations)

So if you run three copies of Bottle of Wishes in a forty-card deck, punch the following into the function:

  • Sample_s = 0
  • Number_s = 3
  • Population_s = 5
  • Number_pop = 40

Why use these numbers? Well, 3 is how many copies are in the deck and 5 is how many shield blasts you put out at the beginning of the game. You pull the shields from your starting deck without any other cards removed, so use your total deck size as the Number_pop (40 if you play the minimum). But 0? Yes, this doesn’t tell you want you want. It gives you the probability of not having this card in your shields; however, if you take this result and subtract it from one, then you will have the probability of at least one copy of Bottle of Wishes in your shields. In the above example, the odds of Bottle of Wishes as a shield is 33.76%.

Remember that Sample_s is how many copies you are solving for. If you put in 1, then the function will produce the odds of having exactly one copy of the card. This isn’t really helpful. Sure knowing the chance of one Bottle of Wishes is great, but having more than one is definitely a success as well. When you solve for 0 the function produces the chance of no copies; therefore, the other value that will make up 100% is the chance of having at least one copy ( % of zero copies + % of any amount of copies = 100%).

Note that this holds true for any shield blast you run three copies of in a forty card deck. So there is a 33.76% chance of Terror Pit, Stormspark Blast, etc. if you run full playsets in a deck where the deck total is at the bare minimum (testing per card in these examples are independent from other cards or factors). For exact results of one copy, two copies, or three copies of a blast in your shields, just change the Sample_s to the desired result.

Do You Accept the Challenge?

You can use this function for a seemingly infinite number of card game applications. For example, on your turn one going second, the odds of a shield-blasted Bottle of Wishes hitting the second Bottle of Wishes which will hit the third Bottle of Wishes in a forty-card deck is 0.013369%. Did you know how I got that answer?[1] Try some of the following problems and post your results in the comments below.

  • What are the odds of having at least two shield blasts in a forty-card deck when you run 18 spells with Shield Blast?
  • If you go second, what are the chances of hitting Andromeda on a turn five hard-casted Bottle of Wishes?
  • In a deck that runs 12 Light Cards, what are the odds that you will draw Keeper of Laws by turn four and have Light unlocked to play it?

As people comment, I will confirm if anyone posts the correct answers and jump in to help where I can.

[1] This requires the rule of the Probability of A and B, assuming A and B are independent events. For quick reference, when you want to know the chance of two independent events happening together (example: rolling a result of 3 on a die and flipping tails on a coin), you take the product of probability of each individual event; therefore, in the example the answer would equal the probability of rolling 3 multiplied by the probability of flipping tails.