1. Learn
  2. /
  3. Courses
  4. /
  5. HarvardX Data Science - Probability (PH125.3x)

Exercise

Exercise 2. American Roulette payout

In American roulette, the payout for winning on green is $17. This means that if you bet $1 and it lands on green, you get $17 as a prize.

Create a model to predict your winnings from betting on green one time.

Instructions

100 XP
  • Use the sample function return a random value from a specified range of values.
  • Use the prob = argument in the sample function to specify a vector of probabilities for returning each of the values contained in the vector of values being sampled.
  • Take a single sample (n = 1).