Session Ready
Exercise

Exercise 5. American Roulette sum of winnings

You modeled the outcome of a single spin of the roulette wheel, \(X\), in exercise 2.

Now create a random variable \(S\) that sums your winnings after betting on green 1,000 times.

Instructions
100 XP
  • Use set.seed to make sure the result of your random operation matches the expected answer for this problem.
  • Specify the number of times you want to sample from the possible outcomes.
  • Use the sample function to return a random value from a vector of possible values.
  • Be sure to assign a probability to each outcome and to indicate that you are sampling with replacement.
  • Do not use replicate as this changes the output of random sampling and your answer will not match the grader.