Question: Using R studio what code could help me answer this question Consider the following game: you roll a fair die. If you get one or

Using R studio what code could help me answer this question Consider the following game: you roll a fair die. If you get one or two
spots, then you lose 5 dollars. If you get three, four, or five spots then
nothing happens. If you get six spots then you win 10 dollars. You would
like to know how much money you can expect to win per play of the game,
on average.
Write a function called diceSim() to answer the question. The function
should take the number of times to repeat as the parameter. Try values to
be 100,1000 and 10000, compare the results with the exact expectation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!