Exercise 3. American Roulette Monte Carlo vs CLT
In this chapter, you calculated the probability of winning money in American roulette using the CLT.
Now, calculate the probability of winning money from the Monte Carlo simulation. The Monte Carlo simulation from the previous exercise has already been pre-run for you, resulting in the variable S
that contains a list of 10,000 simulated outcomes.
This exercise is part of the course
HarvardX Data Science - Probability (PH125.3x)
Exercise instructions
- Use the
mean
function to calculate the probability of winning money from the Monte Carlo simulation,S
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate the proportion of outcomes in the vector `S` that exceed $0