This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

)

Volume 1 | Issue 3 Article 7

8-31-2004

**Constructing a spreadsheet simulation model of Chuck-a-luck: An application of logical functions
**

Fred J. Rispoli

Department of Mathematics and Computer Science Dowling College, Oakdale, NY, rispolif@dowling.edu

**Follow this and additional works at: http://epublications.bond.edu.au/ejsie Recommended Citation
**

Rispoli, Fred J. (2004) "Constructing a spreadsheet simulation model of Chuck-a-luck: An application of logical functions," Spreadsheets in Education (eJSiE): Vol. 1: Iss. 3, Article 7. Available at: http://epublications.bond.edu.au/ejsie/vol1/iss3/7

This In the Classroom Article is brought to you by the Faculty of Business at ePublications@bond. It has been accepted for inclusion in Spreadsheets in Education (eJSiE) by an authorized administrator of ePublications@bond. For more information, please contact Bond University's Repository Coordinator.

edu. which is just $1. the player wins $1. if it comes up on one of the three dice. the player wins $2. if it comes up on two of the three dice.au/ejsie/vol1/iss3/7 .Constructing a spreadsheet simulation model of Chuck-a-luck: An application of logical functions Abstract Chuck-a-luck is an inviting game played at carnivals in the Midwestern United States and England.bond. simulation model. We would like to know if Chuck-a-luck is a fair game. and what is its average payoff? In addition. A player picks a number from 1 to 6 and an operator rolls three dice. Keywords logical functions. we are interested in simulating this game using logical functions built into spreadsheet software as well as other computer programming languages. chich-a-luck This in the classroom article is available in Spreadsheets in Education (eJSiE): http://epublications. Only if the chosen number does not appear at all does the player pay anything. If the number chosen by the player comes up on all three dice. the player wins $3.

The input to the model is a number from 1 to 6 which is chosen by the player. Since the computation time required to simulate a game is miniscule. We would like to know if Chuck-a-luck is a fair game. which are compared to the simulation statistics to test for model accuracy. the player wins $2. NY August 31. the player wins $3.000 games in less than 1 second. 2004 Background Chuck-a-luck is an inviting game played at carnivals in the Midwestern United States and England. If the number chosen by the player comes up on all three dice. output if false). Exercises 5 and 6 require theoretical calculations of the probabilities of each payoff and the expected payoff of the game. Rispoli Department of Mathematics and Computer Science Dowling College. if it comes up on two of the three dice. output if true. if it comes up on one of the three dice. and what is its average payoff? In addition. The last two exercises involve simulating other dice games using logical functions. AND. The IF function has the form IF(logical statement that is either true or false. The output is the payoff for each game. the player wins $1.Rispoli: Constructing a spreadsheet simulation model of Chuck-a-luck Constructing a spreadsheet simulation model of Chuck-a-luck: An application of logical functions Fred J.1. The first exercise involves simulating dice. 2004 1 . Before proceeding to the exercises we briefly review the functions needed. For example. Oakdale. In the following exercises we will construct a simulation model of Chuck-a-luck using an Excel spreadsheet. We then analyze the simulation data using Excel formulas to compute summary statistics that estimate the average payoff of Chuck-a-luck. suppose that cell A5 contains the number 17. since A5 < 10 is a false statement. we can easily simulate 1. we are interested in simulating this game using logical functions built into spreadsheet software as well as other computer programming languages. We also note that the IF function can be nested which is needed in the simulation. which is just $1. Only if the chosen number does not appear at all does the player pay anything. and OR. 3 and 4 the Chuck-a-luck model is developed and requires using the logical functions IF. and the COUNTIF statistical function. In Exercises 2. Then the Excel formula IF(A5<10. For example. A player picks a number from 1 to 6 and an operator rolls three dice.0) would return the value 0. suppose that we want a cell with the following output: Produced by The Berkeley Electronic Press.

A17=3) would return a TRUE. but AND(A15=1. Once again. Vol.A16= 1. The statistical COUNTIF function has the form COUNITF(cell range. For example.Spreadsheets in Education (eJSiE). The AND function has the form AND(statement 1. statement n). To illustrate.. and is FALSE only when all n statements are false.A16=2. However. and if 20 ≤ A5. Art.A17=3) would return FALSE since now A16 = 1 is false. suppose that A15 = 1.A16=2. 7 return 2. if A5 < 10. A16 = 2 and A17 = 3. return 0. 1. Iss.0)). 3 [2004].au/ejsie/vol1/iss3/7 2 .A16=3. the return is TRUE. we note that the AND and OR functions can be nested.OR(A15=3.edu. When all of the n statements are true. OR(A15=1. The formula AND(A15=1. suppose that the column of cells from G1 to G75 contains data consisting of numbers from 1 to 10.A16=1. http://epublications. .A17=3) would return TRUE. if 10 ≤ A5 < 20.A16 =1.A17=2).IF(A5<20. and otherwise the return is FALSE.bond.OR(A15=2. criteria)."=2"). return 1..1.. Then we could use the Excel formula IF(A5<10. statement 2. then we would use the formula COUNTIF(G1:G75. If we want to count the number of times a 2 occurs. The OR function has a similar form but the return is true if one or more of the statements are true.A17=1).A17=3)) would return TRUE..2. . Observe that the criteria should be in quotes. For example AND(OR(A15=1.

If this condition is true. and the chosen number in cell C6. Highlight the block of cells A11:A13. and then we add 1. The next step is to set up our model to repeat the simulation 1. D11 and E11 equal to C6? Yes Payoff = 1 Payoff = −1 The functions needed to determine the payoff are the IF. or C11 ≠ C6 and D11 = C6 and E11 = C6. then return the value 1. If this is false. This number must then be multiplied by 6. and E11equal to C6? Yes Payoff = 3 Are any two of No C11. Are all three of No C11. Then the logic behind calculating the Payoff is illustrated by the following flow chart. then return the value −1. Enter the numbers 2 and 3 in cells A12 and A13. D11. Create Excel formulas that calculate the payoff using the simulated dice values in cells C11. If it is not true. 2004 3 . D11 = C6.000 times. The idea is to first determine if C11 = C6.Rispoli: Constructing a spreadsheet simulation model of Chuck-a-luck Exercises 1. D11 and E11. The first step in building a simulation model of chuck-a-luck is to simulate the tossing of three dice. Then place Produced by The Berkeley Electronic Press. Place the output in cell G11 in the worksheet labeled Exercises. then we use another if function to determine if one of the following is true: C11 = C6 and D11 = C6 and E11 ≠ C6. When this true. then we want the output to be 3. D11 and E11. Once the Excel formula for the payoff is created you may simulated a game by simply pressing the F9 key. truncated to an integer using the INT function. and the OR logical functions reviewed in the Background Section. then we use one more if function to determine if exactly one of C11. 3. Create Excel formulas that simulate the tossing of three dice. or C11 = C6 and D11 ≠ C6 and E11 = C6. and E11 = C6. D11 and E11 equal to C6? Yes Payoff = 2 Is exactly one of No C11. To simulate a number obtained from tossing a die we need to use the RAND() function which returns random number uniformly distributed between 0 and 1. Suppose that a player chooses a number which is located in cell C6. the AND. Next we determine the payoff using logical functions. If this is true. D11 and E11 in the worksheet labeled Exercises. The simulated values obtained from the three dice tossed by the operator are located in C11. 2. D11 or E11 equals C6. then the output value is 2. Place the output in cells C11. If it is false.

Next highlight the cell range C11:G11. If the outcome is 1. 7. http://epublications.bond. Place your formulas in cells P4 and Q4 in the Exercises worksheet. Art. we must make the reference to cell C6 an absolute reference. filling in the column with game numbers. 6. Place the average in cell J22. Use counting principles to determine the probabilities of winning $3. 3 [2004]. Construct a simulation of this game. $1 and $−1.Spreadsheets in Education (eJSiE). Q12 and R12 in the Exercises worksheet.e. Before we copy the formula for the payoff. the player wins $2. Test your simulation by typing the F9 key repeatedly to see if you are obtaining the correct output. If the outcome is 3 or 5. the player wins $3.000. Use the COUNTIF function to determine the probability of payoffs of $3. If the outcome on both dice is the same (i.edu. the player must pay $1.000. 4. Iss. A player rolls two dice. Compare the answers obtained in Exercises 4 and 5. 8. Consider the following game. Vol. (b) Use the average function to determine the average payoff. A player rolls one die. 1. doubles) the player wins $5. Place these probabilities in column J. 5. (a) The data that we are interested in is located in cell range G11:G1010. $2. Place dollar signs before and after C wherever C6 is used. $1 and −$1. If neither of these occurs.au/ejsie/vol1/iss3/7 4 . $2. Construct a simulation of this game. Stop at game number 1. click and drag the mouse down. Consider the following game. and determine the expected payoff for chuck-a-luck. 4 or 6 the player must pay $1. 2. Place your formulas in cells P12. Place your answers in column L. If the sum of the two dice is 7 or 11. Copy and paste these stopping at game number 1. Test your simulation by typing the F9 key repeatedly to see if you are obtaining the correct output. 7 the mouse pointer in the bottom right corner of the highlighted block.

research paper

research paper

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd