23
Chapter 1 Dice, Coins, and Candy Introduction If you have access to some dice, go ahead and grab six standard 6-sided dice and roll them. Without even seeing the exact dice that you rolled, I’m pretty sure that you rolled at least two of the same number (for the approximately 1.5% of you that rolled exactly one of each number, I apologize for being incorrect). How did I know that? The behavior of (fair) 6-sided dice is pretty easy to model – if you were talking to a friend, you would probably say that each of the six numbers is equally likely to be rolled. After that, it only takes a modest understanding of the rules of probability to determine the “expected” probability that, when rolling six dice, you will get exactly one of each number. As a side note, the chance of getting exactly one of each number is just slightly more common than the probability of being born a twin (in North America at least) and slightly less common than drawing the Afrom a thoroughly shuffled deck of cards with jokers included! If you roll those six dice again, chances are you still will not have gotten exactly one of each number. The probability that you do is still the same, but for the 0.024% of you that rolled ex- actly one of each number on both rolls, you might be skeptical. And with good reason! Understand- ing how the mathematics of probability applies to chance events and actually observing what happens in practice can sometimes be at odds with one another. If you were going merely on “observed” probability, you might think that rolling one of each number is a common event. By the way, you are twice as likely to die by slipping and falling in the shower or bathtub compared to rolling exactly one of each number on both of the rolls! The problem lies in the fact that repeating the same experiment a small number of times will probably not reflect what will happen long-term. If you have time, you might try rolling those six dice ten more times, or maybe a hundred more times. If you’re really struggling to find something to do, a thousand or even ten thousand repetitions might convince you that my estimates above are correct (and you may even get numbers close to mine), 1 Copyrighted Material - Taylor & Francis

Chapter 1 · 2017. 7. 15. · ipping a coin, you would probably answer 1=2 or 50% very quickly. There are two possible raw outcomes when ipping a coin, and the event \obtaining a

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

  • Chapter 1

    Dice, Coins, and Candy

    Introduction

    If you have access to some dice, go ahead and grab six standard 6-sided diceand roll them. Without even seeing the exact dice that you rolled, I’m prettysure that you rolled at least two of the same number (for the approximately1.5% of you that rolled exactly one of each number, I apologize for beingincorrect). How did I know that? The behavior of (fair) 6-sided dice is prettyeasy to model – if you were talking to a friend, you would probably say thateach of the six numbers is equally likely to be rolled. After that, it only takes amodest understanding of the rules of probability to determine the “expected”probability that, when rolling six dice, you will get exactly one of each number.As a side note, the chance of getting exactly one of each number is just slightlymore common than the probability of being born a twin (in North Americaat least) and slightly less common than drawing the A♠ from a thoroughlyshuffled deck of cards with jokers included!

    If you roll those six dice again, chances areyou still will not have gotten exactly one of eachnumber. The probability that you do is still thesame, but for the 0.024% of you that rolled ex-actly one of each number on both rolls, you mightbe skeptical. And with good reason! Understand-ing how the mathematics of probability appliesto chance events and actually observing whathappens in practice can sometimes be at odds with one another. If you weregoing merely on “observed” probability, you might think that rolling one ofeach number is a common event. By the way, you are twice as likely to die byslipping and falling in the shower or bathtub compared to rolling exactly oneof each number on both of the rolls!

    The problem lies in the fact that repeating the same experiment a smallnumber of times will probably not reflect what will happen long-term. If youhave time, you might try rolling those six dice ten more times, or maybea hundred more times. If you’re really struggling to find something to do,a thousand or even ten thousand repetitions might convince you that myestimates above are correct (and you may even get numbers close to mine),

    1

    Copyrighted Material - Taylor & Francis

  • 2 The Mathematics of Games: An Introduction to Probability

    but you are not likely at all to discover those percentages by only observingwhat happens!

    This chapter is about introducing some of the language of probability, someof the mathematical principles and calculations that can be used right from thestart, and some more thoughts about why being able to compute probabilitiesmathematically doesn’t replace what you see, but rather compliments it quitewell. As a small disclaimer, while the rest of this book focuses on what Iconsider “fun” games, many of which are probably familiar to you, this chapterstrips out the idea of “game” and “rules” in favor of using just dice, coins,and candy to motivate our study. As will be usual throughout this book,though, the mathematics and examples will always appear after the questionwe are trying to answer. The questions we ask about the various games andsituations will drive us to develop the mathematics needed to answer thosevery questions!

    Probability

    Before we take a look at how dice function, let’s step back to somethingthat is even simpler to study: coins. For our purposes, when we talk aboutcoins, we will assume that the coin is fair with a side denoted as “heads” and aside denoted as “tails” (faithful watchers of many sporting events such as theSuper Bowl will undoubtedly understand the use of quotations marks there –it is not always easy to decide what image on a coin represents which side).Wait a minute, though! What do we mean by a fair coin? Though I think weall have an intuitive sense of what fair means, it’s worth taking a moment tohighlight what I mean by fair.

    Definition 1.1 A coin, die, or object of chance is said to be fair if each ofits potential outcomes is in fact equally likely; that is, there is no bias in theobject that would cause one of the outcomes to be more favored.

    Unless otherwise specified in this text, you can safely assume that anyprocess we talk about, whether it’s flipping a coin, rolling dice, or spinninga roulette wheel, is fair. In the real world, however, cheats and con artistswill attempt to use unfair devices to take your money or, more generally, takeadvantage of you in other ways. From a mathematical point of view, unfaircoins or dice make for an interesting study in and amongst themselves; wewill occasionally see these unfair games or situations pop up in either the textor exercises, but they will be clearly indicated. To wet your whistle, so tospeak, it’s actually true that you can use an unbalanced coin, no matter howunbalanced it is, to fairly decide outcomes by changing a coin flip to a pair

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 3

    of coin flips, unless, of course, you’re using a two-headed (or two-tailed) coin.You will see how in Exercise 12 of this chapter.

    To begin our study, let’s ask a basic question and then develop the languageand mathematics necessary to answer the question. First, it’s worth a mentionthat this particular question will not be answered right now, as we will want tospend some time becoming acclimated to the process involved, but, throughoutthe book, we will always want to keep the overall question or questions in mindas we develop the words and mathematics needed.

    Question: Given four coins, what is the chance that I can flip them all andget exactly three heads?

    Language

    Officially speaking, performing an action that results in an outcome bychance is called an experiment, and the set of possible raw outcomes fromthat experiment is called the sample space for the experiment. A subset ofthe sample space is usually referred to as a particular event, and it is the“event” for which we are interested in the probability, or chance, that it willhappen. While the formal language is nice, when we are interested in askingquestions and finding the answers later in this book, we won’t have the needto be terribly explicit about many of these words; for now, it’s worth lookingat some basic examples to see how these words relate to situations that weprobably already know.

    In particular, I should mention that we will frequently use the words “con-dition” or “situation” instead of “event” and “experiment” throughout thisbook to keep our discussion more colloquial and less technical, but when thetechnical language is needed, we will use it.

    Example 1.1 For the experiment of flipping one coin, the sample space isthe set {heads, tails}. A particular event, or subset of the sample space, couldbe the set {heads}, which we would describe in English as “flipping a head.”

    What happens if we add more coins? It should make sense that the set ofpossible outcomes will grow as we add more coins.

    Example 1.2 For the experiment of flipping two coins, the sample spaceis the set {(heads,heads), (heads, tails), (tails,heads), (tails, tails)}. Note thatcompletely spelling out “heads” and “tails” will become too lengthy and pro-hibitive soon, so another way to express the sample space would be using theletters H and T. That is, we could also write the space as {HH,HT,TH,TT},and a possible event, in English, could be “flipping at least one tail” for whichthe subset of the sample space would be {HT,TH,TT}.

    Copyrighted Material - Taylor & Francis

  • 4 The Mathematics of Games: An Introduction to Probability

    There is a very important note to make here.You might be thinking that the sample spaceelements HT and TH describe the same thing,but they do not ! Imagine if one of your coinswere a quarter and the other were a penny. Inthat case, flipping heads on the quarter and tails

    on the penny is a very different physical outcome than flipping heads on thepenny and tails on the quarter ! Yes, {HT,TH} is an event for this experimentdescribed in English as “flipping a head and a tail,” but this event can bephysically obtained in these very two distinct ways. Even if the coins wereidentical (perhaps two pennies freshly minted), you could easily flip one coinwith your left hand and the other coin with your right hand; each coin is adistinct entity.

    Probability

    If you were asked by a friend to determine the probability that headswould be the result after flipping a coin, you would probably answer 1/2or 50% very quickly. There are two possible raw outcomes when flipping acoin, and the event “obtaining a head” happens to be only one of those rawoutcomes. That is, of the sample space {H,T} consisting of two elements, oneelement, H, matches the description of the desired event. When we talk aboutthe probability of an event occurring, then, we need only take the number ofways the event could happen (within the entire sample space) and divide bythe total number of possible raw outcomes (size of that entire sample space).1

    For instance, for the experiment of flipping a coin and desiring a head, theprobability of this event is 1 divided by 2, since there is one way of gettinga head, and two possible raw outcomes as we saw. This should hopefullyagree with your intuition that flipping a coin and getting a head indeed hasprobability 12 = 0.50 = 50%. If that seemed easy, then you are ahead of thegame already, but be sure to pay attention to the upcoming examples too!

    Note here that I’ve expressed our answer in three different, but equivalentand equal, ways. It is quite common to see probabilities given in any of theseforms. Since there are never more ways for an event to happen than thereare possible raw outcomes, the answer to any probability question will be afraction (or decimal value) greater than or equal to zero and less than or equalto one, or a percentage greater than or equal to 0% and less than or equal to100%! Let’s put these important notes in a box.

    1Note that this definition does lead to some interesting problems and results if the sizeof the sample space is infinite; see Appendix A to see some of these interesting examples,or consult a higher-level probability textbook and look for countably infinite or continuousdistributions.

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 5

    Definition 1.2 The probability of an event happening is the number of el-ements in the event’s set (remember, this is a subset of the sample space)divided by the number of elements in the entire sample space. If P is the proba-bility of an event happening, then 0 ≤ P ≤ 1 or, equivalently, 0% ≤ P ≤ 100%.

    TABLE 1.1: Outcomes of Flipping 4Coins

    HHHH HHHT HHTH HTHHTHHH HHTT HTHT THHTHTTH THTH TTHH HTTTTHTT TTHT TTTH TTTT

    At this point, we have enough in-formation to be able to answer ourquestion. Given four coins and thefact that there are two possibilitiesfor outcomes on each coin, there willbe 16 different physical outcomes;that is, there will be 16 elements inour sample space, listed in Table 1.1. Take a moment to verify that these arethe only 16 outcomes possible.

    Example 1.3 Since there are only 4 outcomes with exactly 3 heads, andthere are 16 total outcomes, the probability of flipping 4 coins and gettingexactly 3 heads is 4/16 = 0.25 = 25%.

    The same method can definitely be used to answer similar questions forany number of dice, but we will consider a quicker method (involving whatis known as a binomial distribution) in Chapter 5. After all, determiningthe probability of obtaining exactly four heads when flipping ten coins mighttake awhile to compute, given that there are 210 = 1, 024 possible physicaloutcomes to flipping those coins, of which 210 of them involve exactly fourheads! At the very least, though, knowing this information would lead us todetermine that the probability of getting four heads with ten flips would be210/1024 ≈ 0.2051 = 20.51%. That probability is possibly a lot larger thanyou may have thought; at least it was to me the first time I computed it!

    TABLE 1.2: Outcomes for Rolling Two Dice One of the games weshall study in Chapter 2 isthe game of craps. Whilethe game flow and rules willbe presented there ratherthan here, you should, atthe very least, know thatit involves rolling a pairof standard six-sided dice.Since this probably sounds

    a bit more exciting than flipping coins (it does to me, at least), let us turnour attention to some probabilities involving dice. Our main question for nowwill be the following:

    Copyrighted Material - Taylor & Francis

  • 6 The Mathematics of Games: An Introduction to Probability

    Question: What is the probability of rolling a sum of seven on a pair ofsix-sided dice?

    By now, the method for answering this question should be pretty clear.With a list of all physical outcomes available for rolling a pair of dice, wecould simply look at all of the possibilities, determine which outcomes lead toa sum of seven, and determine the probability from that.

    Take a look at Figure 1.2. Here, you can see the 36 different physicaloutcomes possible (again, to be clear, even if you are rolling two white dice,each die is independent of each other – in the figure, we use white and blackto represent the two different dice).

    Example 1.4 Looking at Figure 1.2, we can see that there are 6 outcomesthat result in the sum of the dice equaling 7, namely the outcomes that areshown starting in the lower left (with a white six and black one) proceeding upthe diagonal to the right ending at the white one and black six. Since there are36 total outcomes, and only 6 result in a sum of 7, the probability of rollinga 7 on a single toss of a pair of 6-sided dice is 6/36 = 1/6 ≈ 16.67%.

    Adding Probabilities

    Question: What is the probability of rolling two 6-sided dice and obtaininga sum of 7 or 11?

    One of the hardest things for a beginning probability student to grasp isdetermining when we add probabilities and when we multiply probabilities.For this part of the chapter, we’ll be focusing on situations where we add twoprobabilities together.

    FIGURE 1.1:A 10-SidedDie

    The short version of how to remember when to add twoprobabilities together is to remember that addition is used tofind the probability that “situation A” or “situation B” hap-pens; that is, addition is associated with the word “or.” Inother words, given two different events, if you’re asked to findthe chance that either happens, you’ll be adding together twonumbers (and, for reasons we will discuss, possibility subtract-ing a number as well). Perhaps this concept is best illustratedthrough an example or two; for these examples, rather thanusing a standard 6-sided die, let’s use a 10-sided die (pictured in Figure 1.1)instead; faithful players of tabletop games such as Dungeons & Dragons shouldappreciate using what some would call an “irregular” die!

    Note that the “0” side on the die can be treated as either 0 or 10. Just tobe consistent with the numbering of a 6-sided die, we will treat the “0” side as10, and consider a 10-sided die (commonly referred to as a “d10”) as havingthe integers 1 through 10, inclusive.

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 7

    Example 1.5 If we ask for the probability of rolling a number strictly lessthan 4 or strictly greater than 8 on a 10-sided die, we could of course usethe methods we have previously discussed. The outcome set {1, 2, 3, 9, 10}describes all of the physical possibilities matching our conditions, so the prob-ability should be 5/10 = 1/2 = 50%.

    Instead, let’s look at each of the conditions separately. The probability ofobtaining a number strictly less than 4 is 3/10 since there are three physicaloutcomes (1, 2, or 3) that will make us happy, and 10 possible total outcomes.Similarly, the probability of obtaining a number strictly greater than 8 is2/10 since the physical outcomes 9 or 10 are the only outcomes that work.Therefore, the probability of getting a result less than 4 or greater than 8 is3/10 + 2/10 = 5/10 = 50%.

    That didn’t seem so bad, did it? At the moment, it’s worth pointing outthat the two conditions we had (being less than 4 and being greater than 8)were disjoint ; that is, there is no outcome possible that fits both conditionsat the same time. The result of any roll could be less than 4, just as the resultof any roll could be greater than 8, but a result cannot simultaneously beless than 4 and greater than 8! Combining conditions where there is indeedoverlap is when subtraction is needed, as we see in the next example.

    Example 1.6 Now let’s determine the probability of rolling a 10-sided dieand getting a result that is either a multiple of 3 or (strictly) greater than5. The multiples of 3 that are possible come from the set {3, 6, 9} and theoutcomes greater than 5 include {6, 7, 8, 9, 10}. Combining these together,the set of possible outcomes that satisfy at least one of our conditions is {3, 6,7, 8, 9, 10} (note that we do not list 6 and 9 more than once; a set is simplya list of what’s included – once 6 is already a member of the set satisfyingour happiness, we don’t need another copy of it). For reference, you may haveheard of this process of combining two sets together like this as taking the setunion; indeed you can think of “or” in probability as taking a union. Puttingall of this together, there are 6 outcomes we like, and 10 possible outcomes,so the probability we care about is 6/10 = 3/5 = 60%.

    What happens when we try to use addition here? Well, the “multiple of3” condition happens with chance 3/10 and the “greater than 5” conditionhappens with chance 5/10, so when we add these together we get 3/10+5/10 =8/10 = 80%. What happened?

    Our new answer is exactly 2/10 larger than it should be! Non-coincidentally, 2/10 is also the probability of obtaining either a 6 or a 9 whenwe roll a 10-sided die; the moral of the story here, and reproduced below,is that when adding probabilities together for non-disjoint events, we mustsubtract the probability of the overlap.

    When there is overlap between events, say A and B, as in Example 1.6,subtracting the overlap is essential if you want to use addition to compute

    Copyrighted Material - Taylor & Francis

  • 8 The Mathematics of Games: An Introduction to Probability

    the probability of A or B happening. In Figure 1.2 you can see a visual rep-resentation of this phenomenon; if we simply add the probabilities of A andB (the light gray and lighter gray regions, respectively), we are including thedark gray region (the overlap) twice! Subtracting out the probability of theoverlap gives us the correct answer (think of this as cutting away the overlapfrom B to form a moon-like object so that the two events A and moon-B fittogether in a nice way). This is formalized below in what we call the additiverule; note that “A and B” will refer to the overlap region or probability.

    Theorem 1.3 (The Additive Rule) If A and B are two events (or con-ditions), the probability that A or B happens, denoted P (A or B), is givenby

    P (A or B) = P (A) + P (B)− P (A and B)

    where P (A) is the probability of event A, P (B) is the probability of eventB, and P (A and B) is the probability that both events occur simultaneously(the overlap between A and B).

    AB

    FIGURE 1.2: Addi-tive Rule

    With this rule, we are now able to use the addi-tive rule in its full form when needed. Note that, fornow, many of the “A or B” probabilities seem easierto compute by determining all of the outcomes thatsatisfy either condition (as we did in the first half ofthe last two examples), but as the questions becomemore complicated, it may very well be easier to com-pute each of P (A), P (B) and P (A and B)!

    It is now time to answer our question about obtaining a sum of 7 or 11 ona roll of two 6-sided dice.

    Example 1.7 We have already determined that the probability of getting asum of 7 on two dice is 1/6. To obtain a sum of 11, we can see from Figure1.2 that there are only two ways of doing so; you need to get a 5 on one die,and a 6 on the other die, where the first die could either be the white or blackdie. It would then seem that the probability of getting an 11 is 2/36 = 1/18,so to answer our question, the probability of getting a sum of 7 or 11 is1/6 + 1/18 = 4/18 = 2/9 ≈ 22.22% since there is no overlap (you cannot geta sum of 7 and also get a sum of 11 on a single roll of the dice).

    Multiplying Probabilities

    Question: Suppose you flip a coin and roll a 6-sided die; what is the prob-ability that you get a head on the coin and a 5 or a 6 on the die?

    While I doubt that you will encounter too many situations in life whereyou’re asked to flip a coin and roll a die and look for specific outcomes, this

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 9

    question at least will let us get at the heart of when multiplying probabilitiesis a good idea. More “real world” examples of when we multiply probabilitieswill follow.

    By now, I hope that one of the first things you might consider in yourquest to answer this question is the idea of enumerating all of the physicaloutcomes and then trying to match up which of those fits the conditions thatwe care about. In this case, the coin flip is completely independent of the dieroll, so, since we know the coin flip will result in either heads or tails, and the6-sided die will result in a number between one and six (inclusive), we can listthe 12 possible outcomes (twelve since the coin flip has two outcomes, the dieroll has six outcomes, and 2 · 6 = 12).

    TABLE 1.3: Flipand Roll Outcomes

    H1 H2 H3H4 H5 H6T1 T2 T3T4 T5 T6

    Looking at Table 1.3 we can see the different results.Note that the outcome, H5, for example, is shorthandfor obtaining a head on the coin flip and a five on the dieroll. At this point, you can look at the possible outcomesand pick out those that match “head on the coin anda 5 or 6 on the die” and, since only H5 and H6 fit thatcondition, the probability is 2/12 = 1/6 ≈ 16.67%.

    While we will consider a fuller definition of what it means for two con-ditions to be independent, for now the easiest way to think about conditionsbeing independent is that the probability of one condition happening doesnot depend at all on the other condition happening (or not). Here it is fairlyclear that the result of the die roll doesn’t depend at all on the coin flip (andvice versa), so perhaps there is a way to combine the probabilities of the twoconditions together.

    Theorem 1.4 (Independent Probabilities) For two conditions A and B,if A and B are independent, then the probability that both A and B happenat the same time, denoted P (A and B) is

    P (A and B) = P (A) · P (B).

    How does this work in practice? Let’s consider an alternative solution toour question about obtaining a head on a coin flip and a 5 or a 6 on a die roll.

    Example 1.8 Obtaining a head on a coin flip happens with probability 1/2,and obtaining a 5 or a 6 on a die roll happens with probability 2/6 = 1/3.Since the two conditions are independent, the probability of obtaining a headand also a 5 or 6 on the die roll is (1/2) · (1/3) = 1/6 ≈ 16.67%, the same asbefore.

    We can also take a look at another example involving independent condi-tions here.

    Copyrighted Material - Taylor & Francis

  • 10 The Mathematics of Games: An Introduction to Probability

    Example 1.9 Suppose we flip a coin three times in a row. What is theprobability that we get a head on the first flip, a head on the second flip, anda tails on the last flip (equivalent to the sequence HHT for flipping a cointhree times)? The probability of getting a head on the first flip is 1/2, theprobability of getting a head on the second flip (completely independent ofthe first flip) is 1/2, and the probability of getting a tails on the last flip is 1/2(again, completely independent of either the first or second flip). Combiningthese together we see

    Probability of HHT =

    (1

    2

    )︸ ︷︷ ︸

    first head

    ·(

    1

    2

    )︸ ︷︷ ︸

    second head

    ·(

    1

    2

    )︸ ︷︷ ︸

    last tail

    =1

    8= 12.5%.

    Now we can take time to use the ideas of this chapter to answer a questionthat players of Yahtzee2 would like to know (or at least keep in their minds) asthey play the game. It should be noted before, though, that non-independentprobabilities will be examined in Chapter 4.

    Question: What is the probability that you obtain a 6 on a roll of a standard6-sided die if you are allowed to reroll the die once?

    While Yahtzee will be discussed in detail in Chapter 5, the question comesfrom the scenario in which you roll your dice (in Yahtzee you are workingwith five 6-sided dice), get four sixes on your first roll, and want to try for aYahtzee (also known as five-of-a-kind). In the game, after the initial roll, youare given the chance to reroll any or all of your dice twice. Here we’re askingabout our probability of getting that last 6 to complete our Yahtzee.

    Example 1.10 There are two ways for us to satisfactorily obtain the muchneeded 6. The first is simply to roll a 6 on our next roll of that die. Thishappens with probability 1/6. The second is for us to need to reroll the diebecause we did not get a 6, and then roll a 6 on the reroll. This last conditioninvolves two independent events; the first is not rolling a 6 on our next roll,and the second is rolling a 6 on the reroll! This later situation is covered byour multiplication rule for independent events so that probability is(

    5

    6

    )︸ ︷︷ ︸

    roll non−6

    ·(

    1

    6

    )︸ ︷︷ ︸

    6 on reroll

    =5

    36.

    Combining these together using the additive rule (since “rolling a 6 on ournext roll” and “rolling a non-6 on our next roll and a 6 on the reroll” are

    2Yahtzee is a registered trademark of the Milton Bradley Company/Hasbro Incorporated.

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 11

    disjoint conditions), we obtain our final answer as(1

    6

    )︸ ︷︷ ︸roll 6

    +

    (5

    6

    )︸ ︷︷ ︸

    roll non−6

    ·(

    1

    6

    )︸ ︷︷ ︸

    6 on reroll

    =11

    36≈ 30.56%.

    Shortcuts

    There are many, many questions that can be answered by using the additiverule and independence, along with looking at the raw sample spaces. Thereare, though, some shortcuts that should be mentioned early so that you cantake full advantage of them as your study of probability proceeds.

    Question: What is the probability of flipping 20 coins and getting at least1 head?

    Before we answer this question specifically, let’s answer a slightly simplerquestion; look back at Table 1.1 as you think about the probability that weflip 4 coins and try to get at least 1 head. From the 16 outcomes there, 15of them have at least one head, so the answer is pretty easily determined as15/16 = 93.75%. However, considering the complement (or opposite) conditionis even simpler! The conditions “get 0 heads” and “get at least 1 head” hereare not only disjoint, but exactly one of these conditions must happen!

    Theorem 1.5 If A is any condition, and Z is the complement or opposite ofA, then it must be true that

    P (A) = 1− P (Z).

    Given the above discussion, this result is easy to understand. Since A andZ given are disjoint, we can use the additive rule and know that there willbe absolutely no overlap, so P (A or Z) is given by P (A) + P (Z), but sincewe know that exactly one of A or Z must happen, P (A or Z) = 1 (or 100%)How is this useful? By looking at our 4 coin example, note that the oppositeof getting at least 1 head is getting no heads, and for 4 coins, this meansthe very specific physical outcome TTTT. Since the probability of that oneoutcome is 1/16, the probability of the opposite of that (getting at least 1head) is 1− 1/16 = 15/16 as we saw before. While this didn’t save much timenow, let’s answer our question.

    Example 1.11 There are 1,048,576 possible physical outcomes when flipping20 coins (since each coin has two possible outcomes, there are 2 outcomesfor 1 coin, 4 outcomes for 2 coins, 8 outcomes for 3 coins, continuing untilwe reach 220 outcomes for 20 coins). The complement of getting at least 1

    Copyrighted Material - Taylor & Francis

  • 12 The Mathematics of Games: An Introduction to Probability

    head is getting 0 heads; that is, getting the one specific outcome of all tails:TTTTTTTTTTTTTTTTTTTT. Since each coin is independent of the others,we can multiply probabilities together with

    Probability of all tails =

    (1

    2

    )︸ ︷︷ ︸

    first coin

    ·(

    1

    2

    )︸ ︷︷ ︸

    second coin

    · · ·(

    1

    2

    )︸ ︷︷ ︸

    nineteenth coin

    ·(

    1

    2

    )︸ ︷︷ ︸

    twentieth coin

    which can be combined together to equal(

    12

    )20= 1/1, 048, 576. The answer

    to the question about getting at least 1 head on 20 coins is then

    1− 11, 048, 576

    =1, 048, 575

    1, 048, 576≈ 99.999905%.

    At this point, it would be easy to compute the probability of not gettinga 6 in our Yahtzee situation previously! On one hand, we could compute itby noticing that to not get a 6 while allowing one reroll, we would have toroll twice and not get a 6 either time, and since the rolls are independent, wewould get the probability of not getting the 6 as (5/6) · (5/6) = 25/36. Onthe other hand, using our shortcut, since we already know the probability ofgetting the 6 allowing one reroll is 11/36, the probability of not getting the 6is 1− 11/36 = 25/36, the same thing!

    By now, you should see that there are often multiple ways to computea specific probability, so you shouldn’t be surprised throughout this text ifyou work an example or exercise problem differently than your classmates (oreven me). You will, though, assuming things are done correctly, always getthe same answer.

    The discussion and examples so far have implied the following easy way tofind the total number of outcomes when multiple physical items are used inan experiment. In particular, recall from Table 1.3 that flipping a coin (with2 outcomes) and rolling a die (with 6 outcomes) at the same time resulting ina sample space of 2 · 6 = 12 outcomes. This generalizes nicely.

    Theorem 1.6 If an experiment or process is created by combining n smallerprocesses, where the first process has m1 possible outcomes, and second pro-cess has m2 possible outcomes, and so on, the total number of outcomes forthe experiment as a whole is

    Total Number of Outcomes = m1 ·m2 ·m3 · · ·mn.

    For example, if we were to roll an eight-sided die and a twenty-sided die,and then flip 2 coins, we would have

    Total Outcomes = 8︸︷︷︸die 1

    · 20︸︷︷︸die 2

    · 2︸︷︷︸coin 1

    · 2︸︷︷︸coin 2

    = 640

    different physical outcomes. Even when the individual pieces have (relatively)

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 13

    few possible outcomes, Theorem 1.6 can give many, many outcomes for thefull process!

    The Monty Hall Problem

    FIGURE 1.3: ClosedDoors

    Imagine that you’re on a television game showand, as the big winner of the day, get to proceedto the bonus round at the end of the day. The hostshows you three large doors on stage; behind twoof the doors is a “prize” of little value, such as alive goat, and behind one door is a prize of greatvalue, perhaps a new car. You’re asked to select oneof those doors; at this point, given no informationabout where any of the prizes might be, we can agreethat the probability of you haphazardly selecting thecorrect door (assuming you would like a new car as opposed to a slightly-less-than-new goat) is 1/3 since there are three doors and only one contains a car.However, once you have picked a door, the host opens one of the other twodoors, revealing a goat, and then immediately asks you if you would prefer tokeep your original selection or if you would like to switch your choice to theother unopened door.

    Question: Is it more advantageous to keep your original door, switch to theother unopened door, or does it not make a difference?

    Take a moment to think about your answer! This particular problem isknown as the “Monty Hall Problem,” named for the host of the game showLet’s Make a Deal that was popular throughout the 1960s, 1970s, and 1980s(a more recent version, starring Wayne Brady as the host, debuted in 2009).The bonus round on the show, known as the “Big Deal” or “Super Deal” neveraired exactly as the situation above was presented; this particular situationwas asked of Marilyn vos Savant as part of the “Ask Marilyn” column inParade Magazine in 1990 [30]. What made this problem so famous was that,after Marilyn’s (correct) answer was printed, many people, including math-ematicians, wrote in to the magazine claiming that her answer was wrong!If your own answer was that it does not matter one bit whether you switchor not, you’re among the many people that have been stymied by this brain-teaser; the correct answer is that you should most definitely switch as doingso doubles your probability of driving off in a new car. Let’s see why.

    To be fair, there are two small but very reasonable assumptions that needto be made in terms of Monty Hall’s behavior; the first is that Monty willalways open one of the two doors not selected by you originally. The secondis that Monty knows the location of the car and will always open a door toreveal a goat and not the car. The elements of our sample space here could bewritten as ordered triples of the letters G (for goat) and C (for car) such that

    Copyrighted Material - Taylor & Francis

  • 14 The Mathematics of Games: An Introduction to Probability

    the triple contains exactly one C and two Gs. That is, the possible (random)configurations for which doors contain which prizes are {CGG, GCG, GGC},each equally likely. Suppose that your initial choice is door number one andthat you always choose to stay with that door; then we see that

    • for the element CGG, the host will open either door two or door three,you stay with door one, and you win a car,

    • for GCG, the host must open door three, and staying with door onemakes you lose, and

    • for GGC, the host opens door two, for which staying with door one alsomakes you lose.

    Choosing to stick with your original door keeps your chance of winning thesame as the initial 1/3; you can verify that if you choose either door two ordoor three originally, the same argument above applies.

    When you choose to switch, however, you’re (smartly) taking advantage ofnew information presented about the pair of doors you did not choose. Again,suppose you always pick door one and will choose to switch; we see that

    • for CGG, the host will open either door two or door three, and switchingoff of door one will cause you to lose,

    • for GCG, the host opens door three, so switching (to door two) willmake you win, and

    • for GGC, the host opens door two, so switching again makes you win.

    Choosing to switch from your original door increases your chance of winningthe car to 2/3 which can be counterintuitive.

    FIGURE 1.4: OpenDoors

    In other words, looking at Figure 1.3, when youmake the first choice of which door you want, you’reactually choosing which pair of doors you’re inter-ested in learning more about! You know, given theassumptions of this problem, that one of those twodoors will be opened, so would you rather choose tostay, winning with probability 1/3, or switch, win-ning with probability 2/3 by essentially getting twodoors for the “price” of one? Indeed, this latter op-tion is the best; at the start, there’s a 2/3 probabilitythat the collection of two unselected doors contains

    the car somewhere, and as we see in Figure 1.4, once Monty Hall opens one ofthose two doors, the probability the remaining unselected door contains thecar must remain as 2/3 (as indicated by the bottom set of numbers in thefigure).

    There are many other ways to think about and explain the probabilitiesinvolved in this problem; one involves conditional probability and I encourage

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 15

    you to think about the Monty Hall Problem again after reading Chapter 4.For more, consult any number of resources available on the internet (includinga plethora of simulations and online “games” that show empirically that 2/3is precisely correct).

    Candy (Yum)!

    I have to make a slight confession here. You will not find any candy in thisbook. The pages are not made out of candy paper, and the ink is not coloredsugar, so you can stop trying to think about eating any portion of the book.You will also not find a lot of mathematics performed in this section, nor willwe be using the discussion here in the future. The purpose of the section, then,is to really sell the point that the world of probability isn’t always so nice.Fair dice are nice, as Las Vegas would certainly agree, and perfect shuffles (thekind that give you a truly randomized deck of cards, not the kind that you canuse to control the layout of a deck) would be wonderful. All of the probabilitycalculations we do are based on the idea that we know exactly the behavior ofcertain processes. For us, that means a coin flip results in heads exactly 50%of the time and tails exactly 50% of the time. It means that rolling a 6-sideddie results in a 4 exactly 1/6 of the time. Unfortunately, this is not always thecase (and, possibly, never the case).

    FIGURE 1.5: M&Ms

    My guess is that almost everyone reading thisbook has had M&Ms3 at some point in his or herlife. Who can resist the chocolate candies, coveredwith a colorful shell, that melt in your mouth butnot in your hand? I also guess that most everyonehas a favorite color amongst them all! The ques-tion we may ask, though, is what is the probabilitythat a randomly selected M&M will be blue (myfavorite color)?

    There are essentially two ways to answer this question. The first, of course,would be to ask Mars, Incorporated, the manufacturer of the candy delights!According to their website, back in 2007, each package of standard milk choco-late M&Ms should have 24% of its candies coated in a lovely blue color.4 How-ever, the current version of their website does not list the color distributions.

    Has the percentage of each color changed since 2007? How would we know?Is there a secret vault somewhere with the magic numbers for the distributionof colors? The answers that I have for you for these three questions are

    3M&M is a registered trademark of Mars Incorporated.4For the curious, the same site in 2007 listed the distribution as 24% blue, 14% brown,

    16% green, 20% orange, 13% red, and 14% yellow. These numbers are slightly rounded, asyou might imagine, since they add up to more than 100%.

    Copyrighted Material - Taylor & Francis

  • 16 The Mathematics of Games: An Introduction to Probability

    1. possibly,

    2. look below, and

    3. I have no idea.

    The second way to possibly answer the question is to go out to your localgrocery store, purchase a bag of M&Ms, open it up, and count the quantity ofeach color that shows up. If the distributions are correct from 2007, then a bagwith 200 M&Ms should have about 48 blues (yes, blue is really my favoritecolor). Maybe you were only able to find a “Fun Size” bag with 20 M&Ms;you should have about 4.8 blue M&Ms (or close to 5, since 0.8 M&Ms aretypically not present). A slightly larger bag at the checkout line might have50 M&Ms and you could work out the expected number of blue candies (12).Hopefully, common sense should tell you that the larger the bag, the closeryour results should mirror “reality.”

    At this point, it sounds like we’ve moved from probability to statistics! Ifthat’s what you were thinking, you’re exactly right! The fields are intimatelyrelated, and the process of trying to determine what distribution a particular“experiment” (such as color distributions for candies) has can be done withstatistical techniques. In statistics, a (usually small) percentage of a popula-tion (called a sample) is used to make generalizations about the populationitself. Here we are trying to use packages of M&Ms to determine what per-centage the factory used to package all of the M&Ms. Larger sample sizes cutdown on the amount of error (both from the process of sampling itself andalso the use of the sample to make generalizations), so using a large “familysize” bag of M&Ms is better than a “Fun Size” bag. Even better would begrabbing large bags of M&Ms from stores in Paris, Tokyo, Dubai, San Diego,and Dauphin, Pennsylvania. The best option would be finding thousands ofbags containing M&Ms, randomly selecting a certain number of them, andusing those to determine the possible distribution of colors.

    If the candy example doesn’t convince you that statistics can be important,imagine yourself trying to determine what percentage of voters in your stateapprove of a certain law. Sure, you could ask everyone in the state directlyand determine the exact percentage, but you would be surprised at how muchmoney it would cost and how much time it would take to find the answerto that question (versus choosing a sample of, say 1,000 voters, and askingthem).

    Most of this book is dedicated to what I like to call “expected probability,”the calculable kind for which we can answer many important questions. It’sthe probability that casino owners rely on to keep the house afloat. However,I firmly believe that “observed probability” can be as important, and in somecases, is the only type of probability available. As you experience the world,try to match up what you see with what you know. Getting a feel for how, say,games of chance work by observing the games and thinking about them cangive you a sense of when situations are more favorable for you. Combining what

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 17

    you see with the “expected probability” we will be working with throughoutthe book will give you an edge in your decision making processes.

    Oh, as an instructor of statistics as well, I would encourage you to take acourse in statistics or pick up a book on statistics after you finish with thisbook. Everyone can benefit from an understanding of statistics!

    Exercises

    1.1 Consider the “experiment” of flipping three (fair) coins. Determine the set ofpossible physical outcomes and then find the probability of flipping:

    (a) exactly zero heads. (b) exactly one head. (c) exactly two heads.(d) exactly three heads.

    1.2 Consider rolling an 8-sided die once.(a) What are the possible outcomes?(b) What is the probability of rolling a 3?(c) What is the probability of rolling a multiple of 3?(d) What is the probability of rolling an even number or a number greaterthan 5?(e) If you just rolled a 6, what is the probability of rolling a 6 on the next roll?

    1.3 How many different outcomes are possible if 2 ten-sided dice are rolled? Howmany outcomes are possible if, after rolling two dice, four coins are flipped?

    1.4 Some of the origins of modern gambling can be linked to the writings andstudies of Antoine Gombaud, the “Chevalier de Méré” who lived in the 1600s.He was very successful with a game involving four standard six-sided dice where“winning” was having at least one of those dice showing a 6 after the roll.Determine the probability of seeing at least one 6 on rolling four dice; usingTheorem 1.5 may be helpful.

    1.5 Repeat Exercise 1.4 for three dice and for five dice instead of the four diceused by the Chevalier de Méré; are you surprised at how much the probabilitychanges?

    1.6 A player is said to “crap out” on the initial roll for a round of craps if a totalof 2, 3, or 12 is rolled on a pair of six-sided dice; determine the probability thata player “craps out.”

    1.7 For this exercise, suppose that two standard six-sided dice are used, but oneof those dice has its 6 replaced by an additional 4.(a) Create a table similar to Table 1.2 for this experiment.(b) Determine the probability of rolling a sum of 10.(c) Determine the probability of rolling a 7.(d) Determine the probability of not obtaining a 4 on either die.(e) If these dice were used in craps as in Exercise 1.6, what is the probabilitythat a player “craps out”?

    1.8 Instead of rolling just two six-sided dice, imagine rolling three six-sideddice.(a) What is the size of the resulting sample space?

    Copyrighted Material - Taylor & Francis

  • 18 The Mathematics of Games: An Introduction to Probability

    (b) Determine the number of ways and the probability of obtaining a totalsum of 3 or 4.(c) Determine the number of ways and the probability of obtaining a total sumof 5.(d) Using your work so far, determine the probability of a sum of 6 or more.

    1.9 A standard American roulette wheel has 38 spaces consisting of the numbers1 through 36, a zero, and a double-zero. Assume that all spaces are equally likelyto receive the ball when spun.(a) What is the probability that the number 23 is the result?(b) What is the probability of an odd number as the result?(c) Determine the probability that a number from the “first dozen” gets theball, where the “first dozen” refers to a bet on all of the numbers 1 through12.(d) Determine the probability of an odd number or a “first dozen” numberwinning.

    1.10 Most introduction to probability books love discussing blue and red marbles;to celebrate this, we will examine some situations about marbles here. Supposean urn has 5 blue marbles and 3 red marbles.(a) Find the probability that a randomly-selected marble drawn from the urnis blue.(b) Assuming that marbles are replaced after being drawn, find the probabilitythat two red marbles are drawn one after another.(c) Again, assuming that marbles are replaced after being drawn, find theprobability that the first two draws consist of one red and one blue marble.(d) Now, assuming that marbles are not replaced after being drawn, find theprobability of drawing two blue marbles in a row.

    1.11 More generally, suppose that an urn has n blue marbles and m red mar-bles.(a) Find an expression in terms of n and m that gives the probability of drawinga blue marble from the urn and find a similar expression for the probabilityof drawing a red marble from the urn.(b) Using your expression for the probability of drawing a blue marble, discusswhat happens to this probability as m (the number of red marbles) gets largerand larger. Then discuss what happens to the probability as n (the number ofblue marbles) gets larger and larger.(c) Find an expression, in terms of n and m, that gives the probability ofdrawing two blue marbles in a row, assuming that the marbles are not replacedafter being drawn.(d) Repeat part (c) assuming that the marbles are replaced after being drawn.

    1.12 Suppose you have an unbalanced coin that favors heads so that heads ap-pears with probability 0.7 and tails appears with probability 0.3 when you flipthe coin.(a) Determine the probability of flipping the coin, obtaining a head, and thenflipping the coin again, and obtaining a tail.(b) Now determine the probability of flipping the coin, obtaining a tail, andthen flipping the coin again with a result of a head.(c) If your friend asks you to flip a coin to determine who pays for lunch, andyou instead offer to flip the coin twice and he chooses either “heads then tails”

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 19

    or “tails then heads,” is this fair? Note that we would ignore any result of twoconsecutive flips that come up the same.(d) Based on your results, could you use this method to fairly decide anysituation involving “a coin flip,” even with an unbalanced coin?

    Mini-Excursion: True Randomness?

    Virtually all of the games featured in this book involve elements of randomchance; die are rolled, coins are flipped, and wheels are spun, giving the sensethat the outcomes are truly random. What is meant, though, by the wordrandom? The Merriam-Webster dictionary, [36], gives two definitions of thisadjective. First, it can mean “lacking a definite plan, purpose, or pattern” and,perhaps more applicable to our use of the word, it also means “relating to,having, or being elements of events with definite probability of occurrence.”It is this second version that we consider here.

    TABLE 1.4: Fifty Coin Flip Outcomes

    Round Result

    1HHHTT TTTTT HHHHT HHHTT HHTHTTTHHH THHHH TTHTT THTTH THHHT

    2HTTHT HHHTT HTHHH HHTTH TTHTTTTTTT THHTH HTTHH THTTT HTHHT

    3HTHHT HTTTH THHTH HTTHT HHTTHHTHTH HTHTT HTHTH HTTHT HHTTH

    4HHTHH TTTHH THHTH THHTH THTTHTHHTH TTHTH THHHT HTHTT HHTHT

    5TTHHT HHHHT HHHHH HHTHT THHHHTHTTT TTHHH HHHTH TTTHT THTTH

    Given in Table 1.4 is the result of five different rounds of fifty “coin flips”with a standard quarter. On first glance, it seems very plausible that the coinis indeed random, but how could we tell? In fact, of the five rounds shownin Table 1.4, only one is actually the result of flipping a coin fifty times!Can you tell which one of the five it is? Two students5 of mine provided twoof them, while one of my colleagues6 provided another. The last sequence isfrom a random number generator on my computer that simulated fifty coinflips. Take a moment to see if you can pick out which sequences match thesecategories.

    Each of these sequences could be considered random using the first defini-tion, and as we discussed in this chapter, not only are each of these equally

    5Thanks to Katia DeSimone and Andrew Feeney for these sequences.6Thanks to Roland Minton for his sequence.

    Copyrighted Material - Taylor & Francis

  • 20 The Mathematics of Games: An Introduction to Probability

    likely to occur, any of the 250 possible sequences of heads and tails have thesame chance to occur. However, two of the sequences, those created by mystudents, do not exhibit “typical” behavior of truly random coin flips; they donot contain larger streaks of either heads or tails and they switch from headsto tails or from tails to heads more than would be expected. If you identifiedsequences 3 and 4 as student-generated, congratulations! The other three se-quences, however, are hard to connect with a particular way of creation; mycolleague is aware of these “typical” properties and generated a sequence thatlooks just as good as one created either by a random number generator orby flipping a coin at my desk. In particular, to finally let the rest of the catsout of the bag, sequence 1 was the result of the random number generator,sequence 2 was created by my colleague, and sequence 5 is from flipping acoin.

    2 4 6 8 10

    0.20

    0.40

    0.60

    0.80

    1.00

    Maximum Streak Length

    Pro

    babilit

    y

    FIGURE 1.6: Maximum Streak Lengths

    These “typical” prop-erties that we’ve alludedto are the number ofruns and the lengthsof runs (streaks). Aswe’ll see in Theorem 7.2later, determining theprobability that 50 coinflips will have a streakof at least k heads (ortails) in a row is fairlyeasy and can be com-

    puted recursively. Figure 1.6 shows the probability that a sequence of 50 coinflips results in runs of at most a certain length (the values for these proba-bilities are strictly increasing, since a sequence with a largest streak length ofthree, for example, is included in the value for a maximum of three, four, five,and so on).

    2 4 6 8 10

    0.05

    0.10

    0.15

    0.20

    0.25

    Exact Streak Length

    Pro

    babilit

    y

    FIGURE 1.7: Exact Streak Lengths

    From Table 1.4, thestudent sequences hadstreak lengths of at most3; while each specific stu-dent sequence is equallylikely amongst the sam-ple space, the type of se-quence, in terms of max-imum streak length, isunlikely amongst the en-tire sample space (se-quences with maximumstreak length of three or less occur with probability 0.172586). By comparison,the most likely streak length is four, with five just slightly behind. Figure 1.7shows the probability of getting a maximum streak length of exactly the val-

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 21

    ues indicated on the horizontal axis. Note that, as previously foreshadowed,the highest expected streak length is four, with a length of five not too farbehind. By comparison, a maximum streak length of three occurs about halfas often as a length of four! Using the idea of expected value, to be introducedin Chapter 2, the average highest streak length for all possible sequences of50 coin flips turns out to be 5.006842.

    The number of switches from heads to tails or from tails to heads in asequence is another “test” to see how “realistic” the student sequences arecompared to the others. While we saw that the student sequences were some-what likely to occur based on the longest streak length, they are pretty farout of whack when it comes to the number of switches; again, without muchjustification, the probability for various numbers of switches, for 50 coin flips,is shown in Figure 1.8.

    15 20 25 30 35

    0.02

    0.04

    0.06

    0.08

    0.10

    0.12

    Number of Runs

    Pro

    babilit

    y

    FIGURE 1.8: Number of Switches

    You’ll notice thatthis distribution lookslike a normal distribu-tion (in other words, abell-shaped curve); thisis not a coincidence!The distribution for thenumber of switches canbe thought of as a bino-mial distribution whichyou will see in Chapter5, and binomial distri-

    butions can be approximated very nicely by normal distributions courtesyof Appendix D. Note that the student sequences, rounds 3 and 4 of Table1.4, contain 34 and 36 switches, respectively; the probability that this numberof switches occurs is very low (0.1199% and 0.0466%, respectively)! Indeed,the average number of switches for 50 coin flips is 24.5, and the other threesequences are very “close” to average with 21 from the randomly-generatorsequence, 26 for the sequence made by my colleague, and 22 when actuallyflipping a coin. The student sequences, hard to pick out just because of streaklength, are easy to identify via the number of switches.

    What does this tell us? Humans connect the notion of random, as it relatesto coin flips or the resulting color on a spin at roulette, as switching betweenchoices a large number of times and not terribly streaky; in fact, randomsequences will typically have somewhat unexpected streaks and, as a result oflarge streaks, less switches than we would think. Don’t be too surprised if youwalk by a roulette table in a casino and see that the last ten numbers were allred! And, even more, don’t expect that the next number can’t be red; roulettewheels (along with coin flips and other “random” events) have no memoryand still have the same probability for a red number being spun whether thelast ten numbers were red or not!

    Speaking of “random” as it applies in casinos, note that table games in

    Copyrighted Material - Taylor & Francis

  • 22 The Mathematics of Games: An Introduction to Probability

    modern casinos still use very physical methods of play; the behavior of theball and wheel in roulette and the cards and shuffles of blackjack exhibit veryrandom behavior. These methods, though, are not completely unpredictable.Given enough information about the starting state of a deck cards before itis shuffled, for example, and monitoring exactly how the shuffle is performed,gives us complete knowledge of which cards will come and when. With roulette,again, given information about the physical properties and rotational velocityat the start, combined with the velocity of the ball and location of the ballrelative to the wheel when the ball is put in motion, one could perhaps knowwith high certainty where the ball will land; this is especially important giventhat players may still make wagers for a short time after the ball is spinningaround the outside of the wheel! In the middle and late parts of the twentiethcentury, some mathematicians had very good success with predicting theseprocesses and their accounts are given in [25] and [27]; casinos, however, haveadapted by using advanced shuffling techniques (including using the morerecent “continuous shuffle” machines) and extra bumps on the roulette wheelto add complexity to the processes. The number of variables needed to reliablypredict the outcome quickly leaves the realm of possibility; while roulette andblackjack, for example, are technically predictable, they are still games whoseoutcomes are determined randomly as per our definition. It’s worth noting herethat some definitions of random include a statement about unpredictabilityand it’s these two examples that demonstrate why I chose not to use definitionsthat include it.

    On the flip side, modern slot machines and computer-based “table games”use random number generators. There are several different implementations ofalgorithms for using computers to generate sequences of numbers that appearrandom, but all of them share a common theme. To generate random numbers,a computer uses a specified iterative function combined with an initial valuecalled the seed. For instance, as many versions use the current system time tostart the iterative process, if the current time is t0 and the function is f(t),then the first random number would be f(t0), the second would be f(f(t0)),the third would be f(f(f(t0))), and so on. One important observation here isthat any of these pseudo-random number generators will give the exact samesequence of values if the seed, t0, is the same.

    Despite this limitation, modern computers have very good random num-ber generators that pass the “diehard tests” developed by mathematicianand computer scientist George Marsaglia in the mid-1990s. This collection oftests includes, amongst many others, the “runs test” that analyzes a long listof numbers between 0 and 1, counting the number of times the list movesfrom increasing to decreasing and vice versa; these counts should follow aknown distribution. It also includes the “craps test” whereby hundreds ofthousands of craps games are simulated with the number of wins and numberof throws per game being counted and compared to known results for ran-domness. As another example, the “overlapping permutations” test looks atfive consecutive random numbers, r1, r2, r3, r4, and r5 and in a long sequence

    Copyrighted Material - Taylor & Francis

  • Dice, Coins, and Candy 23

    of randomly-generated numbers, looks for other consecutive occurrences of{r1, r2, r3, r4, r5} (where the ordering may be different, such as in the orderr3, r1, r4, r5, and r2). Each of the 5! = 120 possible orderings should occurequally often.

    If by true randomness we mean something completely unpredictable, thenit is extremely hard to find; flares from the sun, for instance, may be as randomas we can observe but surely some chemistry and physics could be applied topredict them, albeit possibly outside the current realm of human knowledge.True randomness, then, is perhaps better thought of as in our second definitionof the word random. Computers that use random number generators, roulettewheels that add so much complexity to the dynamical system involved, andshufflers that continuously move cards around are random “enough” for ourpurposes, and good enough for me to call them truly random. That is, as longas those random number generators pass randomness tests, of course!

    Copyrighted Material - Taylor & Francis