A Comprehensive Probability Project for the Upper Division One-Semester Probability Course Using Yahtzee



Similar documents
Math Quizzes Winter 2009

6.3 Conditional Probability and Independence

Using games to support. Win-Win Math Games. by Marilyn Burns

The mathematical branch of probability has its

Session 7 Fractions and Decimals

Unit 4 The Bernoulli and Binomial Distributions

Problem of the Month: Fair Games

Row Echelon Form and Reduced Row Echelon Form

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Chapter 4: Probability and Counting Rules

Factorizations: Searching for Factor Strings

PROBABILITY SECOND EDITION

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

The Binomial Distribution

Solution to Homework 2

Section 1.3 P 1 = 1 2. = P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., =

Chapter 11 Number Theory

Random variables, probability distributions, binomial random variable

Mathematical goals. Starting points. Materials required. Time needed

0.8 Rational Expressions and Equations

Alabama Department of Postsecondary Education

Lab 11. Simulations. The Concept

Session 8 Probability

WHERE DOES THE 10% CONDITION COME FROM?

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Mathematics of Sudoku I

4. Continuous Random Variables, the Pareto and Normal Distributions

6.4 Normal Distribution

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

CALCULATIONS & STATISTICS

Current California Math Standards Balanced Equations

Polynomials and Factoring. Unit Lesson Plan

Session 6 Number Theory

1 Review of Least Squares Solutions to Overdetermined Systems

MATH Fundamental Mathematics IV

Chapter 3. Distribution Problems. 3.1 The idea of a distribution The twenty-fold way

Enhancing the Teaching of Statistics: Portfolio Theory, an Application of Statistics in Finance

The Taxman Game. Robert K. Moniot September 5, 2003

6.042/18.062J Mathematics for Computer Science. Expected Value I

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

Enumerating possible Sudoku grids

Pigeonhole Principle Solutions

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 13. Random Variables: Distribution and Expectation

Assessment Management

Unit 12: Introduction to Factoring. Learning Objectives 12.2

Creating a NL Texas Hold em Bot

Integer roots of quadratic and cubic polynomials with integer coefficients

Tom wants to find two real numbers, a and b, that have a sum of 10 and have a product of 10. He makes this table.

Probability Using Dice

RUTHERFORD HIGH SCHOOL Rutherford, New Jersey COURSE OUTLINE STATISTICS AND PROBABILITY

Continued Fractions and the Euclidean Algorithm

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

Session 7 Bivariate Data and Analysis

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80)

Introduction to the Practice of Statistics Fifth Edition Moore, McCabe

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

1.2 Solving a System of Linear Equations

MA 1125 Lecture 14 - Expected Values. Friday, February 28, Objectives: Introduce expected values.

Contents. Sample worksheet from

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

The Basics of FEA Procedure

Solving Systems of Linear Equations

FEGYVERNEKI SÁNDOR, PROBABILITY THEORY AND MATHEmATICAL

Copyright 2011 Casa Software Ltd. Centre of Mass

Chi Square Tests. Chapter Introduction

COLLEGE ALGEBRA. Paul Dawkins

Five 5. Rational Expressions and Equations C H A P T E R

Binomial lattice model for stock prices

A simple analysis of the TV game WHO WANTS TO BE A MILLIONAIRE? R

IEOR 6711: Stochastic Models I Fall 2012, Professor Whitt, Tuesday, September 11 Normal Approximations and the Central Limit Theorem

Fairfield Public Schools

Finite Mathematics Using Microsoft Excel

Probability, statistics and football Franka Miriam Bru ckler Paris, 2015.

Lecture 1: Systems of Linear Equations

CAHSEE on Target UC Davis, School and University Partnerships

SCRATCHING THE SURFACE OF PROBABILITY. Robert J. Russell, University of Paisley, UK

How to Plan and Guide In Class Peer Review Sessions

Summation Algebra. x i

Decimal Notations for Fractions Number and Operations Fractions /4.NF

5.5. Solving linear systems by the elimination method

Am I Decisive? Handout for Government 317, Cornell University, Fall Walter Mebane

Field Observation Reflection Paper. Kelli Jordan. Manchester College. EDUC 111: Introduction to Teaching

5.1 Identifying the Target Parameter

The theory of the six stages of learning with integers (Published in Mathematics in Schools, Volume 29, Number 2, March 2000) Stage 1

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University

The last three chapters introduced three major proof techniques: direct,

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Unit 19: Probability Models

CONTINGENCY TABLES ARE NOT ALL THE SAME David C. Howell University of Vermont

POLYNOMIAL FUNCTIONS

3.2 Roulette and Markov Chains

IB Math Research Problem

1.7 Graphs of Functions

Practice Problems for Homework #8. Markov Chains. Read Sections Solve the practice problems below.

Using Excel 2000 to Create a Weighted-Grade Grade Book

PERMUTATIONS AND COMBINATIONS

6 PROBABILITY GENERATING FUNCTIONS

Transcription:

A Comprehensive Probability Project for the Upper Division One-Semester Probability Course Using Yahtzee Jason Wilson Joshua Lawman Rachael Murphy Marissa Nelson Biola University Journal of Statistics Education Volume 19, Number 1 (2011 http://www.amstat.org/publications/jse/v19n1/wilson.pdf Copyright c 2011 by Jason Wilson, Joshua Lawman, Rachael Murphy, and Marissa Nelson all rights reserved. This text may be freely shared among individuals, but it may not be republished in any medium without express written consent from the authors and advance notification of the editor. Key Words: Markov chain; Probability; Project; Yahtzee Abstract This article describes a probability project used in an upper division, one-semester probability course with third-semester calculus and linear algebra prerequisites. The student learning outcome focused on developing the skills necessary for approaching projectsized math/stat application problems. These skills include appropriately defining terms, making necessary simplifying assumptions, budgeting time, determining when to search literature, and checking theoretical calculations with simulation. It was assumed students would learn the technical material in the process. The result exceeded expectations. This article is written to summarize the project, provide a complete solution 1

(including R code with simulations and theoretical solutions, and describe the methods which facilitated the positive outcome, with the hope that it might be adapted by others. 1. Introduction This article describes a probability project that was used in an upper division probability course that helped students transition from theory to application. It was a semesterlength project, incorporating concepts from most parts of the course. The culmination was the due date at the end of the semester, which was devoted entirely to discussion. When the day to discuss the Yahtzee projects finally came, I was awestruck. Despite the difficulties students faced with the calculations and the length of time involved, they got it. I opened the class by taking questions. Three of the first were: How do you know when you get it right? How do you know when to stop? Are there other random variables, or something, that could be used to solve these kinds of problems? Their questions revealed that they saw well beyond the specificity of the Yahtzee calculations to the applicational skill of approaching project-sized applied math/stat problems on their own. The students did more than merely grasp the technical aspects of the different kinds of probability problems encapsulated in the project. Indeed, they crossed the threshold of merely solving another difficult math problem into an authentic applicational experience they genuinely wanted to develop for future work. The purpose of this article is two-fold. First, I (the professor-author Wilson want to describe the project and the process that was used to achieve this educational outcome. Second, we (the professor and three of the students authors Lawman, Murphy, and Nelson want to share the mathematical details in order that the project might be readily adapted for use by others. The structure of the article is as follows. Section 2 contains the links to the supplementary materials, which include the complete theoretical solutions in R code, along with simulations. Section 3 describes the project and the literature/resources that led to its 2

selection. Section 4 consists of the technical solutions to the project items, while Section 5 briefly describes the simulations provided in the supplementary material. Section 6 concludes with details about the student learning and other reflections. Due to its technical nature, Section 4 comprises the bulk of the paper. The reader may skim Section 4 according to interest upon first read. 2. Supplementary Materials The supplementary materials were written to allow the reader to adapt the project described in this article for their own purposes. In order to download the files from the JSE website, please click on each file s link. File Yahtzee Project.doc YahtzeeRCalculations.R Yahtzee Tree Diagrams.docx Yahtzee sim.r Yahtzee Simulations Manual.rtf Description Original Yahtzee project handout, editable R code with exact calculations for all cases in paper Tree diagrams for 3K, 4K, 5K & Full House, editable Simulations, in R, for all cases in paper User s manual for Yahtzee sim.r 3. Project 3.1 The Class A little background helps to frame the project. I am the lone statistician in a pure-mathoriented mathematics department. This means students usually come to me without having experienced a math project of the kind and scope one might find in industry. By the time they reach my Fall 2009 Probability course, all students had taken third-semester calculus, linear algebra, discrete structures (which covered permutations and combinations, and a C++ programming course. Twenty-five students were enrolled. The text was Mathematical Statistics and Data Analysis, 3rd edition (Rice 2007. The semester s topics were: axiomatic probability, random variables (about 5 discrete and 5 continuous, joint distributions, expectation, moment generating functions, limit theorems, and distributions derived from the normal. The grading rubric was: quiz 1 (7.5%, quiz 2 (7.5%, midterm (25%, comprehensive final (35%, and the Yahtzee project was the remaining 25%. Homework problems from six chapters of the book were assigned about every two weeks. Homework papers were fully evaluated and given a score from 0 to 3

2. At the end of the semester, homework averages over 1 were raised one level on the grade scale; averages below 1 were lowered one level on the grade scale. Along with the regular homework and lectures, I wanted a significant comprehensive project as a capstone for the course. The goal of the project was to expose the students to the kind of experience they might have in industry. The project was designed to integrate multiple topics using multiple problem-solving methods over an extended period of time in a group setting. Throughout the article I will refer to this experience as applicational. The denouement will be described in Section 6. 3.2 The Game In the West, the board game Yahtzee has not only been a source of recreational fun, but also mathematical interest. I decided to leverage the popularity and appeal of Yahtzee in an attempt to catapult my students through technical details and into an authentic applicational experience. An Internet search revealed numerous sites of different levels of sophistication. For example, The Yahtzee Page has rules, tips, online playing, and some game score calculations (http://www.yahtzee.org.uk. Another example was an NSF-funded project which posed some specific Yahtzee problems, with solutions, to interest high school students in advanced mathematics (Cornell 2006. The Chance paper Yahtzee: The Solution used a computer to exhaustively calculate the 10 12 possible outcomes to the game (Woodward 2003. After reviewing such resources, on the one hand, I concluded that the theoretical calculations available did not achieve the level of difficulty we could attain in the class. On the other hand, The Solution (Woodward 2003 simulation was well beyond our level of difficulty. This left the field open for fresh work. The rules of Yahtzee may be summarized as follows. Players have a score card with 13 categories (see Figure 1. The game consists of 13 turns and each turn consists of up to three rolls of five dice. For the first roll, the player rolls the dice and holds any combination of them on the side. For the second roll, they toss the remaining dice and again hold aside any combination of those dice. The third roll repeats the same process as the second roll. Once the player meets the criteria for the desired category or has rolled three times in one turn, the turn is scored. The player must then record the score in a category. If it does not meet any of the criteria, it must be scored as zero points in a category. The game ends after 13 turns and the final score is a sum of the points scored for each category, with some bonuses possible. 4

Figure 1. Yahtzee scorecard. The first six rows of the upper section and first seven rows of the lower section are the 13 categories. Other rows are for scoring. The card will hold six games, one game per column. The first six categories are 1 s, 2 s, 3 s, 4 s, 5 s, and 6 s; they are scored as the sum of the number of faces for that category. The second six categories have fixed score amounts. The 3-of-a-kind, 4-of-a-kind, and 5-ofa-kind will be denoted by 3K, 4K, and 5K, respectively. (The 5K is commonly referred to as a yahtzee. The full-house consists of 3K with a pair. The large-straight is five in a row and the small-straight is four in a row. The last category is chance, which is the sum of the five die faces. 5

Journal of Statistics Education, Volume 19, Number 1 (2011 A typical turn in Yahtzee might look something like the following: On the first roll the player gets 6, 5, 4, 3, and 3. The player places the two 3 s aside and rolls the remaining three dice. Now the player gets 4, 3, and 3. The player places the additional 3 s to the side. At this point the player has a four-of-a-kind and now has a one in six chance of getting a Yahtzee on the next roll. Rolling the last die again to finish the player s turn yields a 5. So, the player is left with a four-of-a-kind. This is depicted in the pictures below. Roll 1: Five dice rolled; a pair of 3 s held Roll 2: Remaining three dice rolled; two more 3 s Roll 3: Remaining die rolled; no match The player has many choices for scoring this turn, depending on the stage of the game they are in. Assuming a clean slate at the beginning of the game, as Figure 1, the player may choose to place his score in one of three categories. Since he has four 3 s, placing his score in the Upper Section the three s category would give him a score of 12. Alternatively, the player may wish to place his score in the Lower Section, the four-ofa-kind category which totals up all five dice. This would give the player a score of 17. Finally, there is the Lower Section the chance category which also totals up all five faces of the dice. This also would give the player a score of 17. If the player were to achieve this outcome later on in the game, rather than at the beginning, all three of the applicable category slots may be full. If this is the case the player must unfortunately choose an unused category and enter a score of 0. Much of the work on the Web and The Solution are concerned with final scores. By contrast, in this article we are concerned with the probabilities of meeting the criteria for a prespecified category on a single turn. 6

3.3 The Project The complete project may be found in the supplementary materials (Yahtzee Project.doc. It consisted of the following four parts, to be completed as the course progressed, in pairs: 1. Select three of the following Yahtzee categories: three-of-a-kind (3K, four-of-akind (4K, full house, small straight, or large straight. Calculate the probability of obtaining each category in a single turn. 2. Propose a discrete random variable related to Yahtzee. Analyze this random variable as best you can. Ideally, obtain its probability distribution and calculate its expectation and variance. 3. Calculate the expected value and variance of the score of one of the following categories: 1 s, 2 s, 3 s, 4 s, 5 s, or 6 s. 4. Write a script that will simulate one of the three categories selected in Part 1. Run the simulation at least 10,000 times and record the proportion of times the category occurred. Compare this simulated proportion with your theoretical calculation. In order to make the calculations tractable, I had the students assume the player was going for the specified category from the outset (perhaps it is the thirteenth turn of the game and they are holding for the final category. The directions required students to make the following additional decisions, which I believe contributed significantly to the overall success of the applicational learning aspect: Some category definitions are ambiguous (e.g., for 3K, does it count if 4K is obtained? How about full-house?. Define the category precisely, in order to determine the probability of obtaining it. There may be occasions where the problem defined is too difficult, or would take too long. Make simplifying assumptions that will allow you to complete the work. Be explicit about the assumptions made and the reason for them. In Section 6, I discuss possible changes to the project for future courses. 7

Figure 2. Yahtzee tree. There are 15 possible paths to obtaining a yahtzee, as traced to the end of each branch. The first row consists of the five unconditional probabilities and the second row consists of the 14 conditional probabilities. 4. Solutions After allowing the students to grapple with the difficulty of the project, about five weeks into the semester I presented my solution to the 5K category. This raised morale and gave them a model to follow for 3K and 4K, but left open the full-house or straights for creativity. In this section, a detailed direct solution to 5K will be presented. This solution provides a model for the others, and parts of it are used to solve the 3K, 4K, and full-house. The large straight and the expected value of the score of 1 s conclude the section. The small straight solution uses the same techniques as the large straight, but was too tedious for inclusion in this article. 4.1 5K (yahtzee Solution, Direct Approach Let X i be the event where i dice have the same face, i = 0,2,3,4,5. There is no event X 1 because it is not possible to have one die with the same face. Given the many ways to obtain 5K, many students became bewildered as to which calculations to perform. In order to answer this question, and to organize the work, we developed a tree diagram which depicts every possible path to obtain 5K (Figure 2. By examination of Figure 2, it can be seen that the probability of the 5K event is the sum of the probabilities of each of the 15 paths to obtaining 5K. Let the probability of each path be denoted by P ( X 5,X j,x i, meaning the probability of Xi on the first roll AND X j on the second roll 8

AND X 5 on the third roll, i = 0,2,3,4,5; i j 5. Then P(5K = i P ( X 5,X j,x i. (1 j But P ( X 5,X j,x i = P ( X5 X j P ( Xj X i P(Xi (2 by conditional probability, where denotes given. For example, P(X 4 X 2 is the probability that 4K occurs on the second roll, given that the first roll was a pair. Furthermore, since each roll depends only upon the previous roll, the term P(X 4 X 2 is also the probability that 4K occurs on the third roll, given that the second roll held a pair (see remarks about the Markov property later in this subsection. In this way P(5K may be obtained by calculating the 5 unconditional and 14 conditional probabilities indicated in the tree (Figure 2, unconditionals in the first row and conditionals in the second row. The unconditional probabilities for the first roll are given in Table 1. The probability calculations have been written to show the general pattern for P(X i where the binomial coefficient represents the number of ways to obtain i faces, followed by the product of the probabilities for each die. The X 2 case has two possibilities: a single pair ( 6 1 where the remaining three dice are different ( ( 5 4 3 6 or two pair 66 1 6 56 1 6 where either one of the two may be selected ( ( 3 2 ways to arrange the second pair and divided by two to select only one. The X 3 case has two possibilities: a 3K where the remaining two dice are different or a full-house. The conditional probability calculations for the second roll are given in Table 2. For P(X 2 X 2 the first term has all three dice different, whereas the second term has a pair and a lone die, with ( 3 2 combinations of ways for them to appear. For P(X3 X 2 the second term is a full house and the third term is when the three dice rolled have the same face different from the two dice held from the first roll. There are no new probability calculations required for the third roll because they are the same as those required for the second roll. The probability of event X j occurring on the second roll given event X i on the first roll is the same as the probability of event X j occurring on the third roll given event X i on roll two, i = 0,2,3,4,5; i j 5. That is, P ( X j X i has the same value, irrespective of which roll. This is the Markov Property, namely that the probability of transitioning to a higher state, X i+1, depends only upon the the present state, X i, and not any prior states X i 1,X i 2,... This observation made 9

Table 1. The five unconditional probabilities for a yahtzee Term Expression Value P(X 0 P(X 2 P(X 3 P(X 4 ( 5 66 5 4 3 2 0.0926 ( 5 6 1 5 2 6 4 6 3 6 + (3 2 6 1 5 1 2 }{{} }{{} }{{} pair pair pair 4 6.6944 ( 5 6 1 1 5 3 } 6 {{ 6 4 6 + 6 1 1 5 1 } } 6 {{ }}{{}.1929 3K 3K pair ( 5 66 1 1 1 5 4.0193 P(X 5 ( 5 66 1 1 1 1 5.0008 sense to the students here (and relieved them!, and was used to introduce Markov chains later. The 5 unconditional probability calculations (Table 1 and the 14 conditional calculations (Table 2 were coded in R (see supplement YahtzeeRCalculations.R for R script containing all exact calculations shown in article, along with Equations (2 and (1 to obtain P(5K directly. This whole process was the most difficult part of the project for the students, and they sensed that there was a better way. 4.2 5K (yahtzee solution, Markov Chain approach Let p i j = P ( X j X i be the probability of moving from state Xi to X j. For example, p 24 = P(X 4 X 2 = 0.0694 is the probability of going from holding a pair, rolling the remaining three dice, and obtaining two faces the same as the original pair resulting in four-of-a-kind. This event is the same probability whether it occurs on the second roll, third roll, or even a fourth roll that would be in violation of Yahtzee rules. Then P = ( p i j, i = 0,2,3,4,5 and j = 0,2,3,4,5 is the matrix of transition probabilities 10

Table 2. The 14 conditional probabilities for a yahtzee. Note: The first five cases are in Table 1, because P(X i X 0 = P(X i, for i = 0,2,3,4,5. Term Expression Value P(X 2 X 2 P(X 3 X 2 ( 3 0 5 6 4 6 3 6 + ( 3 5 1 2 }{{} pair 4 6.5556 ( 3 1 1 6 5 6 4 6 + 1 5 1 6 + ( 3 56 1 1 3.3704 }{{} pair P(X 4 X 2 ( 3 16 1 5 2.0694 P(X 5 X 2 P(X 3 X 3 P(X 4 X 3 ( 3 16 1 1 3.0046 ( 2 2 5 6 4 6 + 5 1.6944 }{{} pair ( 2 56 1 1 6.2778 P(X 5 X 3 ( 2 16 1 2 6.0278 P(X 4 X 4 ( 1 56 1.8333 P(X 5 X 4 ( 1 16 1.1667 given by P yahtzee ( Xj X i = X 0 X 2 X 3 X 4 X 5 X 0 X 2 X 3 X 4 X 5.0926.6944.1929.0193.0008 0.5556.3704.0694.0046 0 0.6944.2778.0278. 0 0 0.8333.1667 0 0 0 0 1 Note: The first row and column of P are also denoted as row i = 0 and column j = 0. The nonzero elements of the first four rows, corresponding to i = 0,2,3,4, are the 14 condi- (3 11

tional probabilities calculated in Table 2. It can be seen that the rows sum to one, since each forms a conditional probability distribution. The fifth row has p 55 = P(X 5 X 5 = 1, for consistency, meaning that once the state X 5 is reached the rolling stops. Let p 0 = (p 00, p 02, p 03, p 04, p 05. Then p 0 is the vector of unconditional probabilities given in Table 1. Therefore the multiplication p 0 Pyahtzee 2 gives a 1 5 vector of the probabilities of achieving all possible third roll outcomes, i j P ( X k,x j,x i = i P(X i P ( ( X j X i P X5 X j, j where i = 0,2,3,4,5; i j k 5 (see Equations (1 and (2. This follows from the Chapman-Kolmogorov equations (Ross 2010. The solution of interest, P(yahtzee, is the fifth element of the vector p 0 P 2 yahtzee, p 0 Pyahtzee 2 = X (3 0 X (3 2 X (3 3 X (3 4 X (3 5.0008.2560.4524.2448.0460. The superscript (3 indicates the event is after the third roll. Thus, P(yahtzee = 0.0460. That is, there is a little less than a 5% chance of obtaining a yahtzee on the third roll, when holding for it from the first roll. For the use of Markov chains in other board games, see Johnson (2003. 4.3 3K (Three-of-a-kind and 4K (Four-of-a-kind Solutions Define a 3K and 4K as being obtained if a 5K is rolled. For example, a first roll of (6,6,6,6,6 would count as a 3K or 4K. (In actual game play, it could score as either one of these, or other categories as well. For their projects, students were free to define their category differently, which would change the probabilities. This kind of decision is one of the realistic aspects of the project that contributed to providing students with an authentic applicational experience. Intuitively, the solution to the 3K and 4K categories is contained in the 5K. The solution vector for the 3K case is p 0 P3K 2 = X (3 0 X (3 2 X (3 3.0008.2560.7432 (4 which is obtained by summing the X 3, X 4, and X 5 cases from the 5K. The solution of interest, P(3K, is the third element of the vector, P(3K = 0.7432. Similarly, for the 12

4K case we have p 0 P4K 2 = X (3 0 X (3 2 X (3 3 X (3 4.0008.2560.4524.2908 which is obtained by summing the X 4 and X 5 cases from the 5K. The solution of interest, P(4K, is the fourth element of the vector, P(4K = 0.2908. To justify the above results, we argue as follows. The tree diagrams can be obtained by starting with Figure 2 and removing the branches which end with X 5 (for the 4K and X 4,X 5 (for the 3K. For the 4K category, the resultant tree will have four unconditionals in the first row and nine conditionals in the second row. For the 3K category, the resultant tree will have three unconditionals in the first row and five conditionals in the second row (see figures in supplement Yahtzee Tree Diagrams.docx. For the 3K category, X 0 and X 2 are the same events as the 5K. However, X 3 is different because for the 5K all five die faces must be specified, whereas for the 3K only three of the five faces must be specified. Therefore, let X3 denote the event of obtaining threeof-a-kind, then from Tables 1 and 2, P(X 3 = P(X 3 + P(X 4 + P(X 5 P(X 3 X 2 = P(X 3 X 2 + P(X 4 X 2 + P(X 5 X 2 P(X 3 X 3 = 1. Thus, the transition probability matrix for the 3K case is given by P 3K ( Xj X i = X 0 X 2 X 3 X 0 X 2 X 3.0926.6944.2130 0.5556.4444. 0 0 1 (5 which is the same as the transition probability matrix for 5K (Equation (3 with the fourth and fifth columns added to the third, and the fourth and fifth rows removed. The p 0 of Equation (4 is the vector of unconditional probabilities for the 3K case, which is the first row of matrix P 3K (Equation (5. The transition probability matrix is constructed similarly for the 4K category (not shown. Multiplying the initial probabilities (first roll by the square of the transition probability matrix (second and third rolls gives the solution vector (Equation (4. 13

4.4 Full House The full house is similar to the 5K in that dice with the same face are held. The difference is that we want to obtain two of one face and three of a different face. For notation, let X i j refer to the event where i dice towards a pair are obtained, i = 0,2, and j dice towards a 3K are obtained, j = 0,2,3. The general probability calculation for a single possible full-house outcome is (# of combs. for pair (# of combs. for 3K (product of die probabilities. (6 Table 4 gives the unconditional probabilities in this form. Below, we consider the two hardest cases, X 22 and X 03. Consider the two pair case, X 22 (Table 3, second row. The probability expression begins with ( 5 66 1 2 6 because there are 5 dice from which to obtain any pair of 2 dice with probability for the first die, and a match with probability 1 6, to make a pair. The expression continues with ( 3 56 1 4 2 because for the remaining 3 dice, a new pair of 2 is chosen with probability 5 6 1 6. The last die must be different than the preceding pairs, and this happens with probability 4 6. For this case, the result must be divided by two because the combinations account for interchanging the two pairs, which is really the same roll. Consider the three-of-a-kind case, X 03 (Table 3, third row. It is satisfied when exactly three-of-a-kind ( 5 66 1 1 3 and two different faces ( 5 56 4 0 6 occur. In addition, it is satisfied when exactly four-of-a-kind ( 5 66 1 1 1 4 6 and one different face ( 5 56 0 occurs. In addition, it is satisfied when a five-of-a-kind (5K, Table 1, fifth row occurs. Since these are the only three ways case X 03 can occur, and they are mutually exclusive, P(X 03 is the sum of their individual probabilities. The general pattern supplied in the above two cases can be used to explain the calculations given in Table 3. The pattern also explains the conditional calculations in Table 4, which are even easier, due to fewer dice. 14

Table 3. The five unconditional probabilities for a full house Term Expression Value P(X 00 ( 5 ( 5 66 5 4 3 2 0 0.0926 P(X 02 ( 5 0 ( 5 66 5 4 3 1 2 }{{} pair.4630 P(X 03 P(X 22 P(X 23 ( 5 66 5 4 1 1 3 6 + ( 5 5 66 5 1 1 1 } 6 {{ 0( 4 + ( 5 5 66 1 1 1 1 0( 5.1744 } 3K ( 5 0 [ (5 ( ] 3 66 1 5 1 4 2 2 /2.2315 ( 5 ( 3 66 5 1 1 1 2 3.0386 Table 4. The nine conditional probabilities for a full house. Term Expression Value P(X 02 X 02 P(X 03 X 02 P(X 22 X 02 P(X 23 X 02 P(X 03 X 03 ( 3 ( 3 56 4 3 0 0.2778 ( 3 ( 3 16 5 4 0 1 + ( 3 3 16 1 5 0( 2 + ( 3 3 16 1 1 0( 3.3519 ( 3 ( 1 56 1 4 2 0.2778 ( 3 ( 1 56 1 1 2 1 + ( 3 1 56 1 1 0( 1.0926 ( 2 ( 2 56 4 0 0 6 + ( 2 2 16 5 0( 1 6 + ( 2 2 16 1 0( 2 6.8611 P(X 22 X 03 0 0 P(X 23 X 03 ( 2 ( 0 56 1 2 0 6.1389 P(X 22 X 22 ( 1 ( 1 46 0 0.6667 P(X 23 X 22 ( 1 ( 1 26 0 1.3333 15

The matrix of transition probabilities is given by P full house = X 00 X 02 X 03 X 22 X 23 X 00 X 02 X 03 X 22 X 23.0926.4630.1744.2315.0386 0.2778.3519.2778.0926 0 0.8611 0.1389. 0 0 0.6667.3333 0 0 0 0 1 As with the 5K case, let p 0 denote the unconditional probabilities (row 1. The solution of interest, P(full house, is the fifth element of the vector p 0 P 2 full house, p 0 Pfull 2 house = X (3 00 X (3 02 X (3 03 X (3 22 X (3 23.0008.0516.3453.2525.3498. The superscript (3 indicates the event is after the third roll. Thus, P(full house = 0.3498. That is, there is about a 35% chance of obtaining a full house by the third roll, when holding for it from the first roll. 4.5 Large Straight A large straight is the die combination (1,2,3,4,5 or (2,3,4,5,6. For calculating the probabilities, we found it easiest to divide the dice into two categories, those where an end (1 or 6 is obtained and those where middles (2,3,4, or 5 are obtained. Let X i j denote the state where i ends and j middles are obtained, i = 0,1 and j = 0,1,2,3,4. For example, the roll of (2,2,4,4,4 would classify as state X 02, having zero ends and two middles. Thus, X 14 denotes the state of having obtained a large straight. The tree diagram is constructed similarly to Figure 2, except the first row consists of the nine states X 01,X 02,X 03,X 04,X 10,X 11,X 12,X 13,X 14 and the second row consists of 34 states, X 01 X 01,X 02 X 01,...,X 14 X 13 (see the supplement YahtzeeRCalculations.R for the entire list. For calculating probabilities, the large straight is significantly more difficult than the other categories considered so far. We found it easier to compute them using the relative frequency definition of probability and counting, rather than the multiplication rule of probabilities, as used up to this point. Thus, the probability of obtaining state X i j, i = 0,1 16

and j = 0,1,2,3,4 on the first roll may be computed by P ( X i j = N ( X i j 6 5, where N ( X i j is the number of ways to obtain state Xi j and 6 5 is the number of total possible outcomes of the five dice. Then N ( X i j = (# end faces (# middle faces (# arrangements, (7 where the three components may be computed using the principles below. As is typical in combinatorial problems, there are alternative arguments. Although particular cases may be able to be argued with a simpler method, the principles given here have been consistently applied to all cases, in order to model the fundamental structure, and avoid the need for explaining all cases. While the algorithm below could be programmed, it would be difficult, and it would obscure the case-by-case solution provided in the scripts, which presents a trove of problems challenging to students. The rules for determining the values of the three components of Equation (7 are as follows. # end faces = 1 when i = 0 (X 0 j, j = 0,1,2,3,4 and 2 when i = 1 (X 1 j. This is because when i = 1 there is at least one 1 or one 6 obtained. It does not matter which is held, or if there were others rolled. Given that one is held (1 or 6, if it were replaced by the other, then there are two ways for this state to be obtained. When i = 0, there are no 1 s or 6 s, therefore this component does not change the total count. # middle faces = 4 P j = 4! (4 j! When j = 0, there are no middle faces and therefore 4! 4! = 1 way to arrange zero faces. When j = 1, there is only one middle face represented and there are 4! 3! = 4 ways for this to occur. When j = 2, there are two middle faces represented, with 4! 2! = 4 3 ways for this to occur. When j = 3, there are three middle faces represented, with 4! 1! = 4 3 2 ways for this to occur. When j = 4, all four middle faces are represented, with 4! 0! = 4 3 2 1 ways for this to occur. # arrangements = the sum of the terms expressing the different ways to allocate the five dice such that i ends and j middles are obtained. The following principles were used to obtain the # arrangements terms: 17

1. Let e be the number of dice allocated for the ends and m be the number of dice allocated for the middles. Obtain all combinations of (e, m (placing the largest numbers at left, for readability. 2. Within e, obtain all combinations of i s (placing the largest numbers at left. Within m, obtain all combinations of j s (placing the largest numbers at left. 3. For each combination within principle 2, obtain a multinomial coefficient of the following form, ( 5 5! = e 1,e 6,m 2,m 3,m 4,m 5 e 1!e 6!m 2!m 3!m 4!m 5!. Each multinomial coefficient gives the number of ways the 5 dice can be grouped into the 6 faces with the number of elements, e 1,e 6,m 2,m 3,m 4, or m 5 in each class and e 1 + e 6 + m 2 + m 3 + m 4 + m 5 = 5, (at least one of e 1,e 6,m 2,m 3,m 4, or m 5 is always zero. 4. If e 1 = e 6 = 1, divide the multinomial coefficient by 2!. If exactly two of m 2,m 3,m 4, or m 5 are 1 s or 2 s, divide by 2!. If exactly three of m 2,m 3,m 4, or m 5 are 1 s, divide by 3!. The division removes double-counting. When e 1 = 1 and e 6 = 1 both a 1 and a 6 have been rolled, which has been accounted for in the multinomial coefficient and # end faces (Equation (7. The reasoning is similar for division on account of repeated m s. To illustrate the above principles, we will explain our calculations for P(X 13, the probability of rolling one end and three middles on the first roll. To find N (X 13 we seek the three components from Equation (7. First, we have # end faces = 2, since X 13 has i = 1, meaning there is at least one 1 or 6. Second, we have # middle faces = 4 3 2, since X 13 has j = 3, meaning there are three unique middle faces, possibly one middle pair. Third, to find the number of arrangements, we use the following four principles. 1. There could be either 1 end and 4 middles, (e,m = (1,4 or 2 ends and 3 middles, (e,m = (2,3. 2. If (e,m = (1,4, then since i = 1 = e, e 1 = 1 and e 6 = 0. Since m = 4, choose m 2 = 2, m 3 = 1, and m 4 = 1. 18

3. There is only one possible multinomial coefficient for this combination, ( 5 = 5! 1,0,2,1,1,0 2! = 60. 4. Since m 3 = m 4 = 1, divide the multinomial coefficient by 2! Next, we return to principle 1 to consider the case (e,m = (2,3 : 2. If (e,m = (2,3, then since i = 1 = e, there are two possibilities, either (e 1,e 6 = (2,0 or (1,1. Since m = 3, we must have m 2 = 1, m 3 = 1, and m 4 = 1. 3. There are two possible multinomial coefficients: ( ( 5 5 = 60 and 2,0,1,1,1,0 1,1,1,1,1,0 = 120. 4. Divide both by 3! since m 2 = m 3 = m 4 = 1, and divide the second by 2 as well since e 1 = e 6 = 1. Combining these results gives # arrangements = 60 2! + 60 3! + 120 3!2! = 50. Therefore, using Equation (7, the probability of obtaining X 13 on the first roll is P(X 13 = N (X 13 2 (4 3 2 50 6 5 = = 0.3086. 7776 The application of these principles for each of the nine cases can be found in the supplement (YahtzeeRCalculations.R where the following probabilities are obtained: Table 5. The nine unconditional probabilities for a large straight X 01 X 02 X 03 X 04 X 10 X 11 X 12 X 13 X 14.0005.0231.0772.0309.0041.1080.4167.3086.0309 The calculations for the conditional probabilities are analogous to the unconditional. The probability of moving to state X i j from state X kl is given by P ( X i j X kl = N ( X i j X kl 6 d, 19

where d is the number of dice rolled, 1 d 5. The number of ways for the event to occur N ( X i j X kl is also given by Equation (7, with components computed analogously. Conditional probabilities may be influenced by two further complexities. First, there may be d 5 dice. Second, the way to count # middle faces changes to account for the previously held dice, requiring the addition of principle 5, as follows. 5. If there are some previously held middle dice and some newly rolled middle dice, then the term should be multiplied by two, to account for the case where the two possibilities switch. To illustrate the above principles, we will explain our calculations for P(X 03 X 02, the probability of starting with two middles and obtaining one more middle on the next roll. To find N (X 03 X 02 we seek the three components from Equation (7. Starting with the number of arrangements, we use the four principles from before, plus the additional principle 5. 1. & 2. Since there are no ends, the three middles could either be all three new, two new and one previously held, or one new and two previously held. 3. The multinomial coefficients for the above three cases, respectively, are ( ( ( 3 3 3 = 1, = 3, and = 6. 0,0,0,0,3,0 0,0,2,0,1,0 0,0,1,1,1,0 4. The first and second cases have no divisors, but the third has a divisor of 2! because two of the middles were previously held. 5. The first and second cases have a multiplier of 2. Returning to the faces, # end faces = 1, since X 03 has i = 0, meaning there are no 1 s or 6 s. The # middle faces depends upon the case from principle (3. Case one is 1 2 because there is one way to obtain (m 2,m 3 = (0,0 and two ways to obtain (m 4, m 5 = (3,0. Case two is 2 2 because there are two ways to obtain (m 2,m 3 = (2,0 and two ways to obtain (m 4, m 5 = (1,0. Case three is 1 2 because there is one way 20

to obtain (m 2,m 3 = (1,1 and two ways to obtain (m 4, m 5 = (1,0. Combining these results gives N (X 03 X 02 = 1 (1 2 1 + 1 (2 2 (3 2 + 1 (1 2 (6 1 = 38 which implies P(X 03 X 02 = N (X 03 X 02 6 3 = 38 216 = 0.1760. The complete enumeration of all cases is given in the supplement (YahtzeeRCalculations.R. The transition probability matrix is P large straight = X 01 X 02 X 03 X 04 X 10 X 11 X 12 X 13 X 14 X 01 X 02 X 03 X 04 X 10 X 11 X 12 X 13 X 14.001.035.116.046 0.062.370.333.037 0.037.176.083 0 0.259.389.056 0 0.250.194 0 0 0.444.111 0 0 0.667 0 0 0 0.333 0 0 0 0.012.201.509.259.019. 0 0 0 0 0.125.514.333.028 0 0 0 0 0 0.444.500.056 0 0 0 0 0 0 0.833.167 0 0 0 0 0 0 0 0 1 Let p 0 denote the unconditional probabilities given in Table 5 which, unlike the 5K case, is not the first row of P large straight. The unconditionals are not given by the first row of the conditional probabilities because there is no X 00 case. After the first roll, one of the nine states, X 01,...,X 14 will be entered. The solution of interest, P(large straight, is the ninth element of the vector, p 0 P large 2 straight = X (3 01 X (3 02 X (3 03 X (3 04 X (3 10 X (3 11 X (3 12 X (3 13 X (3 14.0000.0000.0060.0297.0000.0018.1183.5951.2491. The superscript (3 indicates the event is after the third roll. Thus, P(large straight = 0.2491. That is, there is about a 25% chance of obtaining a large straight by the third roll, when holding for it from the first roll. 21

4.6 1 s (Aces The preceding solutions were all technical details of the first and longest part of the project. The second part was to propose and analyze a discrete random variable pertaining to Yahtzee. The third part was to calculate the expectation and variance of 1 s, 2 s, 3 s, 4 s, 5 s, or 6 s. In a burst of unforeseen creativity, most groups tended to combine their work for parts two and three. Having spent the majority of their time on the first part, all groups made simplifying assumptions. There were two primary approaches taken. Most groups assumed that nothing of interest was obtained on the first two rolls, and so all five dice were rolled on the third roll with the intention of holding 1 s. For dice i = 1,...,5, let X i = 1 if a 1 is rolled and 0 otherwise. Then, since X i is a Bernoulli random variable with p = 1/6, they obtained E (X i = 1/6 and V (X i = 5/36. Then they summed the five independent dice, E ( 5 i=1 X i = 5/6 and V ( 5 i=1 X i = 25/36. Some observed that the sum was binomial, S = 5 i=1 X i binomial(n = 5, p = 1/6 and found expectation and variance from the binomial formulas E (S = np and V (S = np(1 p. A minority did not want to assume a single roll, yet they were unable to obtain the general conditional expectation. Their answers were a hybrid of technical expectation and simplified assumption. They reasoned that since 5/6 was expected on the first roll, they would assume one die was held and roll four dice on the second. Since 4/6 were expected on the second roll, they would assume one more die was held. On the third roll, three dice rolled have expectation 3/6. They concluded that about two or three of the same face would occur in three rolls, giving a score of two to three times the face selected. 5. Simulations Our team built scripts simulating six different Yahtzee aims satisfying the following categories: three-of-a-kind (3K, four-of-a-kind (4K, yahtzee (5K, full house, large straight, small straight, and aces. The simulations followed the Yahtzee rules given in the theoretical calculations, for comparability. The simulation always makes the move a perfect player would make. Each simulation produced results from the average of n turns where n is specified by the user. The aces simulation held as many aces as possible each turn and calculated the mean number of aces. All other simulations calculated probabilities of success. The simulations were written in R (http://www.r-project.org. The R code is available in the supplement (Yahtzee sim.r. It was constructed so as 22

to be easy to use and commented in order to be readable. A brief user s manual is included in the supplementary material which describes the functions and their use (Yahtzee Simulations Manual.rtf. For example, the procedure for simulating the probability for finding a large straight over 100 runs would be found, after copying the code into the R interface, by typing large.straight(100 into the R command line. For this article, each simulation was run n = 10 6 times and the results match the theoretical calculations to three or more decimal places. The simulation speeds vary, but runs of size n = 10 4 usually finished in less than 15 seconds. 6. Conclusion The project was assigned on the first day of the course. After a couple of weeks of covering the usual probability calculations (including combinatorics, the product rule, and conditional probability students realized we would not go deeper into probability calculations and began work on part one. They quickly hit a wall of difficulty. I let them struggle with the difficulty of the individual calculations and the magnitude of the project for a few weeks. Once themes began to emerge in office hour questions, I presented the 5K solution to the class on the board at about the fifth week. No handouts were provided, so students had to record the material and understand it. From a technical perspective, the students benefitted most from seeing answers for the hardest probability calculations, for example, P(X 2, and the way to calculate the union of the event paths by multiplying the conditional probabilities. With respect to using multiple methods, however, the students saw the power and value of simulation when I shared with them how I had an error in my technical calculation that was not detected until I investigated the divergence between my simulated and theoretical results. Because this was their first exposure to R and I did not have time to cover as much R programming in class as I intended, I provided my full simulation code to the students (yahtzee only. This downgraded the programming part of the project from creation to modification. If I did not do this, the result may have been disaster. However, since the students had programming experience and worked in groups, those taking the path of least resistance were able to perform the modifications to my code and get through that part without much help. At the other end of the spectrum, one student went so deep into R and coding that he became a co-author on this article. Providing the code eased tensions in the class over the project, got them through the most difficult part, and the rest proceeded rather smoothly. 23

The climax came on the due date, which was devoted entirely to discussion. I opened by asking students to raise their hands and ask whatever questions that were on their minds in relation to the project. To help create an inquisitive atmosphere, I wrote all questions down on the board before responding. The students were hungry for answers and the class atmosphere that day was one of those rare mixes of pin-drop quiet and deep inquisitiveness with willingness to ask at the right time. Because of my stated intention to bridge the technical work into application experience, and the seeds I had sown during the semester, the students clearly saw beyond the immediate project to the general principles. Some of their questions, with a combination of my answers (or the answers I wish I would have given were: 1. How do you know when you get it right? (a Theory For P ( X j X 2 I calculated cases j = 2,3,4,5 and believed they were all correct. Later, however, it occurred to me that the cases form a complete probability distribution. Since the probabilities did not sum to one, I had made an error. (b Simulation As mentioned previously, I reminded them of the value of using simulation to check your theory, and vice versa. (c Research When the question comes, this is the time to check the literature for what has been done before. (d There may be more than one right answer some students defined X 3 to include X 4 and X 5, whereas others kept them distinct. Defining things well is critical. 2. How do you know when to stop? In any significant project in industry, or teaching, it is critical to determine the deadline and amount of time available for the work. Then, divide the project into sections and construct a timetable for how to allocate the time by section. As you go, there are at least two limiting methods. (a Reduce/simplify the problem (e.g., at the outset assume we seek 5K for the turn, or when holding for aces assume we roll all five dice on the third roll. (b Accept approximate solutions, instead of exact, where appropriate (e.g., ignore low probability events the first time through I ignored the case of moving from X 2 to X 3 due to three dice rolled being 3K and different from the first pair. 24

3. Are there other random variables, or something, that could be used to solve these kinds of problems? I sketched the Markov chain solution to 5K, to which there were many smiles and approving nods. (If I had been more prepared, I would have been able to teach the essence of discrete state Markov chains right there in 10 minutes because they had just painstakingly worked out three cases by brute force. I also mentioned that probability generating functions could be used to find sums of uniform random variables. In conclusion, I have attempted to describe a probability project that resulted in my students successfully integrating multiple topics using multiple problem-solving methods over an extended period of time in a group setting. My students, the majority of which had no prior exposure to applied mathematics or statistics, were given a taste of a project requiring important skills which are routine in industry. This was a benchmark experience, and will provide a basis for a more informed decision about career paths in applied mathematics/statistics. It has been my goal to provide the reader with a sense of its excitement and a taste of its fruit, as well as enough content to allow them to adapt it for their own purposes without too much work. If I were to run the project again, I would make the following changes. (1 Trim back the material in the course to provide more time to introduce R. In this way, the students would play a greater role in the R coding and more effectively begin learning this valuable skill. (2 Be more intentional about the examples used when covering conditional probability, and consider inserting some Yahtzee examples in lecture. (3 Be more explicit about the format of the write-up (I was very general, see Yahtzee Project.doc. Without standardization, it took longer to grade the papers, and some details I wanted to see were missing because they were not specified. For example, I wanted an introduction and a conclusion with the project parts in the middle as sections, but not all did this. (4 For the first time through, the project was overly ambitious. It took a lot of time on my part to do it ahead and help students, and it took them a long time to complete (reports were 10 15+ hrs., which does not seem as bad as some complained. Next time I would give a big introduction to the project, being very explicit about the goals, and the expected timeline. (5 On the project due date, I would run the Q&A exactly the same, except I would come prepared with a handout introducing the basics of Markov chains and have the Markov chain solution to the yahtzee case ready for demonstration on R. Memorable lessons would be achieved with this feature as the climax of the day. 25

Acknowledgments This research was first presented at JSM 2010. The authors would like to thank our Fall 2009 probability class for the shared experience which led to this article. We would also like to thank the referees for valuable feedback that led to substantial improvements. References Cornell (2006, online at http://www.math.cornell.edu/ mec/2006-2007/probability/yahtzee. htm. Johnson, R. (2003, Using Games to Teach Markov Chains, PRIMUS, Vol. VIII, no. 4, Dec. pp. 337 348. Rice, J. (2007, Mathematical Statistics and Data Analysis (3rd Ed., Brooks/Cole. Ross, S. (2010, Introduction to Probability Models (10th ed., Academic Press. Woodward, P. (2003, Yahtzee: The Solution, Chance, 16, No. 1, 18 22. Jason Wilson Assistant Professor Mathematics Department Biola University 13800 Biola Ave. La Mirada, CA 90639 Email: jason.wilson@biola.edu Joshua Lawman Mathematics Department Biola University 13800 Biola Ave. 26

La Mirada, CA 90639 Email: josh.p.lawman@biola.edu Rachael Murphy Department of Mathematics California State University, Fullerton McCarthy Hall 154 Fullerton CA 92834 Email: rachael.a.murphy@biola.edu Marissa Nelson Mathematics Department Biola University 13800 Biola Ave. La Mirada, CA 90639 Email: marissa.nelson@gmail.com Volume 19 (2011 Archive Index Data Archive Resources Editorial Board Guidelines for Authors Guidelines for Data Contributors Guidelines for Readers/Data Users Home Page Contact JSE ASA Publications 27