Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Consider a game where you role three fair dice and count the total. The dice are eight, ten and twelve sided respectively. (a)


1) Consider a game where you role three fair dice and count the total. The dice are eight, ten and twelve sided respectively. (a) Write an R function that will compute one round of this game. Have it return the values of the three dice and their total. Store the dice roles by the number of sides of the dice (smallest to largest). (b) Using the code in (a) write a function that will simulate n rounds of the game. (c) Suppose you win another role if the total of the three dice roles is less than or equal to 14. Write an R function that will compute the proportion of roles that meet this criteria after n rounds. (d) Run (c) for n = 1000000. Repeat this five times and look at the results. (e) What does this tell you about the odds of rolling a total of 14 or less? (f) Suppose you win $100 if you role triple sevens. Write an R function that will compute the proportion of roles that meet this criteria after n rounds. (g) Run (f) for n = 1000000. Repeat this five times and look at the results. (h) What does this tell you about the odds of rolling triple sevens? (i) Suppose the game ends if you either role triple sevens or run out of free roles (sum of dice > 14). Write an R function that returns a 1 if you win and zero otherwise. (j) Using (i) what do you think are the odds of winning this game?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Principles of Economics

Authors: Tyler Cowen, Alex Tabarrok

3rd edition

1429278390, 978-1429278416, 1429278412, 978-1429278393

More Books

Students also viewed these Programming questions

Question

How do the two components of this theory work together?

Answered: 1 week ago