Page 247, Problem 4

In Las Vegas the roulette wheel has a 0 and a 00 and then the numbers 1 to 36 marked on equal slots; the wheel is spun and a ball stops randomly in one slot. When a player bets 1 dollar on a number, he receives 36 dollars if the ball stops on this number, for a net gain of 35 dollars; otherwise, he loses his dollar bet. Find the expected value for his winnings.

I’m going to try to solve this problem using two different methodologies to see if I get the same answer.

Solution 1 - Straight Probabilities:

You have a 1 in 38 chance of having the ball fall on your number. When it does you win $35. You also have a 37 in 38 chance of losing your $1.00 bet. This works out as follws:

\(E[] = (35*\frac{1}{38}) - \frac{37}{38} = -\frac{1}{19} = -0.05263\)

Solution 2 - Roulette Simulation in R

# Assign a variable p_seven as the probability of the ball landing on a 7

p_seven <- 1/38

# Assign a variable p_loser as the probability of the ball not landing on 7

p_loser <- 1 - p_seven


# Assign a varible s as the number of simulated wheel spins

s <- 100000L

# Set a seed to make sure the result matches the expected result

set.seed(1)


Profit <- replicate(s, {
  P <- sample(c(35,-1), size = 100, replace =TRUE, prob = c(p_seven, p_loser))
  sum(P)
})

mp <- mean(Profit)

The mean profit from Solution, -5.23, approximates the result from Solution 1, -0.0526 multiplied by 100 = -5.26. My work is done.