Question
I need a program code in R Studio for the following question: a) Playing Roulette. Simulate a Roulette game with a bet on numbers (ignore
I need a program code in R Studio for the following question:
a) Playing Roulette. Simulate a Roulette game with a bet on numbers (ignore colors and zeros). Each bet is for $1 based on the last two numbers of your student ID. If your number is drawn you win $36 [Profit = $35] If another number is drawn you get 0. [Loss = -$1] a. Assume that the roulette is fair and has 36 slots. Each slot has an equal probability. Use your random number generator above and generate draws between 1 and 36. Confirm the distribution of the random numbers using a histogram. b. Using simulations, calculate the expected Profit/Loss for 100 plays of Roulette. Also simulate for 1000 plays and 10,000 plays. Calculate the mean and standard deviation of the Profit/Loss. c. Redo the simulations for an unfair roulette. The payoffs are the same, but now the roulette has 38 slots (one is 0 and the other is 00).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started