Baghdad Bazaar: A Statistics Primer
By Nathan Fealko on November 27th, 2008 · Filed in General Magic, Baghdad Bazaar · Comments not available just now
Magic is a game of chance.
Well, more specifically, Magic is a game of strict probabilities, enriched by randomization and tempered by judicious playskill. And although you'll never know for certain what the top card of your library is when you shuffle, you can certainly limit the number of possibilities and how you play based on that knowledge.
But such strategy has been synonymous with the game of Magic since the beginning. Players constantly throw around vague approximations and hastily-derived figures to seem intelligent on a daily basis... but how much does the average Magic player truly understand of how probability works?
Sadly, very little. Let's take a look at how all the numbers really break down, how to use them to build your own deck at home, and perhaps a trick or two to help you in the middle of a gripping game.
I. General Rules
IT'S TIME YOU LEARNED ABOUT
prob⋅a⋅bil⋅i⋅ty [prob-uh-bil-i-tee] :|
the relative possibility that an event will occur, as expressed by the ratio of the number of actual occurrences to the total number of possible occurrences.
(quoted from www.reference.com)
For example, on a regular six-sided die, the probability of any particular number coming up on any one roll is 1/6, or roughly 16.67%. Sounds easy enough, right?
A. Single-Draw Problems
Let's start with something simple.
Question 1: What are the chances of drawing any particular card in a 60-card deck?
Trying to draw one particular card out of sixty means you'll be successful one out of every sixty times you draw, or 1/60. As a percentage, that's 1.67%, rounded a bit.
Unlike a regular deck of cards, for example, which can only have one King of Spades, our Magic decks are a little different. Let's rephrase our initial question.
Question 2: What are the chances of drawing any particular card on a single draw if you have four of them in your 60-card deck?
Now that you have a whole playset to play with, you are four times as likely to draw one of the needed cards on any single draw.
Question 3: Your friend has just cast his Oversoul of Dusk, which your deck has almost no answer for. All you have to deal with it are three Oblivion Rings and two Neck Snaps. Your deck has 45 cards left in it. What are the chances you'll topdeck one on your next draw?
Of course, that throws a small, furryThis is just like the 4 card/60 deck problem, except now there are five cards you can use and only 45 cards to draw them out of. Unfortunately, that still only translates to a 11.11% chance of drawing something to save your butt. Ugh. Better cross your fingers and pray.
wrench in our equations.
Hey, so far, this probability stuff is pretty intuitive!
B. Multiple-Draw Problems
Question 4: You have four Rampant Growths in your deck to accelerate into four lands on turn 3. What are the chances you'll draw one in your opening hand? Calculate for being both on the play and on the draw.
Should be easy, right?
On the play:
Here's where things get interesting!
Each time you draw a card, the deck gets smaller. You'd be much closer with the numbers (4/60)+(4/59)+(4/58)+(4/57)+(4/56)+(4/55)+(4/54)=49.19%, although even this won't turn out right. Let's see why...
ARRRGGH MY BRAAAIN.The first set of numbers (4/60) assumes we have four copies of our card in the deck and 60 cards left to choose from. Fair enough so far. The second set, however (4/59), assumes we still have those same four copies left in the deck and only 59 cards to choose from now. But what if there had been a Rampant Growth on the very top of the library? What if it was now in our hand? Wouldn't that make the next numbers (3/59)+(3/58) instead, and so on? What if we draw two in the first two draws? What if we draw none?
AND MY MOUSTAAACHE.
Calculating "the number of successes in a sequence of n draws from a finite population without replacement" is something known affectionately by statisticians as Hypergeometric Distribution. (Readers who feel their eyes already glazing over already can just skip down to where you see a simplified equation in bold.) Hypergeos, which sound like they should be awesome Null Profusion-like combo enablers, can be described by the following problem and solution. (The following is drawn from the entry in the Wikipedia, which is always an excellent place to begin when researching a topic for the first time.)
I seriously have no idea what they just said. And I doubt the average person reading this article would either. Not only that, but these equations only calculate what the probability is of your drawing "exactly" k number of marbles/cards in any given hand, not "at least" as many. The calculations for that get a lot more complicated.
Originally Posted by The Wikipedia
The classical application of the hypergeometric distribution is sampling without replacement. Think of an urn with two types of marbles, black ones and white ones. Define drawing a white marble as a success and drawing a black marble as a failure (analogous to the binomial distribution). If the variable N describes the number of all marbles in the urn (see contingency table above) and m describes the number of white marbles (called defective in the example above), then N − m corresponds to the number of black marbles.
Now, assume that there are 5 white and 45 black marbles in the urn. Standing next to the urn, you close your eyes and draw 10 marbles without replacement. What is the probability that exactly 4 of the 10 are white? Note that although we are looking at success/failure, the data cannot be modeled under the binomial distribution, because the probability of success on each trial is not the same, as the size of the remaining population changes as we remove each marble.
This problem is summarized by the following contingency table
The probability of drawing exactly k white marbles can be calculated by the formula:
Hence, in this example k = 4, calculate:
So what is a poor, liberal-arts-educated writer with no math experience in the last decade to do?
These are Yuan Ti. Tee hee hee!Enter our moderator friend "YuanTi", who I'll simply refer to from now on as "that friendly, helpful, campy D&D humanoid snake creature." Because it's shorter. Or something. Anyway, having dealt with these sorts of problems on a daily basis for some time now, the snakeman hissed his advice: in math, there can be any number of ways to calculate the answer to a problem. (Case in point: you can measure the height of a building by a) measuring the length of its shadow and using the tangent of the angle to the apex, or b) drop something from the top and use the coefficient of gravity and the object's terminal velocity to punch out some numbers.) And it's also true for this problem.
Specifically, it's a lot easier to figure how likely it is we won't draw a Rampant Growth in the first seven cards.
Think of it this way, if it helps: your deck is an evil, conniving little devil who wants to cheat you out of good cards every chance it gets. (Which seems true often enough anyway.) On any given draw, we have a 1/60 chance of getting a particular card. Which means our deck has a 59/60 chance of pushing it down to the bottom of our deck... or at least to the point where we're already dead.
And what of the next draw? Our vicious deck's chances of screwing us completely get just a tad a little smaller...58/59 smaller, actually. Which means that over the course of the first two draws, our deck has a 59 out of 60 chance (first draw) of getting a later 58 out of 59 chance (second draw) of making us curse our shuffling skills.
In head-numbing pseudo-formula form (I'm no math major), that's:
Probability of drawing at least 1 of a given card = 1 - chance of never drawing it = |
1 - (56/60)(55/59)(54/58)...and so on, one for each draw.
And that's a lot easier way of getting your head around the problem than the hypergeowhatever route. The easiest way to crunch the numbers, if we're using nothing fancier than a pocket calculator, is to multiply all the numbers on the tops of the equation (56*55*54*etc.) and then divide the final number by all the numbers on the bottom (/60, /59, /58, etc.). (And yes, Mom, I do remember the terms "numerator" and "denominator." Gosh. I haven't forgotten everything.)
So let's try our question again. What's the likelihood that we'll draw at least one Rampant Growth in our first seven cards?
On the play:
Giving chance the finger.If we're on the play, our deck gets seven chances to try and completely screw us. That means it gets a probability of (56/60)(55/59)(54/58)(53/57)(52/56)(51/55)(50/54) that we'll get absolutely none, blame the shuffler (if we're playing online), and mulligan. Calculating this out, this means there is a 60.05% chance we won't draw one. On the flip side, that means there is also a 39.95% chance that we will draw at least one (or two or three) of our beloved mana-accelerators in our opening hand.
(And margins of error be damned! You math majors know what I'm talking about.)
On the draw:
Our evil deck has one more draw now from us to contend with, meaning its 60.05% chance just got 49/53 smaller. This translates to a 55.52% chance of not drawing one, or a 44.48% chance of drawing one if we're not going first.
Question 5: Technically, you have until your turn 2 draw to find a Rampant Growth and still cast it on time. What are the chances you'll draw one by or on turn 2?
On the play:
On the draw:
Okay, now that we have that down, let's try something a little more complicated.
Question 6: Your newest casual deck's "God Hand" involves having both a Gemstone Caverns and a Chrome Mox in your opening hand for three mana on turn 1. Wisdom of this deck design aside, what's the likelihood of your having at least one of each in your opening hand, assuming you have three Caverns and four Moxes?
On the draw:
We can't simply find the chances of drawing one of seven total cards, since it matters that we have at least one of two completely different types.
Nor can we simply multiply the chances of drawing at least one Caverns by the chances of drawing at least one Mox. The draw events are not "independent," to use a statistics term. This means that if we draw a Caverns on our very first card, it's going to change the likelihood of whether we'll draw a Mox on our next card or even a second Caverns.
To ultimately solve this problem, we'll actually have to resort to those migraine-causing hypergeos. But fear not! Nathan knows of two methods you can use that don't involve pulling out pen, paper, a TI-83, and aspirin:
Nathan's Super-Useful Tip #1: If you have access to Microsoft Excel, there's a "HYPERGEODMIST" function you can use to have it crunch the numbers for you. This article explains how to make the spreadsheet work for you, and this forum response explains a little of how you'd apply it to multiple-draw-type problems.
Still too scary? Try the next one!
Nathan's Super-Useful Tip #2: Often, if I want to calculate some quick probabilities without writing out all the maths (or, in my case, without wondering if I've missed something important), I open up MTGO and crunch the numbers there. You can do it too! Try this at home:
Click for moar kittehs! Er, I mean to enlarge.Step 1: Open up MTGO and go to the "Deck Editor" tab.
Step 2: Throw together a quick deck of 60 basic lands or so. Let's say Forests.
Step 3: Replace as many basic lands with cards you'll care about drawing. For example, if you want to check your answers for Question 4 (four-of for an opening hand), trade out four Forests for four Llanowar Elves.
Step 4: Click "Stats" near the top right of your window; then click "Probabilities" on the pop-up window.
Step 5: Click the "Any Creature" button at the top of the pop-up window (it's that cute little claw symbol you'll remember from Future Sight.)
Step 6: Voila!
(Notes: MTGO doesn't care about decimal places. MTGO also assumes you're always on the play; so if you want to calculate for being on the draw, just look under the numbers for "Turn 2.")
So how would you check your numbers for Question 6? The MTGO calculator needs to know we're looking at two completely different types of cards, not just seven of the same. So we'll add three creatures (Llanowar Elves again) for our Caverns and perhaps four enchantments (why not Fertile Ground?) for our Moxes. Then add "Any Creature" and "Any Enchantment" to your calculations. MTGO should tell you that you have a 12% chance (see above pic) of drawing at least one of both in your opening hand. (The actual answer is around 11.40%. MTGO is close but not perfect.) Obviously, these numbers are true regardless of what your individual cards are (whether they are creatures + enchantments or Caverns + Moxes), which is why MTGO is such a great tool for speedy deck calculations.
II. Some Finer Points of Deck-Building
Question 7: What are the chances you'll draw any particular one-of card in a 60 card deck, compared to from a 61-card deck?
Since we're not calculating for multiple draws or different card types here, the numbers are thankfully easy. As we can see, the difference between a 60- and 61-card deck is negligible - not even half of a tenth of a percent for any given draw. Still, it can be argued that it's a non-zero difference, and a non-zero difference is bound to make an impact in some game along the way if you play long enough. Considering that you draw seven or eight cards in just one opening hand, plus perhaps at least another half dozen in a single game, even something as small as .03% might be noticeable in one day of PTQ event.
Let's look at another question before we continue the debate.
Question 8: What are the chances you'll draw a one of a 3-of in a 60 card deck? 4-of in a 61?
On the bright side, there's a 75%These numbers bring up an interesting point that espousers of 61-card decks use. Keeping your deck as small as possible is certainly laudable, but when does the need for an extra full playset outweigh the need for overall consistency? When does the need for four Cryptic Commands in a deck that is already 57 cards strong outweigh the need to trim a playset somewhere?
chance you won't die instantly.
Why not just up your deck count to 61 and include four?
Let's look at it this way: say that you're prepping a run-of-the-mill Kithkin White Weenie deck to take to your local FNM. Your local metagame has been seeing a good share of Monored-style decks lately, and Burrenton Forge-Tenders turn out to be key in that matchup. Yet, to survive the other matchups, you need your deck chock full of Wizened Cenns, Knight of Meadowgrains, Knight of the White Orchards, and other such nonsense; and you only have three slots left for the Tender.
Question 9: What are the chances you'll draw at least one of three Burrenton Forge-Tenders in a 60 card deck in your opening hand? At least one of four Forge-Tenders in a 61?
On the play:
On the draw:
As you can see, these numbers are a lot more significant than the .03% difference from the single extra card in the entire deck. They become even more significant when the card you added is key to an entire matchup you're planning for.
Sure, you could argue to keep one copy sideboarded and bring it in for game 2, but I think just a strong case can be made for not losing game 1 to begin with. Assuming each of your playsets is something you want to go four-of, any single one of the cards you've chosen could be instrumental in winning the game for you. And in some cases (as with White Weenie vs. Monored), that extra playset is something you might want to plunk down on the table on turn 1.
(What are your two cents? Do you think there's always room to cut or that some decks need as many of their playsets pre-board as possible? Do you think these line of reasoning supports 62/63/whatever-sized decks; and if so, where does this madness end??? Let me know on the forums!)
III. During the Game
Probability is all well and good when discussed in a relaxed, classroom environment. But what do you do when you're staring down an opponent across from you, trying to judge just how likely it is he topdecked his win condition after you emptied his hand? Are there any good rules of thumb or quick "guesstimations" you can do to judge the likelihood?
Question 10: Your opponent is playing Elfball-style combo deck. He's played a land every turn and has dropped two Bramblewood Paragons and a Rhys, the Redeemed. He has four cards in hand. It's about to be his fourth turn; what are the chances he'll draw the Heritage Druid he needs to start his combo?
What's there not to love aboutHe has four cards in hand and six permanents on the board. This means he has 50 cards left in his deck. To make a quick guesstimation of 4 Druids/50 cards, multiply both the top and bottom by 2 to get 8/100. In other words, he has an 8% chance of getting the combo enabler he needs.
adorable little me?
Multiplying numbers is always easier to do in one's head than dividing. To get a quick estimate of a single-draw solution, figure out how much you'd have to multiply the number of cards left in his library to get to 100, and then multiply that number by however many cards there are left that he's trying to get.
Let's try again for practice:
Question 11: What if you've been milling your opponent, and he only has 38 cards left for his Druids to hide in?
There's no easy number to multiply 38 by to get 100. Multiplying it by 2 and then half again will get you close enough, though (to 95, specifically). Multiplying the number of Heritage Druids left in his library (4) by that same number (2.5) will give you 10, meaning he has about a 10% chance to get that card.
Question 12: What if you've been milling your opponent, and he only has 38 cards left for his Druids to hide in, but on his fourth turn he drops a land and casts Harmonize?
He's drawn four cards so far this turn. We know from our last problem that he has a roughly 10% chance of pulling the card he needs on his first draw. To guesstimate, multiply that number by the number of cards he's drawn this turn:
4 * 10% = 40%
Obviously, we know from the earlier multiple-draw problems that this number is not exactly accurate. Still, actual calculations show:
1 - (34/38)(33/37)(32/36)(31/35) = 1 - 62.83% = 37.17%
Meaning that our quick, two-second guesstimations are only 3% off of the real numbers. Close enough for government work, in other words. And, perhaps, close enough to help you plan your next move.
(Of course, it should be noted that if he had drawn ten cards somehow, you'd have a false 100% certainty he'd have a Heritage Druid in hand. Still, with real numbers weighing in at a whopping 72.26%, that may not be far off from the truth!)
IV. Final Exam!
Let's see how well you've been paying attention, shall we?
Question 13: You're playing Extended at a local get-together, and you're pretty sure your opponent is netdecking the Faeries deck that Denis Sinner used to take 7th place at Pro Tour: Berlin. Fortunately, you're a little familiar with the deck, and you know that it only runs three Cryptic Commands.|
It's late in the first game. Your Elves have been lucky, and you've managed to survive one Command already and still get him within alpha-strike distance. He has seven lands on the table; eight cards in the graveyard; a Bitterblossom with two Faerie tokens; and only one card in hand (which you're pretty sure is a land he's bluffing with). However, to finish him on your next turn, you'll need to both play and activate the Mirror Entity sitting in your hand.
On his (hopefully) last turn alive, your opponent finally resolves an Ancestral Vision. He gives you a cryptic stare (ha! I made a funny!), and passes the turn.
What are the chances he's just ripped one of his two remaining Cryptic Commands and is waiting to counter your spell/tap down all your creatures?
And that's all for today! Hopefully, these tips can come in handy the next time you put a deck together, sit down at your next gaming session, or have to explain the maths behind your favorite game.
By Nathan Fealko on November 27th, 2008 · Filed in General Magic, Baghdad Bazaar · Comments not available just now
About Nathan Fealko
Nathan Fealko graduated from a tiny, sequestered college in NY with degrees in Creative Writing, Communications, and Psychology that he still hasn't used. Taking a break after college, he spent time travelling the world and relaxing in exotic locations like the Korean DMZ and Baghdad. He also learned how to run really fast in ballistic armor. Recently out of the Army, he teaches English to small tots in Taiwan.