[Mathcrafting] “On probability math, and how we can apply those skills and formulas to make more informed decisions.”

Redditor drawingdead0 wrote the following post on using the online Hypergeometric Calculator tool to make useful approximations of random chance to inform decisionmaking. The online hypergeometric calculator’s use translates readily to other games with random elements.

Imagine the following:

You're in a draft with a GU deck. You pull a hand with 2 Forests, 3 green spells, only one of which you can cast so far, and 2 spells that cost 2U. One island, and the hand is gorgeous - but no land at all and you straight up lose.

You're sitting at a table in the back of a PTQ that's about to start. You've laid out a hurriedly built UR Delver deck, since you've decided to attend on a whim. You're deciding how many non-instant/sorcery spells you can run before you start to hurt your Delvers. You don't have time to test at all, and are concerned about making the wrong decision.

You're in an online Daily playing Jeskai Tempo. You have a Seeker of the Way in hand and a Magma Spray in hand. Your opponent has only a 3/3, no cards, and is at 5 life. You are also at 5. Do you attack and hope to rip a burn spell, or wait to block, Spray their guy and gain a little life, ready to go into topdeck mode?

These lines may seem academic to players experienced with those specific decks or scenarios, but to others, there are a lot of answers like "it depends" or "I'd have to figure it out in-game". The purpose of this post is to help make informed decisions about scenarios like this, as well as help us optimize our deck numbers, make better keep/mulligan decisions, and better understand the nature of variance in magic and how to not only manipulate it, but be aware of the calculated risks we are taking. I also find this information personally useful to make me less salty about losing, which is something I struggled a lot with when I first started, which was not too long ago. Now that I understand that the odds of not drawing one of my playset are a lot better than I thought, I can shake off a "bad draw" much more easily and just get to the next game.

In this post, I'll be breaking down two critical formulas, walking through examples of these formulas, and wrapping it up with some of the ways we can apply this knowledge.


FORMULA 1 As both /u/Comma20 and /u/xxHourglass have pointed out, my first calculation was inaccurate. I was using a formula that assumed there was replacement after the first draw (e.g. draw your first card and there'd still be 60 in the deck). Here is a calculator that will get you more exact numbers using hypergeometric distribution, which is a more accurate way of calculating odds. As Hourglass says, "a good way to approximate things for a layman, but it should be indicated as such - an approximation." ***P = 1-(x/y)c x = number of "failures" in the deck (or cards that aren't what you're looking at) y = number of cards left in library c = number of looks we get at it. The bolded numbers you see use the Hypergeometric Distribution, so if you punch in the formula and it's not quite right, don't panic! EX. 1 The first example will be a simple one: Our odds of drawing one of our two Pearl Lake Ancients in our opening hand in a UB control deck. So for this: = 58 (60 - 2 PLA) y = 60, since it's our opener c = 7 in our opening hand.
P = 1-(58/60)7 = 22.14%
So to round, we'll have a PLA stuck in our hand more than 1 of every 5 games if we decide to maindeck two. EX. 2 For our next example, we'll use David Scheid's winning GR Monsters decklist from GPLA. With his choice of ten mana creatures, what are the odds we can play one on Turn 2, allowing for a turn 3 4-drop? Let's assume we are on the play. **Note: we'll ignore the wrinkles that are tap-lands, and assume we'll have access to 3 lands to keep the math simple for now. We'll get to more complex examples later. x = 50 y = 60 c = 8, seven plus our T2 draw step.
P = 1-(50/60)8 = 79%.
So we'll have a turn two dork 4 of every 5 games. Not bad. Interestingly, if we add a scryland to the mix, effectively adding another "look" at it:
P = 1-(50/60)9 = 83%.
Using this math, we can determine that a scryland ups our chances by about 4%, or give us the same math we would have on the draw. That's a reason they are so potent, they give us another look, just like drawing a card, though the cost of having tap-lands is real, and could undo the work it does. It also isn't exactly the same as drawing a card, because if you like it you don't get any deeper in the deck. We have to ask ourselves how much of a cost we want to pay for 4%. Let's add a single mana dork, and see how much we can push these odds.
P = 1-(49/60)9 = 86.1%.
EX. 3 Let's look at a crowd favorite: Jeskai Ascendancy Combo. I want to know how often the deck will be able to draw it's namesake enchantment in a given game. To do this, we need to make a declaration about how many cards the deck typically sees. I'll assume they can cast a Commune with the Gods and a Dig Through time, along with a 7 card opener and 4 turns of draw steps before we die. We'll put Lee Shi Tien's pro tour list on the draw. That gives us 7+4+5+7 which is 23 looks at it. If a more experienced Ascendancy player would like to chime in with a more typical number, I'd be happy to adjust the formula. x = 56 y = 60 c = 23
P = 1-(56/60)23 = 86.45%.
I've heard many players talk about this deck as if it always can dig to an ascendancy, but a 14% whiff rating is significant. From the perspective of "shooting for a 60% win rate", you're burning up 14 of your allotted 40% on losses that come from the deck's ability to dig. Let's say you see half your deck:
P = 1-(56/60)30 = 94.39
Which is why the deck runs things like Taigam's Scheming - it just needs to dig deep. It should also be noted that this example has the biggest discrepancy between the simple approximation and the actual values. If you're running Ascendancy Combo, make sure to be aware of this, as the discrepancy grows with the sample size. EX. 4 This will be the final example of this formula. For this, we'll calculate an in-game scenario. It's turn 4, we are on the play with Christian Seibold's Top 8 Sidisi Whip deck from GP Stockholm. We play a Sidisi, and we want to calculate our odds of getting a zombie. It gets more complex here, so we need to know about the previous 3 turns. Over the course of the game, we've drawn a Satyr Wayfinder and a Hornet Queen, and with the Wayfinder we milled 2 creatures. This plus the Sidisi we just played leaves 20 left in the deck. It also means that between our opening 6 (let's say we mulliganed, why not), our 3 draw steps and the 5 cards from the wayfinder, we have 46 cards left in the deck: x = 26 y = 46 c = 3
P = 1-(26/46)3 = 82.87%.
The odds are pretty good, but when you get into a tournament and whiff, consider this: For the sake of rounding, we can say there's a 1/5 chance of whiffing. Say you're in a 10-round tournament, and play 25 games within those 10 rounds. If you use the formula:
P = 1-(56/60)15 = 69.44%
To calculate the odds of seeing a Sidisi over a 7 or 8 turn game, you'll see 69%, or you'll see Sidisi in about 17 of those games . Your odds point to you whiffing in 1/5 of that, or 3-4 tournament games, which is significant. One more thing with this deck: Let's say you keep a 7 card hand without removal, knowing you're against a deck where you want a Downfall or Cut. You have access to 7 in the main, what are the odds we get one by turn 3 when we can likely cast it? We'll put ourselves on the draw (I'll keep because I'm on the draw).
p = 1-(46/53)3 = 35.2%.
Not great, so we better hope there isn't a rabblemaster or Mantis Rider we need to kill. It goes to 44.2% if we get another look (either by waiting a turn or applying a scryland). A 5th look puts it to abut 52.2%. This means that if you keep that hand and they have T3 Rabblemaster, you only have a little more than a coin toss of a chance to kill it after it's attacked you twice. Hope you have enough blockers!
FORMULA 2 The next formula will calculate our odds of drawing two pieces of a two-card combo. This is relevant to decks like Splinter Twin, or the wonderful Ensoul Artifact deck that warms our hearts. To do this, we take the same formula from above for both events, and multiply the two events together. Basically, we're taking the probability of drawing card A, but only within the draws that already include card B. %Event A * %Event B, or plugging it into our other formula, P = (1-(x/y)c ) * (1-(a/b)c ) x/y and a/b are the "nondesirable" fractions of the respective cards. Note: Sorry about the formatting, reddit isn't great at all this. EX. 5 Our first example will use the Robots deck from CCG in Japan. What are the odds of drawing a T2 Darksteel Citadel - Ensoul on the play?
P = (1-(56/60)8 ) * (1-(56/60)7 ) = 17.76%
Not great, but that doesn't tell the whole story of the deck. It also has the combination with Ornithopter, Ghostfire Blade or Springleaf Drum, giving it a total of 16 1-drop Ensoul targets. So, we can change the formula to reflect that. The above is also not quite up to par because it allows for the scenario of the Darksteel Citadel being drawn on T2, making for an awkward 5/5 with Summoning Sickness (though I'm sure it's still powerful). So let's adjust the formula - the first half is our enabler odds, our second half is our Ensoul odds within that. Our looks on the first try go down to 7, since the enabler has to be played on turn 1 for us to be able to attack on T2. So here are our odds of attacking with a 5/5 on turn 2 on the play:
P = (1-(44/60)7 ) * (1-(56/60)8 ) = 35.97%
Those odds are a lot better. Interestingly, it's 35% out of the 44.4% you have to draw the ensoul by T2, which means about 90% of the time you have Ensoul, you'll be able to attack with it T2. Still, 35% does not a winning deck make. The deck needs other ways to win the game, which is where the variation between Chief Engineer, Generator Servant, Heliod's Pilgrim, etc. comes in. EX. 6 Let's ditch Standard, shall we? Let's talk about Splinter Twin. How often, in a goldfish, do we have access to a natural Combo on the play? We'll use Zachary Kiihne's 3rd place list from SCG Worcester. Remember, we need Pestermite or Exarch by turn 3.
P = (1-(53/60)9 ) * (1-(56/60)10 ) = 41%
That's pretty good, considering two things: We're ignoring cantrips, and the deck has several ways to win beyond turn 4, such as a Kiki Jiki, a tempo game with Pestermites, or simply setting up to go off turn 5 or 6 instead. Consider that you want a 60% win percentage (this has been echoed by several pros as a good goal), and that 41% of it is taken care of by simply having nut draws. It's important to know these are goldfish scenarios, though, and your opponent plays cards. This shows us how often we have access to a T4 combo, though, which is very important to understand. Let's add a serum visions to showcase how good that card is by giving us 3 extra looks.
P = (1-(53/60)12 ) * (1-(56/60)13 ) = 51.32
So Serum Visions on T1 gives us access to the combo 12% more often. Is that card good? That's massive. However, in all of these examples, we have ignored one thing: Land drops. Using this land chart, we see that we have a 53.9% chance of hitting all 4 land drops, so we have to factor that in. We'll say no cantrips this time, just to keep it simple. We've already illustrated the massive impact Visions has on this. Luckily, we already have percentages so we just have to multiply them.
P = 0.5132.539 = *27.66%**.
So, the point is, we need cantrips. But that's still 27% of games you have the tools necessary to just T4 kill them, and that is... a high number of nut draws. Add a few more looks via cantrips or extra draw steps, a few Remands and ways to protect the combo, and you can see why this deck has been T1 for so long. EX. 7 What if we have a 4x legendary permanent and we don't want 2 copies? Let's go back to the Sidisi Whip deck. Unless they're packing Erase in the main, a 2nd whip is not ideal. Yes, you have a backup against Banishing Light or otherwise, but it's definitely not helping your hand. To calculate this, it's still Event A * Event B. We just have to make sure we're calculating those odds correctly. The first calculation is easy, we've done it a thousand times. But be careful, there are only 3 Whips left after you've drawn the first one, so if we're on the draw, by turn 4 it looks like this:
P = (1-(56/60)11 ) * (1-(56/59)10 ) = 14.98%.
This is another example where the odds hold a significant difference when replacement is considered. So, including 4 whips means that in 15% of your games, you'll have a legendary permanent rotting in your hand, unless they kill your Whip. Considering that Banishing Light, Utter End and Erase are all cards in this format, it's reasonable to take this calculated risk that isn't all that much of a disaster to have a backup. The same math applied to Thassa, Geist of Saint Traft, etc etc etc. EX. 8 We're almost home! I want to combat one point people made about Sidisi decks - that "chance you mill your only answer". It's a real risk, but I'd like to address it mathematically. Say you have 4 Polluted Delta and two island, and you need a second blue for Dig Through Time. Say you play a Sidisi on Turn 4 on the draw, having already fetched one of the islands. What are the odds you mill the 2nd one, shutting down your Polluted Deltas from finding blue? It's the first formula, plain and simple. We've drawn our opening 7 and 4 draw steps, so there are 49 cards left. 48 of them are not Islands. We are milling 3.
P = 1-(48/49)3 = A meager 6.12%.
That is still a nonzero amount of risk, but most people will take the 94% odds that everything will be fine.
Application: What Can We Learn From This? A) Use this to optimize numbers in your deck. I see too often, people running black midrange decks that revolve around killing threats, and they have 5 removal spells, then complain about not drawing them. I am guilty of only putting 2 Devour Flesh in my Mono Black Devotion sideboard, then thinking I was okay against Blood Baron of Vizkopa. Or people leaning entirely on a powerful interaction (e.g. Ensoul Artifact) without realizing they'll only get this interaction about 38% of the time. It's different with Twin, because Ensoul doesn't win the game on the spot, so that 15% of "free wins" doesn't apply. B) Use this for keep/mull decisions, and some common occupancies during gameplay. Got 2 turns to draw one of 5 outs? 1-(39/44)2 or 21%. Is there a line that opens up more outs? Worth thinking about, both in deckbuilding and in gameplay. Want to keep a hand without a dork in it? You have a 1-(43/53)2 or 34% to get one in the first couple turns. Is that worth the risk? Can you still win without one? C) It's obviously impossible to calculate this in game, but during testing, it should help you get a feel for how smoothly your deck works, and will help you make decisions based on a little more solid evidence. "I can win this way if I draw one of 7 outs" might not be optimal, given you have a choice. Test enough and you'll start seeing enough game situations to familiarize yourself with the odds. D) My favorite part of this lesson is that it explains the whole "40% of games lost to variance" thing. A lot of players know "hey, sometimes you just mull to 5, that's life", but this explains why that happens and puts it into context. It certainly helps me stay focused after a bad beat - especially when I find out I took a line with 60-70% odds, and it's not that farfetched to fall on the wrong side of it. Even Splinter Twin, one of the most consistent and powerful decks in Modern, straight up doesn't get its combo a significant portion of its games. They happen, and if you're good enough at math, you can know what to expect over a large enough sample size. REVIEW: Our odds of drawing a given suite of cards over a given number of looks: P = 1-(x/y)c Our odds of any two given events occuring over the same game: (% of Event A) * (% of Event B) To leave you, some useful calculations:
  • 1-(56/60)7 = 39.94% odds of one copy of a playset in your opening hand.
  • 1-(49/53)5 = 33.55% odds of drawing a copy of that playset by your first 5 draws if it isn't in your opener.
  • 1-(44/45)15 = 25% odds of drawing a 1-of over 8 turns in a game.
Courtesy of /u/asjohnson : Another note, is that you can approximate the hypergeometric distribution reasonably well with a binomial, which makes it easier to do some mental math in your head. If your dead is 1/3 lands and you need to hit a land drop in the next 3 draws the probability of you not doing it on the next draw is 2/3, the draw after that is 2/3 and the draw after that is 2/3 (approximately), so you get (2/3)3, which is 8/27, which is ~30%, so 1-.3 = .7 70% is your chance of hitting. Gotta change it up based on what you are working with, but some heuristics about probabilities like this definitely informs decisions. If you have any other scenarios or thoughts, or things to add to the "useful calculations list", let me know, I'll be glad to work them out with you! Happy calculating! ~drawingdead0

link to original Reddit post

Leave a Reply

Your email address will not be published.