Magic the Gathering: Pack Cracking Statistics (Oath of the Gatewatch)

In addition to writing actuarial exams, I am a massive nerd when it comes to the game Magic: The Gathering. One thing that has always irked my statistician side about M:TG journalism is that when it comes to statistics, the only thing ever talked about is the expected value of opening packs of cards. I’m here to set that straight by demonstrating an even more important factor, variance.

Hold up, what is M:TG?

Magic: the Gathering is a trading card game that began in 1993 and has since exploded in popularity to become the most popular physical card game on the planet. If you have never played before I encourage you to find a friend that does (might be easier than you think!) and get them to teach you the basics. The game has something to offer for all skill levels and is a fantastic social activity.

The Basics of Pack Cracking

Each regular pack of Magic cards contain 15 cards distributed over the four main rarities: Common, Uncommon, Rare and Mythic. A normal pack will contain 10 Commons, 3 Uncommons, 1 Rare OR 1 Mythic and 1 “Land” card. There is also a chance that there will be a “premium” foil card taking the place of one common. These probabilities are as follows:

• Chance of a Mythic Rare: 1 in 8 packs, or 12.5%
• Chance of a Foil card (any rarity): 1 in 6 packs, or 16.7%

If you buy a “box” of cards, you get 36 packs. From this we can calculate the expected number (the Expected Value) of Mythics and Foils we get in our box:

• Expected Mythics: 0.125*36 = 4.5
• Expected Foils: 0.1666*36 = 6

Most people will stop here with the calculations. I’m going to go a step further and show you some other ways to look at what we expect from our boxes of cards.

The Simple Model

I will be using “RStudio” to complete the math for the rest of this article, feel free to skip over the coding. I’m adding it in for anyone who would like to reproduce my results.

When we open a pack of cards, we are actually performing a Bernoulli Trial. Put simply this says we have two possible outcomes: a “Rare” or a “Mythic”. Using the probability from above, let’s simulate cracking an entire box of cards:

p.mythic &amp;lt;- c(1/8)

# Simulate a box (36 packs) for Rares
packs &amp;lt;- rbinom(36,1,1-p.mythic) &amp;amp;amp;amp;amp;gt; results
[1] “Rare”   “Rare”   “Mythic” “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Mythic” “Rare”
[12] “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Mythic” “Rare”   “Rare”   “Rare”   “Rare”
[23] “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”   “Rare”
[34] “Rare”   “Mythic” “Rare”


In a nicer form:

results
Mythic   Rare
4     32


Congrats! You got four mythics in your box. We can do the same thing to simulate our foils:

results2
Foil No Foil
4      32


Hmm, looks like we came up with a disappointing 4 foils (we expected 6). Ask yourself, why did this happen? You’re right, it’s variance.

Simulating 100,000 Boxes

To visualize how the distribution of how many mythics you get will change, we have to repeat this experiment many times. Many, many times. For those interested, check out The Law of Large Numbers. Let’s take a look at the results of this simulation:

 boxes.mythics &lt;- rbinom(10000,36,p.mythic) hist(boxes.mythics, col = “lightblue”, xlab =“Number of Mythics”, ylab = “Number of Boxes”, main = “Distribution of Mythics in Boxes”)

We can do a similar analysis for foils:

I think this is a pretty great visualization as we can see that even though we “Expect” to get 6 foils, we can clearly see that it’s actually more likely that we get a number other than 6. Some poor soul may only get 0-2 foils, where some lucky duck will walk away with 8 or more! Sure, we “knew” this already, but this proves it.

In fact, we can calculate the exact probability of getting a specified number of Mythics or Foils using a Binomial DistributionThe binomial distribution results from performing consecutive, independent Bernoulli trials. The resulting chart is depicted here:

The Complicated Model

In the most recent Magic expansion, Oath of the Gatewatch, there are 70 commons, 60 uncommons, 42 rares and 12 mythics for a total of 184 cards. There is also a very small chance of opening an Expedition Land, which command a high price. I will be using the same assumptions as above, with the following additional foil assumptions:

• Commons and uncommons are equally distributed over the foils
• The chance of your foil being rare or mythic is equal to their proportion of over all cards (52/184), and then the card has ~4 times chance of being a Foil Rare over a Foil Mythic
• Expeditions will be treated the same as the calculated value for Foil Mythic Rares (the article states it is slightly less rare, but I have no way to make an educated guess as to how much and it is a very small amount anyway)

I know what some of you are saying. There is an often repeated assumption that a Foil Mythic is a 1:216 pack occurrence and that’s that. I scoured the internet to find a source and everything seems to back to a single article from StarCity who themselves source a website that is now offline. Additionally, those numbers are for a Large set (200+ cards) whereas Oath is a small sized set. From my numbers below I hope you can agree that these seem like reasonable jumps.

When we open a pack, we have multiple different possibilities:

• Rare or Mythic
• No Foil, Common Foil, Uncommon Foil, Rare Foil, Mythic Foil
• No Expedition, Expedition

And any combination of the three. If you trust my math, here are the probabilities for each of the combinations:

What we have here is a Multinomial DistributionJust like before, we can simulate boxes. Let’s open 10 boxes and see what we get:

                                   [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
Rare|No Foil|No Expedition           25   29   24   26   29   30   24   22   26    29
Mythic|No Foil|No Expedition          4    3    2    4    4    2    6    7    2     4
Rare|Common Foil|No Expedition        2    2    4    3    1    2    2    1    4     1
Rare|Uncommon Foil|No Expedition      4    0    1    0    0    1    2    2    1     0
Rare|Rare Foil|No Expedition          1    0    3    1    1    0    1    1    0     2
Mythic|Common Foil|No Expedition      0    0    0    1    1    0    1    3    1     0
Mythic|Uncommon Foil|No Expedition    0    1    1    0    0    0    0    0    1     0
Rare|Mythic Foil|No Expedition        0    0    1    1    0    1    0    0    0     0
Rare|No Foil|Expedition               0    1    0    0    0    0    0    0    1     0
Mythic|Rare Foil|No Expedition        0    0    0    0    0    0    0    0    0     0
Mythic|Mythic Foil|No Expedition      0    0    0    0    0    0    0    0    0     0
Mythic|No Foil|Expedition             0    0    0    0    0    0    0    0    0     0
Rare|Common Foil|Expedition           0    0    0    0    0    0    0    0    0     0
Rare|Uncommon Foil|Expedition         0    0    0    0    0    0    0    0    0     0
Rare|Rare Foil|Expedition             0    0    0    0    0    0    0    0    0     0
Mythic|Common Foil|Expedition         0    0    0    0    0    0    0    0    0     0
Mythic|Uncommon Foil|Expedition       0    0    0    0    0    0    0    0    0     0
Rare|Mythic Foil|Expedition           0    0    0    0    0    0    0    0    0     0
Mythic|Rare Foil|Expedition           0    0    0    0    0    0    0    0    0     0
Mythic|Mythic Foil|Expedition         0    0    0    0    0    0    0    0    0     0


Two Expeditions in 10 boxes. I hope they were good ones.

I plan on doing more Magic related posts in the future! If you liked this post and want to see more, message me your ideas on Reddit /u/NaturalBlogarithm and be sure to follow me @NatBlogarithm on Twitter so you don’t miss out.

Aspiring Actuary: Calculator Skills for Exam MFE

As I write this article there is just over a month until the next sitting of the Society of Actuaries “Models for Financial Economics” (MFE) Exam. If you plan on writing it this sitting, good luck! If I had one piece of advice it would be to learn how to use your calculator quickly and accurately – I’m going to teach you some tricks that will make some of the seemingly daunting questions straightforward.

What calculator should I be using?

The SOA maintains a list of calculators that one can bring to an official exam. If you’re going to take just one thing away from this article make it that the  TI-30XS MultiView Calculator is the only calculator you will ever need. (Well, possibly the BA II, but that’s for another article). With enough practice and knowledge of the calculator’s unique functions I guarantee you will finish problems much faster than if you had the single view version. Let me convince you why with a couple examples.

Using the Memory Function

Did you just have to convert a nice, round annual effective interest rate to a disgusting, compounded fortnightly, discount rate? Yeah, there’s no way we’ll ever accurately type that number back in. Here is where the “sto->” and “x y z” buttons come in handy. After you hit enter to get your answer, simply hit “sto ->” ,”x”,”enter” and your entry will be saved. You can then recall it in a later function by hitting the “x” button again.

Let’s try this out by converting 6% to it’s semi-annually compound equivalent, saving it, then accumulating \$100 today six months forward:

Easy eh? Best part is, you can store up to seven variables at once which really comes in handy during some of the more lengthy binomial tree questions.

That was boring, my TI-30XIIS can do that too.

All right, I hear you. Let me turn your attention to a specific type of question, this one is #51 in the SOA’s Official MFE practice questions (which if you didn’t know about, today is your lucky day because you just gained an invaluable study resource). Here it is:

Now, I’m going to focus on the part of the answer where you need to calculate the sample variance of the given data. I’ll leave the rest of the question as an exercise to the reader (I’ve always wanted to be able to say that).

As someone who is still reading this, you probably know the formula for sample variance is as follows:

$S_x = \frac{1}{n-1} \sum_{i=1}^n (x_j - \bar{x})^2$

Now, for this question we need the sample variance of the continuously compounded monthly returns. We find those numbers by taking the (natural) logarithm of the price one month over the price the month before, ending up with six values. Here is my chicken scratch version of doing this by hand:

Can you imagine doing that during an exam? That’s not even the whole question! Let me show you how to do this much quicker.

The “data” function

See that oddly named “data” button on the second row of the multiview? Click it. You’ll come to this screen:

You’ll learn to love this screen. Enter the values that we want to find the variance of one by one, pressing enter after each on. Note – I’m entering these as “ln(56/54) -> enter -> ln(48/56) -> enter …”. The calculator does the necessary calculation automatically!

Now, hit “2nd -> quit”. Your numbers will be saved. Now we’re ready to see some magic: hit “2nd -> data(stat)”. This brings us to the STATS screen. Since we are only dealing with line one, hit “1: 1-Var Stats”, “Data: L1”, “FRQ: ONE”. Hit CALC.

This screen shows a list of different statistics that the calculator has calculated for you. We can see the first number, n, is our number of entries, x bar is our average, and Sx is our sample standard deviation! Scroll down to Sx, press enter, and it will show up as a variable in the calculation screen. Remember, variance is standard deviation squared, so square this number:

Look familiar? That was much quicker than doing it by hand, and there is a much lower chance that you’ll mistype something when using your calculator. Using this method can really make a difference when it comes to these tedious calculations.

You probably noticed that there is more the the data screen than what we used. In a future article I’ll be looking at some methods for using the TI-30XS Multiview for Exam C, so look out for it!

-R

How much are your Student Council executives making?

The purpose of university student councils, in theory, is to give a voice to the students and representation to the administration of the university. Most also act as the governing body for all school clubs, and provide student-oriented events and services. I personally would like to thank the Feds Used Books store for selling me countless textbooks for half the price that some poor soul paid two semester ago.

While student councils do some great things, it doesn’t take long to find their criticisms online. Just try to do a search for the University of Waterloo’s Federation of Students (“Feds”) on our subreddit and take a look at the results. Here is a snippet of the titles from the top posts:

• Why do you hate FEDS? (61 comments)
• Can we just get rid of FEDs? (70 comments)
• Good job Feds election /s (16 comments)

We get a similar feeling when we search for the University of Toronto’s student union, UTSU:

• UTSU Fraud cover-up (119 comments)
• How to disband UTSU? (74 comments)
• An honest question: What does the UTSU do? (31 comments)

Why is there so much disdain for these organizations which are composed of our fellow students who are working in our best interest? That is a question well beyond the scope of this post, but if you feel like spending your evening debating it is an excellent question to ask on your school’s subreddit or OMG UW equivalent.

A surprising number of students (by no fault of their own) are unaware that some of the student council fees they pay go towards paying the people in the organization. The part I want to focus on is the salaries that the executives of these organizations are making. Seeing as we all pay for these salaries as part of out tuition, I believe that we should be aware as to where our money is going.

Now, keep a couple things in mind:

• These are full-time, year long positions. The people in these positions are delaying their graduation to provide a service to the student body.
• I found the most recent salary numbers I could, but not all are for the 2015 year. You can see my list of sources below if you want to check them out.
• Due to how some financial statements were laid out, some salaries required making an educated guess based on Total Executive Salaries divided by Number of Executives.
• If you see a mistake and can provide a source I will gladly update the numbers.

Here are the salaries/stipends provided to the top level (President or equivalent) executives for the largest schools in the country:

These numbers include all benefits.

Note that these salaries are comparable to the rest of the executive teams – all schools have between 4-6 people on the executive council that are getting paid the same amount as the president. Without a doubt, this graph shows that the Waterloo FEDs executives are compensated higher than their counterparts at other schools, though all schools seem to ensure their student counsel executives are comfortable during their tenure.

I hesitate to show this next graph, as it may not be a fair comparison. Each school has a different way of reporting incidental fees and this will definitely effect how the fees are collected. For example, I believe that the budget for all clubs at Waterloo supported by Feds is lumped together in the Feds fees, whereas at other school there may be separate fees associated with different clubs. Nevertheless, here are the fees paid each semester by each full time student associated with their student council:

I’m interesting in hearing your thoughts on these results – if you’re coming from Reddit feel free to message me at /u/NaturalBlogarithm or send me a tweet at @NatBlogarithm.

My list of sources can be found in this Excel file. Call me out if something is wrong!

Aspiring Actuary: Exam Basics

You know nothing about what it takes to become an actuary. At least, that is what I’m going to assume for this post. I know from experience that without guidance it can be difficult to find all the information you need to make an informed decision on pursing an actuarial designation – through this series of posts I aim to alleviate some of your concerns.

This posts assumes you are pursuing a designation in the US or Canada, there are separate organizations in the UK.

What exams do I need to take to become an actuary?

The first thing you should know is that there are two main regulating bodies that offer exams in North America to qualify actuaries. The Society of Actuaries – which will be my focus – offers exams for life insurance, pension and health actuaries (among others). The second is the Casualty Actuarial Society, who focus on property and casualty insurance.

At some point in your career you will have to decide which designation to pursue. Both societies offer two levels of designation at the associate (ASA or ACAS) level and the fellowship (FSA or FCAS) level. Each level involves writing a number of rigorous exams on your own time and have a large study commitment requirement.

Luckily as of January 2016 there are still four exams that are offered jointly by the SOA and CAS. This means that you aren’t locked into one path right away, you have some time to wet your feet in the profession before you narrow your focus.  Often, as I did, the companies that you do your co-ops or internships at will determine which exams you write. If you are doing an internship for a life insurance company you will be writing the life insurance (SOA) exams and vice versa. Many companies offer financial support to students to help with exam writing.

The ASA (Associate to the Society of Actuaries) designation requires completed of five exams: P, FM, MFE, MLC and C. Note that all of these except for MLC will also count towards an ACAS designation.

Contents of ASA Exams

Click the links to be redirected to the SOAs homepage for each exam. Registration, syllabi and study materials are all available there.

Exam P (Probability)

Exam P is where most people will begin writing exams. Overall it has little to do specifically with actuarial topics, it is more of a way to develop the mathematical background that comes with later exams. You’ll find that a good understanding of calculus (Calculus II at Waterloo) and a basic understanding of statistics will help you pass this exam.

Exam FM (Financial Mathematics)

This exam is split into two sections. The first deals with interest theory and the time value of money. You will learn about discounting cash flows, annuities, loans and bonds. The second section deals with derivatives (of the stock market type, not calculus!), forward rates and different types of investment strategies. If you are early in your undergrad and are not in an actuarial science program I would expect you to have less exposure to this material – adjust your study time accordingly.

Exam MFE (Models for Financial Economics)

In many ways Exam MFE is the second level to exam FM. It is a very math intensive exam that will require you to know how to use your calculator accurately to stay on time. Recently updated, the syllabus now focusses mainly on the valuation of financial derivatives – you’ll learn to love (read: “love”) the Black-Scholes model.

Exam MLC (Models for Life Contingencies)

I have less to say about MLC as I have yet to take it (studying for the May 2016 sitting!) – I’ll be sure to update this post once I have finished. MLC takes many of the concepts from previous exams and adds a new twist: Payments only occur while the policyholder is alive. Here you will learn about life contingent annuities and the math behind the different types of insurance policies. Many people will say that MLC was the hardest of the ASA level exams, so be sure to set aside a lot of time to study for this one.

Exam C (Construction of Actuarial Models)

Covering a large array of topics, Exam C is the most statistics intensive of the ASA level exams. Personally, I also found it to be the most interesting of the exams I’ve taken. The syllabus is split into loss models, credibility and simulation. Loss models encompasses the bulk of the exam and requires a high understanding of calculus, sums of series and random variables. Many fellow students I have spoken with about Exam C agree that in addition to the mathematics much of the difficultly comes from the breadth of the syllabus and the time it takes to learn it all.

Okay, I know the basics of the exams. Now what?

I plan on continuing to write posts related to exams. Hopefully some of the study habits I have picked up can help others to study more efficiently. If you have any specific questions please leave a comment or shoot me an email, maybe it will spark inspiration for a new article.